14.01.2013 Views

Oracle JHeadstart Developer's Guide - Downloads - Oracle

Oracle JHeadstart Developer's Guide - Downloads - Oracle

Oracle JHeadstart Developer's Guide - Downloads - Oracle

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Another common scenario is to have the generated menu1 entries displayed as menu2<br />

entries, to be able to add a top-level menu that provides access to the various<br />

subsystems. In this scenario the “old” menu2 level entries are no longer displayed. This<br />

is possible because <strong>JHeadstart</strong> also generates buttons to navigate to the detail groups that<br />

are made accessible through the default level 2 menu.<br />

Here are the steps to do this:<br />

• Create a copy of the menu1.vm template, and replace the forEach loop with<br />

hardcoded top level menu entries you want to appear. For example:<br />

• Create a custom template for pageMenu.vm, rename menu1 facet to menu2, and<br />

change the includeName suffix to menu2Tabs.<br />

• Remove the existing menu2 facet (and surrounding if statement) from the<br />

template.<br />

• Add a new menu1 facet that uses the JHS_PARSE_INCLUDE macro to create an<br />

ADF Faces region file with the content of your copied menu1.vm<br />

(myTipMenu.vm) template. See the code snippet below for an example, and note<br />

the reference to the actual template path and name.<br />

• Create a custom template for menu1.vm, and rename the enslosing element<br />

to <br />

• Configure <strong>JHeadstart</strong> to use your customized menu1.vm and pageMenu.vm<br />

templates and regenerate your application.<br />

<strong>JHeadstart</strong> Developer’s <strong>Guide</strong> Gemerating Menu Structures 9 - 5

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!