org.apache.myfaces.tobago.component
Class UIMenuCommand

java.lang.Object
  extended by javax.faces.component.UIComponent
      extended by javax.faces.component.UIComponentBase
          extended by javax.faces.component.UICommand
              extended by org.apache.myfaces.tobago.internal.component.AbstractUICommandBase
                  extended by org.apache.myfaces.tobago.component.UIMenuCommand
All Implemented Interfaces:
EventListener, javax.faces.component.ActionSource, javax.faces.component.ActionSource2, javax.faces.component.PartialStateHolder, javax.faces.component.StateHolder, javax.faces.event.ComponentSystemEventListener, javax.faces.event.FacesListener, javax.faces.event.SystemEventListenerHolder, OnComponentPopulated, SupportsMarkup, SupportsRenderedPartially

public class UIMenuCommand
extends AbstractUICommandBase
implements SupportsMarkup

Renders a menu item. (This tag was renamed from tc:menuItem since Tobago 1.5.0) UIComponent class, generated from template component2.0.stg with class MenuCommandTagDeclaration.


Field Summary
static String COMPONENT_FAMILY
           
static String COMPONENT_TYPE
           
 
Fields inherited from class javax.faces.component.UIComponent
BEANINFO_KEY, bindings, COMPOSITE_COMPONENT_TYPE_KEY, COMPOSITE_FACET_NAME, CURRENT_COMPONENT, CURRENT_COMPOSITE_COMPONENT, FACETS_KEY, VIEW_LOCATION_KEY
 
Fields inherited from interface org.apache.myfaces.tobago.component.OnComponentPopulated
MARKER
 
Constructor Summary
UIMenuCommand()
           
 
Method Summary
 Character getAccessKey()
          Deprecated.  
 Markup getCurrentMarkup()
           
 String getFamily()
           
 String getImage()
          Url to an image to display.
 String getLabel()
          Text value to display as label.
 String getLabelWithAccessKey()
          Deprecated.  
 String getLink()
          Link to an arbitrary URL, either an internal link or an external link.
 Markup getMarkup()
           
 String getOnclick()
          Script to be invoked when clicked
 String[] getRenderedPartially()
          Indicate the partially rendered Components in a case of a submit.
 String getResource()
          Link to an internal resource.
 String getTarget()
          Name of a frame where the resource retrieved via this hyperlink is to be displayed.
 boolean isDisabled()
          Flag indicating that this element is disabled.
 boolean isJsfResource()
          Flag indicating that the resource referenced by the resource attribute is a jsf resource.
 boolean isOmit()
          Flag indicating that the action of this element, will not be executed from client side (e. g. when the user clicks a button.
 boolean isTransition()
          Specify, if the command calls an JSF-Action.
 Object saveState(javax.faces.context.FacesContext context)
           
 void setAccessKey(Character accessKey)
          Deprecated. 
 void setCurrentMarkup(Markup currentMarkup)
           
 void setDisabled(boolean disabled)
           
 void setImage(String image)
           
 void setJsfResource(boolean jsfResource)
           
 void setLabel(String label)
           
 void setLabelWithAccessKey(String labelWithAccessKey)
          Deprecated. 
 void setLink(String link)
           
 void setMarkup(Markup markup)
           
 void setOmit(boolean omit)
           
 void setOnclick(String onclick)
           
 void setRenderedPartially(String[] renderedPartially)
           
 void setResource(String resource)
           
 void setTarget(String target)
           
 void setTransition(boolean transition)
           
 
Methods inherited from class org.apache.myfaces.tobago.internal.component.AbstractUICommandBase
onComponentPopulated, processDecodes, queueEvent
 
Methods inherited from class javax.faces.component.UICommand
addActionListener, broadcast, getAction, getActionExpression, getActionListener, getActionListeners, getValue, isImmediate, removeActionListener, setAction, setActionExpression, setActionListener, setImmediate, setValue
 
Methods inherited from class javax.faces.component.UIComponentBase
addClientBehavior, addFacesListener, clearInitialState, decode, encodeAll, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientBehaviors, getClientId, getDefaultEventName, getEventNames, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, initialStateMarked, invokeOnComponent, isRendered, isTransient, markInitialState, processRestoreState, processSaveState, processUpdates, processValidators, removeFacesListener, restoreAttachedState, restoreState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding, visitTree
 
Methods inherited from class javax.faces.component.UIComponent
getClientId, getCompositeComponentParent, getContainerClientId, getCurrentComponent, getCurrentCompositeComponent, getListenersForEventClass, getNamingContainer, getResourceBundleMap, getStateHelper, getStateHelper, getValueExpression, isCompositeComponent, isInView, isVisitable, popComponentFromEL, processEvent, pushComponentToEL, setInView, setValueExpression, subscribeToEvent, unsubscribeFromEvent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COMPONENT_TYPE

public static final String COMPONENT_TYPE
See Also:
Constant Field Values

COMPONENT_FAMILY

public static final String COMPONENT_FAMILY
See Also:
Constant Field Values
Constructor Detail

UIMenuCommand

public UIMenuCommand()
Method Detail

getFamily

public String getFamily()
Overrides:
getFamily in class javax.faces.component.UICommand

getMarkup

public Markup getMarkup()
Specified by:
getMarkup in interface SupportsMarkup

setMarkup

public void setMarkup(Markup markup)
Specified by:
setMarkup in interface SupportsMarkup

getAccessKey

@Deprecated
public Character getAccessKey()
Deprecated. 

Deprecated! Has not longer any function.


setAccessKey

@Deprecated
public void setAccessKey(Character accessKey)
Deprecated. 


getLabelWithAccessKey

@Deprecated
public String getLabelWithAccessKey()
Deprecated. 

Deprecated! Use 'label' instead. Text value to display as label. If text contains an underscore the next character overwrites 'accesskey'.


setLabelWithAccessKey

@Deprecated
public void setLabelWithAccessKey(String labelWithAccessKey)
Deprecated. 


getLink

public String getLink()
Link to an arbitrary URL, either an internal link or an external link.
internal absolute link
Starts with a slash '/' character. The context path will be added. A session id will be added, if needed.
external link
Starts with protocol followed by a colon ':' character. The link will not be modified.
internal relative link
Any other strings. A session id will be added, if needed.

Specified by:
getLink in class AbstractUICommandBase

setLink

public void setLink(String link)

getResource

public String getResource()
Link to an internal resource. Resources will be processed by the resource management. E. g. define help.html and it will be served help_es.html or help_de.html if available. For JSF-Pages you have to set the jsfResource attribute.

Specified by:
getResource in class AbstractUICommandBase

setResource

public void setResource(String resource)

isJsfResource

public boolean isJsfResource()
Flag indicating that the resource referenced by the resource attribute is a jsf resource. That means that the url has to be processed to change the prefix or suffix (e. g. *.jsf or /faces/*). Default is false.
Default: false

Specified by:
isJsfResource in class AbstractUICommandBase

setJsfResource

public void setJsfResource(boolean jsfResource)

getImage

public String getImage()
Url to an image to display.


setImage

public void setImage(String image)

isTransition

public boolean isTransition()
Specify, if the command calls an JSF-Action. Useful to switch off the Double-Submit-Check and Waiting-Behavior.
Default: true

Specified by:
isTransition in class AbstractUICommandBase

setTransition

public void setTransition(boolean transition)

getLabel

public String getLabel()
Text value to display as label. If text contains an underscore the next character is used as accesskey.


setLabel

public void setLabel(String label)

isOmit

public boolean isOmit()
Flag indicating that the action of this element, will not be executed from client side (e. g. when the user clicks a button. When setting this value to true, the action will not be executed by the Tobago, but it can executed by JavaScript. This attribute is useful, when you want to add JavaScript event handlers to commands manually. In this case you usually don't want a submit with a full reload of the page.
Default: false

Specified by:
isOmit in class AbstractUICommandBase

setOmit

public void setOmit(boolean omit)

getCurrentMarkup

public Markup getCurrentMarkup()
Specified by:
getCurrentMarkup in interface SupportsMarkup

setCurrentMarkup

public void setCurrentMarkup(Markup currentMarkup)
Specified by:
setCurrentMarkup in interface SupportsMarkup

getTarget

public String getTarget()
Name of a frame where the resource retrieved via this hyperlink is to be displayed.

Specified by:
getTarget in class AbstractUICommandBase

setTarget

public void setTarget(String target)

getRenderedPartially

public String[] getRenderedPartially()
Indicate the partially rendered Components in a case of a submit.

Specified by:
getRenderedPartially in interface SupportsRenderedPartially
Specified by:
getRenderedPartially in class AbstractUICommandBase

setRenderedPartially

public void setRenderedPartially(String[] renderedPartially)
Specified by:
setRenderedPartially in interface SupportsRenderedPartially

getOnclick

public String getOnclick()
Script to be invoked when clicked

Specified by:
getOnclick in class AbstractUICommandBase

setOnclick

public void setOnclick(String onclick)

isDisabled

public boolean isDisabled()
Flag indicating that this element is disabled.
Default: false


setDisabled

public void setDisabled(boolean disabled)

saveState

public Object saveState(javax.faces.context.FacesContext context)
Specified by:
saveState in interface javax.faces.component.StateHolder
Overrides:
saveState in class javax.faces.component.UIComponentBase


Copyright © 2002-2014 The Apache Software Foundation. All Rights Reserved.