CREATE OR REPLACE procedure home -- create the synonyms for wwpob_page.show as l_pageid number; l_siteid number; l_url varchar2(32767); l_status number := 404; -- page not found status l_tabstring varchar2(32767) := null; l_is_mobile boolean := false; l_is_html boolean := true; l_base boolean := true; l_store wwsto_api_session; begin l_is_mobile := wwutl_mobile.is_mobile_request; l_is_html := wwutl_mobile.is_html_request; -- -- Make sure that we're either Mobile or regular HTML -- if l_is_mobile or l_is_html then -- -- Get the page ID and site ID of the default (home) page -- if l_is_mobile then wwpob_api_mobile.get_defaultmobilepage( p_siteid => l_siteid, p_pageid => l_pageid); elsif l_is_html then wwpob_api_page.get_defaultpage( p_siteid => l_siteid, p_pageid => l_pageid); -- -- check if the current user has customized the page -- in terms of content (i.e. portlets) -- l_base := not wwpob_api_page.has_customization( p_page_id => l_pageid, p_site_id => l_siteid); l_store := wwsto_api_session.load_session('wwc','pob'); -- -- get the tabs from the preference store -- wwpob_page.get_selected_tabstring( p_pageid => l_pageid, p_siteid => l_siteid, p_containerid => l_pageid, p_store => l_store, p_tabstring => l_tabstring, p_base => l_base); end if; -- -- get the url for rendering the page -- l_url := wwpob_page_util.get_page_url( p_pageid => l_pageid, p_siteid => l_siteid, p_tabstring => l_tabstring); -- -- The server can not process this request, so if possible -- redirect to the mobile gateway (if it exists) on the -- offchance that that _can_ handle it. -- else l_url := wwptl_api_mobile_config.get( wwptl_api_mobile_config.MOBILE_GATEWAY_URL); if l_url is null then l_status := 501; -- not yet implemented end if; end if; -- -- Redirect to the home page -- if l_url is not null then -- -- some devices do not respond to redirect headers -- unless the content-type is acceptable to them. -- owa_util.mime_header(wwutl_mobile.get_first_type( wwctx_api.get_http_accept), false); owa_util.redirect_url(l_url); else owa_util.status_line(l_status); end if; exception when others then -- -- An exception was raised; display the error. -- if wwutl_mobile.is_mobile_request then owa_util.status_line(404); else wwerr_api_error_ui.show_html; end if; end home; /