public class UIToolBar extends AbstractUIToolBar implements Visual
'button'
and 'link'
tags.
These are rendered by ToolbarRenderer, so the result has
no difference.
To add an drop down menu to a button add a facet 'dropDownMenu'
containing a
<tc:menu>
tag to the button. Label's and Image's on those menu tag's are ignored
and replaced by the renderer.
<tc:button onclick="alert('test 0')" label="Alert 0" > <f:facet name="dropDownMenu"> <tc:menu> <tc:menuCommand onclick="alert('test 1')" label="Alert 1"/> <tc:menuCommand onclick="alert('test 2')" label="Alert 2"/> <tc:menuCommand onclick="alert('test 3')" label="Alert 3"/> </tc:menu> </f:facet> </tc:button>UIComponent class, generated from template
component.stg
with class
ToolBarTagDeclaration
.Modifier and Type | Field and Description |
---|---|
static String |
COMPONENT_FAMILY |
static String |
COMPONENT_TYPE |
ICON_BIG, ICON_OFF, ICON_SMALL, LABEL_BOTTOM, LABEL_OFF, LABEL_RIGHT, ORIENTATION_LEFT, ORIENTATION_RIGHT
Constructor and Description |
---|
UIToolBar() |
Modifier and Type | Method and Description |
---|---|
Markup |
getCurrentMarkup() |
CustomClass |
getCustomClass()
Sets a CSS class in its parent, if the parent supports it.
|
String |
getFamily() |
String |
getIconSize()
Size of button images, possible values are: small, big, off.
|
String |
getLabelPosition()
Position of the button label, possible values are: right, bottom, off.
|
Markup |
getMarkup() |
String |
getOrientation()
Orientation of toolbar
Default: left Allowed Values: left,right |
Style |
getStyle()
For internal use.
|
String |
getTip()
Text value to display as tooltip.
|
Object |
saveState(javax.faces.context.FacesContext context) |
void |
setCurrentMarkup(Markup currentMarkup) |
void |
setCustomClass(CustomClass customClass) |
void |
setIconSize(String iconSize) |
void |
setLabelPosition(String labelPosition) |
void |
setMarkup(Markup markup) |
void |
setOrientation(String orientation) |
void |
setStyle(Style style) |
void |
setTip(String tip) |
addClientBehavior, addFacesListener, broadcast, 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, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, queueEvent, removeFacesListener, restoreAttachedState, restoreState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding, visitTree
getClientId, getCompositeComponentParent, getContainerClientId, getCurrentComponent, getCurrentCompositeComponent, getListenersForEventClass, getNamingContainer, getResourceBundleMap, getStateHelper, getStateHelper, getValueExpression, isCompositeComponent, isInView, isVisitable, popComponentFromEL, processEvent, pushComponentToEL, setInView, setValueExpression, subscribeToEvent, unsubscribeFromEvent
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getRendererType
public static final String COMPONENT_TYPE
public static final String COMPONENT_FAMILY
public String getFamily()
getFamily
in class javax.faces.component.UIPanel
public String getOrientation()
left
left,right
public void setOrientation(String orientation)
public String getIconSize()
small
small,big,off
public void setIconSize(String iconSize)
public Style getStyle()
public Markup getCurrentMarkup()
getCurrentMarkup
in interface Visual
public void setCurrentMarkup(Markup currentMarkup)
setCurrentMarkup
in interface Visual
public String getLabelPosition()
bottom
bottom,right,off
public void setLabelPosition(String labelPosition)
public CustomClass getCustomClass()
<tc:in> <tc:style customClass="my-emphasized"/> </tc:in>One capability is, to used external CSS libs.
getCustomClass
in interface Visual
public void setCustomClass(CustomClass customClass)
setCustomClass
in interface Visual
public String getTip()
public void setTip(String tip)
public Object saveState(javax.faces.context.FacesContext context)
saveState
in interface javax.faces.component.StateHolder
saveState
in class javax.faces.component.UIComponentBase
Copyright © 2002–2015 The Apache Software Foundation. All rights reserved.