com.logicaldoc.web.navigation
Class MenuBarBean

java.lang.Object
  extended by com.logicaldoc.web.navigation.MenuBarBean
Direct Known Subclasses:
DocumentRecord

public class MenuBarBean
extends java.lang.Object

The MenuBarBean class determines which menu item fired the ActionEvent and stores the modified id information in a String. MenuBarBean also controls the orientation of the Menu Bar.

Since:
3.0
Author:
Marco Meschieri - Logical Objects

Field Summary
protected  java.util.List<com.logicaldoc.core.security.Menu> accessibleMenues
           
protected  java.util.List<MenuItem> breadcrumb
           
protected  java.util.Map<java.lang.String,MenuItem> itemCache
           
protected static org.apache.commons.logging.Log logger
           
protected  java.util.List<MenuItem> model
           
 
Constructor Summary
MenuBarBean()
           
 
Method Summary
protected  MenuItem createMenuItem(java.lang.String label, java.lang.String id, java.lang.String actionListener, java.lang.String action, java.lang.String link, java.lang.String icon, boolean immediate, java.lang.String target, PageContentBean content)
           
protected  MenuItem createMenuItem(java.lang.String label, java.lang.String id, java.lang.String actionListener, java.lang.String action, java.lang.String link, java.lang.String icon, boolean immediate, java.lang.String target, java.lang.String styleClass, PageContentBean content)
           
protected  void createMenuItems()
          Finds all first-level menus accessible by the current user
 java.lang.String getActionFired()
          Get the modified ID of the fired action.
 java.util.List<MenuItem> getBreadcrumb()
           
 java.util.List<MenuItem> getModel()
           
 NavigationBean getNavigation()
           
 java.lang.String getOrientation()
          Get the orientation of the menu ("horizontal" or "vertical")
 java.lang.String getParam()
          Get the param value for the menu item which fired the event.
 void primaryListener(javax.faces.event.ActionEvent e)
          Identify the ID of the element that fired the event and return it in a form suitable for display.
 void selectItem(MenuItem menu, PageContentBean page)
          Selects the menu item and shows the passed page content(if any)
 void selectItem(java.lang.String itemId, PageContentBean page)
          Selects the menu item, using the item ID but shows the passed page content(if any).
 void setModel(java.util.List<MenuItem> model)
           
 void setNavigation(NavigationBean navigation)
           
 void setOrientation(java.lang.String orientation)
          Set the orientation of the menu ("horizontal" or "vertical").
 void setParam(java.lang.String param)
          Set the param value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static org.apache.commons.logging.Log logger

model

protected java.util.List<MenuItem> model

breadcrumb

protected java.util.List<MenuItem> breadcrumb

itemCache

protected java.util.Map<java.lang.String,MenuItem> itemCache

accessibleMenues

protected java.util.List<com.logicaldoc.core.security.Menu> accessibleMenues
Constructor Detail

MenuBarBean

public MenuBarBean()
Method Detail

getParam

public java.lang.String getParam()
Get the param value for the menu item which fired the event.

Returns:
the param value

setParam

public void setParam(java.lang.String param)
Set the param value.


getActionFired

public java.lang.String getActionFired()
Get the modified ID of the fired action.

Returns:
the modified ID

getModel

public java.util.List<MenuItem> getModel()

setModel

public void setModel(java.util.List<MenuItem> model)

selectItem

public void selectItem(java.lang.String itemId,
                       PageContentBean page)
Selects the menu item, using the item ID but shows the passed page content(if any).

Parameters:
menu - The item to open
page - Overrides what specified by the menu

primaryListener

public void primaryListener(javax.faces.event.ActionEvent e)
Identify the ID of the element that fired the event and return it in a form suitable for display.

Parameters:
e - the event that fired the listener

selectItem

public void selectItem(MenuItem menu,
                       PageContentBean page)
Selects the menu item and shows the passed page content(if any)

Parameters:
menu - The item to open
page - Overrides what specified by the menu

getOrientation

public java.lang.String getOrientation()
Get the orientation of the menu ("horizontal" or "vertical")

Returns:
the orientation of the menu

setOrientation

public void setOrientation(java.lang.String orientation)
Set the orientation of the menu ("horizontal" or "vertical").

Parameters:
orientation - the new orientation of the menu

createMenuItems

protected void createMenuItems()
Finds all first-level menus accessible by the current user


createMenuItem

protected MenuItem createMenuItem(java.lang.String label,
                                  java.lang.String id,
                                  java.lang.String actionListener,
                                  java.lang.String action,
                                  java.lang.String link,
                                  java.lang.String icon,
                                  boolean immediate,
                                  java.lang.String target,
                                  PageContentBean content)

createMenuItem

protected MenuItem createMenuItem(java.lang.String label,
                                  java.lang.String id,
                                  java.lang.String actionListener,
                                  java.lang.String action,
                                  java.lang.String link,
                                  java.lang.String icon,
                                  boolean immediate,
                                  java.lang.String target,
                                  java.lang.String styleClass,
                                  PageContentBean content)

setNavigation

public void setNavigation(NavigationBean navigation)

getNavigation

public NavigationBean getNavigation()

getBreadcrumb

public java.util.List<MenuItem> getBreadcrumb()


Copyright © 2008-2010 Logical Objects. All Rights Reserved.