Wednesday, February 6, 2013

Working With Menus In ADF

Hi All,
I Would like to share how we create menus in ADF...Menus and toolbars allow users to choose from a specified list of options or to click buttons (in the case of a toolbar) to effect some change to the application.
The menuBar component is used to render a bar that contains the menu bar items (such as File,Edit,View...). Each item on a menu bar is rendered by a menu component, which holds a vertical menu. Each vertical menu consists of a list of Menu Item components that can invoke some operation on the application. 
You can even nest menu components inside menu components to create submenus.
The Following are the steps that we follow while creating a menu...
=>Create a new Fusion Web Application(ADF) with a Model and View Controller you can   
     even include packages for them or can remain them default....
=>Right click on View Controller and create a new JSF Page.
=>In order to create Menus We have to first drop a PanelHeaderLayout component    
     followed by a  PanelMenuBar component which can hold any number of Menus which 
     in turn holds any number of Menu Item components..
=>Following Figure shows the structure of what i told above:

=>The Above is for if you are creating only one MenuBar...
=>If you have plan on using more than one menu bar or a combination of toolbars                   and menubars, create a Toolbox component by dragging and dropping a Toolbox component from the Layout panel of the Component Palette.
=> If you are using a toolbox component, the Panel Menu Bar should be dropped as a       direct child of the toolbox component and then followed by required Menu Item 
      components.
=>The Following is the is the output with a sample Menu:



This is my first Blog on ADF...Feel Free To correct me.. Hope this helps you..
Thank you...