Oracle ADF: Application Menu meta data wiring

Using the af:navigationPane and af:commandNavigationItem components, it is possible to create menus on a JSF page based on meta data. Setting up the necessary files and declarations for the menu meta data is quite simple: in JDeveloper, select a .jspx file in the project navigator and choose “Create Applications Menu” from the context menu. JDeveloper will take care of creating the necessary meta data entries. SeeĀ Creating ADF Menus for Page Navigation for more information.

If something goes wrong, it is good to know how the data is wired in the background. The following diagram shows the structure of the meta data which is involved in application menu creation, and how the various parts are looked up once a browser request for a given view arrives:

  • Once the browser request for a view comes in, ADF loads the corresponding .jspx page to create the JSF component tree.
  • At the location where the menu shall be rendered, the .jspx file contains an af:navigationPane component with an embedded af:commandNavigationItem component.
  • af:navigationPane references a managed bean through its value attribute. This bean is implementing the model for the menu.
  • The managed bean has a property named source which contains the name of the menu meta data file to use.
  • For each itemNode in the menu meta data file, ADF creates an af:commandNavigationItem with the corresponding text and action attributes.