Package [com.oaframework.toolkit.common.util]
The Navigation class is an abstract class that should be extended for each OA Framework application. The implementation need only implement the getUrlPrefix() method.
See the Usage Notes for further details.
The constructor for Navigation takes the current PageContext and the name of the current module as parameters. See the Usage Notes for an example.
This is the only method that client applications need to implement. It must return a string represneting the module path from the Company Identifier down to the Application Short Name.
Ensures that the Breadcrumbs parameter is passed to any Navigations
Switches off the Breadcrumbs parameter
This method causes the immediate navigation to the specified page. It has four overloads that provide a variety of parameter combinations:
public void forwardImmediately(String page, HashMap params, boolean retainAM) public void forwardImmediately(String page, boolean retainAM) public void forwardImmediately(String page, HashMap params) public void forwardImmediately(String page)
This method causes the navigation to the specified page, if the specified [UiEvent] has been triggered. This method has four overloads that provide a variety of parameter combinations:
public void conditionalForward(UiEvent event, String page, HashMap params, boolean retainAM) public void conditionalForward(UiEvent event, String page, boolean retainAM) public void conditionalForward(UiEvent event, String page, HashMap params) public void conditionalForward(UiEvent event, String page)
Forwards navigation to the current page, passing parameters as appropriate.
public void forwardToCurrentPage() public void forwardToCurrentPage(HashMap params)
Forwards navigation to the Oracle Applications Home Page.
The OA Framework Development standards define the directory structure for all OA Framework application files. For custom applications the structure is as follows:
For example, in Project's Rapid Reports application, the homepage path is:
/prj/oracle/apps/xxpcl/adhoc/ListQuerySetsPG
where prj is our Company Identifier, xxpcl is our custom Application Short Code, adhoc is the legacy short name for the Rapid Reports module and ListQuerySetsPG is the actual page name.
The Rapid Report's version of Navigation implements the getUrlPrefix() method:
package prj.oracle.apps.xxpcl.adhoc.webui; import oracle.apps.fnd.framework.webui.OAPageContext; public class Navigation extends com.oaframework.toolkit.util.Navigation { public Navigation ( OAPageContext pageContext, String module ) { super(pageContext, module); } public String getUrlPrefix() { return "/prj/oracle/apps/xxprj"; } }
This version of the Navigation class can be used throughout the Rapid Report's application. In a Page Controller's processFormRequest() method the Navigation object is instatiated:
public void processFormRequest(OAPageContext pageContext, OAWebBean webBean) { super.processFormRequest(pageContext, webBean); AdhocAMImpl am = (AdhocAMImpl)pageContext.getApplicationModule(webBean); Navigation nav = new Navigation(pageContext, "adhoc"); Number querySetId = am.getSelectedQuerySetId(); // CREATE button nav.conditionalForward(NavButton.CREATE, "CreateQuerySetPG"); // UPDATE button if (NavButton.UPDATE.isTriggered(pageContext)) { if (querySetId == null) throw new OAException(APP_SHORT_NAME, MODULE_PREFIX + "_SELECT_OBJECT_BEFORE"); HashMap params = new HashMap(); params.put("p_query_set_id", querySetId); nav.forwardImmediately("UpdateQuerySetPG", params); } }
Wiki: NavButton
Wiki: PprEvent
Wiki: UiEvent
Wiki: com.oaframework.toolkit.common.util