org.apache.myfaces.trinidad.menu
Class ItemNode

java.lang.Object
  extended by org.apache.myfaces.trinidad.menu.MenuNode
      extended by org.apache.myfaces.trinidad.menu.ItemNode
Direct Known Subclasses:
ImmutableItemNode

public class ItemNode
extends MenuNode

Code specific to a Menu Model's ItemNode.


Constructor Summary
ItemNode()
          Constructs an ItemNode
 
Method Summary
 void actionListener(javax.faces.event.ActionEvent event)
           
 String doAction()
          Gets the value of the node's action property.
 String getActionListener()
          getActionListener - gets the value of the Menu Node's actionListener attribute.
 String getActionListenerProperty()
           
 String getActionProperty()
           
 Map<String,String> getCustomPropList()
          Get the Attributes containing the custom attributes on this node.
 Map<String,String> getCustomPropListProperty()
           
 String getDestination()
          Gets the value of the node's destination property.
 String getDestinationProperty()
           
 boolean getImmediate()
          Gets the immediate attribute of the menu item.
 String getImmediateProperty()
           
 String getLaunchListener()
          getLaunchListener - gets the value of the Menu Node's launchListener attribute.
 String getLaunchListenerProperty()
           
 String getReturnListener()
          getReturnListener - gets the value of the Menu Node's returnListener attribute.
 String getReturnListenerProperty()
           
 String getTargetFrame()
          getTargetFrame - gets the value of the Destination Node's targetFrame attribute
 String getTargetFrameProperty()
           
 MenuNode getThreadSafeCopy()
          Construct a thread safe version of this object and return it.
 boolean getUseWindow()
          Gets the useWindow attribute of the menu item.
 String getUseWindowProperty()
           
 int getWindowHeight()
          Gets the windowHeight attribute of the menu item.
 String getWindowHeightProperty()
           
 int getWindowWidth()
          Gets the windowWidth attribute of the menu item.
 String getWindowWidthProperty()
           
 void setAction(String action)
          Sets the action of the node.
 void setActionListener(String actionListener)
          setActionListener - sets the value of the Menu Node's actionListener atribute.
 void setCustomPropList(Map<String,String> attrMap)
          Set the list of custom attributes.
 void setDestination(String destination)
          Sets the destination of the node.
 void setImmediate(boolean immediate)
          Sets the immediate attribute of the menu item.
 void setImmediate(String immediateStr)
          Sets the immediate attribute of the menu item.
 void setLaunchListener(String launchListener)
          setLaunchListener - sets the value of the Menu Node's launchListener atribute.
 void setReturnListener(String returnListener)
          setReturnListener - sets the value of the Menu Node's returnListener atribute.
 void setTargetFrame(String targetFrame)
          setTargetFrame - sets the value of the Destination Node's targetFrame attribute
 void setUseWindow(boolean useWindow)
          Sets the useWindow attribute of the menu item.
 void setUseWindow(String useWindowStr)
          Sets the useWindow attribute of the menu item.
 void setWindowHeight(int windowHeight)
          Sets the windowHeight attribute of the menu item.
 void setWindowHeight(String windowHeightStr)
          Sets the windowHeight attribute of the menu item.
 void setWindowWidth(int windowWidth)
          Sets the windowWidth attribute of the menu item.
 void setWindowWidth(String windowWidthStr)
          Sets the windowWidth attribute of the menu item.
 
Methods inherited from class org.apache.myfaces.trinidad.menu.MenuNode
getAccessKey, getAccessKeyProperty, getBundleKeyProperty, getBundleNameProperty, getChildren, getChildrenProperty, getDefaultFocusPath, getDefaultFocusPathProperty, getDisabled, getDisabledProperty, getFocusViewId, getFocusViewIdProperty, getHandlerId, getHandlerIdProperty, getIcon, getIconProperty, getId, getIdProperty, getLabel, getLabelAndAccessKey, getLabelAndAccessKeyProperty, getLabelProperty, getModelId, getModelIdProperty, getReadOnly, getReadOnlyProperty, getRefNode, getRendered, getRenderedProperty, getRootId, getRootIdProperty, getRootModel, getRootModelKey, getRootModelKeyProperty, getUniqueId, getUniqueIdProperty, getVisible, getVisibleProperty, postSelectedNode, setAccessKey, setAccessKey, setChildren, setDefaultFocusPath, setDefaultFocusPath, setDisabled, setDisabled, setFocusViewId, setHandlerId, setIcon, setId, setLabel, setLabelAndAccessKey, setModelId, setReadOnly, setReadOnly, setRendered, setRendered, setResBundleKey, setResBundleName, setRootId, setRootModelKey, setVisible, setVisible
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ItemNode

public ItemNode()
Constructs an ItemNode

Method Detail

setAction

public void setAction(String action)
Sets the action of the node. This is obtained from the menu metadata file and is the string value of the "action" property.

Parameters:
action - - the string value of the ItemNode's "action" property.

doAction

public String doAction()
Gets the value of the node's action property. The action attr value could be one of 2 things: 1) An EL expression 2) An outcome referencing a navigation rule in the faces_config file. Since this method is called only when an ItemNode is clicked, the model is notified that this node is the currently selected node.

Overrides:
doAction in class MenuNode
Returns:
String value of the ItemNode's "action" property.

setActionListener

public void setActionListener(String actionListener)
setActionListener - sets the value of the Menu Node's actionListener atribute.

Parameters:
actionListener - - El expression method reference to an action listener

getActionListener

public String getActionListener()
getActionListener - gets the value of the Menu Node's actionListener attribute.

Returns:
String - method reference to an action listener

actionListener

public void actionListener(javax.faces.event.ActionEvent event)

setLaunchListener

public void setLaunchListener(String launchListener)
setLaunchListener - sets the value of the Menu Node's launchListener atribute.

Parameters:
launchListener - - El expression method reference to a launch listener

getLaunchListener

public String getLaunchListener()
getLaunchListener - gets the value of the Menu Node's launchListener attribute.

Returns:
String - method reference to an launch listener

setReturnListener

public void setReturnListener(String returnListener)
setReturnListener - sets the value of the Menu Node's returnListener atribute.

Parameters:
returnListener - - El expression method reference to a return listener

getReturnListener

public String getReturnListener()
getReturnListener - gets the value of the Menu Node's returnListener attribute.

Returns:
String - method reference to an return listener

setImmediate

public void setImmediate(boolean immediate)
Sets the immediate attribute of the menu item.

Parameters:
immediate - - boolean indicating whether or not data validation - client-side or server-side - should take place when events are generated by this component.

setImmediate

public void setImmediate(String immediateStr)
Sets the immediate attribute of the menu item.

Parameters:
immediateStr - - string representing a boolean value or an EL expression

getImmediate

public boolean getImmediate()
Gets the immediate attribute of the menu item.

Returns:
boolean - indicating whether or not data validation - client-side or server-side - should take place when events are generated by this component.

setUseWindow

public void setUseWindow(boolean useWindow)
Sets the useWindow attribute of the menu item.

Parameters:
useWindow - - boolean indicating whether or not to use a new window when launching dialogs.

setUseWindow

public void setUseWindow(String useWindowStr)
Sets the useWindow attribute of the menu item.

Parameters:
useWindowStr - - string representing a boolean value or an EL Expression

getUseWindow

public boolean getUseWindow()
Gets the useWindow attribute of the menu item.

Returns:
boolean - indicating whether or not to use a new window when launching dialogs.

setWindowHeight

public void setWindowHeight(int windowHeight)
Sets the windowHeight attribute of the menu item.

Parameters:
windowHeight - - int height of the window, if this command is used to launch a window.

setWindowHeight

public void setWindowHeight(String windowHeightStr)
Sets the windowHeight attribute of the menu item.

Parameters:
windowHeightStr - - String Height of the window, if this command is used to launch a window. Could be an EL expression

getWindowHeight

public int getWindowHeight()
Gets the windowHeight attribute of the menu item.

Returns:
int height of the window, if this command is used to launch a window.

setWindowWidth

public void setWindowWidth(int windowWidth)
Sets the windowWidth attribute of the menu item.

Parameters:
windowWidth - - int width of the window, if this command is used to launch a window.

setWindowWidth

public void setWindowWidth(String windowWidthStr)
Sets the windowWidth attribute of the menu item.

Parameters:
windowWidthStr - - String width of the window, if this command is used to launch a window. Could be an EL expression

getWindowWidth

public int getWindowWidth()
Gets the windowWidth attribute of the menu item.

Returns:
int width of the window, if this command is used to launch a window.

setDestination

public void setDestination(String destination)
Sets the destination of the node. This is obtained from the metadata file and is the string value of the "destination" property.

Parameters:
destination - - either a URI or an EL method binding expression.

getDestination

public String getDestination()
Gets the value of the node's destination property. The destination attr value could be one of 2 things: 1) a uri 2) An EL expression So that the model can identify this node as the currently selected node, the node's id is appended to the destination as a parameter that is picked up when the getFocusRowKey() method of the model is called to get the focus path.

Overrides:
getDestination in class MenuNode
Returns:
destination - the String value of the destinationNode's "destination" property.

setTargetFrame

public void setTargetFrame(String targetFrame)
setTargetFrame - sets the value of the Destination Node's targetFrame attribute

Parameters:
targetFrame - - the target frame for the goCommandMenuItem.

getTargetFrame

public String getTargetFrame()
getTargetFrame - gets the value of the Destination Node's targetFrame attribute

Returns:
the target frame for the goCommandMenuItem.

getCustomPropList

public Map<String,String> getCustomPropList()
Get the Attributes containing the custom attributes on this node. This needs to be public so that the menu model can get them.

Returns:
Attributes list containing the custom attributes on this node

getCustomPropListProperty

public final Map<String,String> getCustomPropListProperty()

getDestinationProperty

public final String getDestinationProperty()

getTargetFrameProperty

public final String getTargetFrameProperty()

getActionProperty

public final String getActionProperty()

getActionListenerProperty

public final String getActionListenerProperty()

getLaunchListenerProperty

public final String getLaunchListenerProperty()

getReturnListenerProperty

public final String getReturnListenerProperty()

getImmediateProperty

public final String getImmediateProperty()

getUseWindowProperty

public final String getUseWindowProperty()

getWindowHeightProperty

public final String getWindowHeightProperty()

getWindowWidthProperty

public final String getWindowWidthProperty()

setCustomPropList

public void setCustomPropList(Map<String,String> attrMap)
Set the list of custom attributes.

Parameters:
attrMap - Map of attibute name/values for this node from MenuContentHandlerImpl

getThreadSafeCopy

public MenuNode getThreadSafeCopy()
Description copied from class: MenuNode
Construct a thread safe version of this object and return it.

Overrides:
getThreadSafeCopy in class MenuNode
Returns:
a thread safe copy of this object.


Copyright © 2001-2012 The Apache Software Foundation. All Rights Reserved.