Package org.omnifaces.component.output
Class OutputLabel
- java.lang.Object
-
- jakarta.faces.component.UIComponent
-
- jakarta.faces.component.UIComponentBase
-
- jakarta.faces.component.UIOutput
-
- jakarta.faces.component.html.HtmlOutputLabel
-
- org.omnifaces.component.output.OutputLabel
-
- All Implemented Interfaces:
ClientBehaviorHolder
,PartialStateHolder
,StateHolder
,TransientStateHolder
,ValueHolder
,ComponentSystemEventListener
,FacesListener
,SystemEventListenerHolder
,EventListener
public class OutputLabel extends HtmlOutputLabel
The
<o:outputLabel>
is a component that extends the standard<h:outputLabel>
with support for automatically setting its value as the label of the component identified by itsfor
attribute (if any). This way there's no need to duplicate the very same label into thelabel
attribute of the input component. After submitting the form without having entered a value, a validation message is posted that should contain the label printed before the input instead of some generated ID.You can use it the same way as
<h:outputLabel>
, you only need to changeh:
intoo:
.- Author:
- Arjan Tijms
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class jakarta.faces.component.html.HtmlOutputLabel
HtmlOutputLabel.PropertyKeys
-
-
Field Summary
Fields Modifier and Type Field Description static String
COMPONENT_TYPE
The component type, which is "org.omnifaces.component.output.OutputLabel".-
Fields inherited from class jakarta.faces.component.UIOutput
COMPONENT_FAMILY
-
Fields inherited from class jakarta.faces.component.UIComponent
ATTRS_WITH_DECLARED_DEFAULT_VALUES, BEANINFO_KEY, bindings, COMPOSITE_COMPONENT_TYPE_KEY, COMPOSITE_FACET_NAME, CURRENT_COMPONENT, CURRENT_COMPOSITE_COMPONENT, FACETS_KEY, HONOR_CURRENT_COMPONENT_ATTRIBUTES_PARAM_NAME, VIEW_LOCATION_KEY
-
-
Constructor Summary
Constructors Constructor Description OutputLabel()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
processEvent(ComponentSystemEvent event)
-
Methods inherited from class jakarta.faces.component.html.HtmlOutputLabel
getAccesskey, getDefaultEventName, getDir, getEventNames, getFor, getLang, getOnblur, getOnclick, getOndblclick, getOnfocus, getOnkeydown, getOnkeypress, getOnkeyup, getOnmousedown, getOnmousemove, getOnmouseout, getOnmouseover, getOnmouseup, getRole, getStyle, getStyleClass, getTabindex, getTitle, isEscape, setAccesskey, setDir, setEscape, setFor, setLang, setOnblur, setOnclick, setOndblclick, setOnfocus, setOnkeydown, setOnkeypress, setOnkeyup, setOnmousedown, setOnmousemove, setOnmouseout, setOnmouseover, setOnmouseup, setRole, setStyle, setStyleClass, setTabindex, setTitle
-
Methods inherited from class jakarta.faces.component.UIOutput
clearInitialState, getConverter, getFamily, getLocalValue, getValue, markInitialState, resetValue, restoreState, saveState, setConverter, setValue
-
Methods inherited from class jakarta.faces.component.UIComponentBase
addClientBehavior, addFacesListener, broadcast, decode, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientBehaviors, getClientId, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getListenersForEventClass, getParent, getPassThroughAttributes, getRenderer, getRendererType, getRendersChildren, getValueBinding, invokeOnComponent, isRendered, isTransient, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, queueEvent, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding, subscribeToEvent, unsubscribeFromEvent
-
Methods inherited from class jakarta.faces.component.UIComponent
encodeAll, getClientId, getCompositeComponentParent, getContainerClientId, getCurrentComponent, getCurrentCompositeComponent, getNamingContainer, getPassThroughAttributes, getResourceBundleMap, getStateHelper, getStateHelper, getTransientStateHelper, getTransientStateHelper, getValueExpression, initialStateMarked, isCompositeComponent, isInView, isVisitable, popComponentFromEL, pushComponentToEL, restoreTransientState, saveTransientState, setInView, setValueExpression, visitTree
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface jakarta.faces.component.behavior.ClientBehaviorHolder
addClientBehavior, getClientBehaviors
-
-
-
-
Field Detail
-
COMPONENT_TYPE
public static final String COMPONENT_TYPE
The component type, which is "org.omnifaces.component.output.OutputLabel".- See Also:
- Constant Field Values
-
-
Method Detail
-
processEvent
public void processEvent(ComponentSystemEvent event)
- Specified by:
processEvent
in interfaceComponentSystemEventListener
- Overrides:
processEvent
in classUIComponent
-
-