public class Param extends javax.faces.component.UIParameter implements ParamHolder
UIParameter to implement ValueHolder
and thus support a Converter to convert the supplied value to string, if necessary.
You can use it the same way as <f:param>, you only need to change f: into
o: to get the extra support for a Converter by usual means via the converter
attribute of the tag, or the nested <f:converter> tag, or just automatically if a converter is
already registered for the target class.
Also, if no value is specified, but children are present, then the encoded output of children will be returned as
value. This is useful when you want to supply JSF components or HTML as parameter of an unescaped
<h:outputFormat>. For example,
<h:outputFormat value="#{bundle.paragraph}" escape="false">
<o:param><h:link outcome="contact" value="#{bundle.contact}" /></o:param>
</h:outputFormat>
with this bundle
paragraph = Please {0} for more information.
contact = contact us
will result in the link being actually encoded as output format parameter value.
| Modifier and Type | Field and Description |
|---|---|
static String |
COMPONENT_TYPE |
| Constructor and Description |
|---|
Param() |
| Modifier and Type | Method and Description |
|---|---|
void |
encodeAll(javax.faces.context.FacesContext context) |
javax.faces.convert.Converter |
getConverter() |
Object |
getLocalValue()
Returns the original, unconverted value of the parameter.
|
Object |
getValue()
Returns the converted value of the parameter.
|
void |
setConverter(javax.faces.convert.Converter converter) |
getFamily, getName, isDisable, setDisable, setName, setValueaddClientBehavior, addFacesListener, broadcast, clearInitialState, decode, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientBehaviors, getClientId, getDefaultEventName, getEventNames, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, invokeOnComponent, isRendered, isTransient, markInitialState, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, queueEvent, removeFacesListener, restoreAttachedState, restoreState, saveAttachedState, saveState, setId, setParent, setRendered, setRendererType, setTransient, setValueBindinggetClientId, getCompositeComponentParent, getContainerClientId, getCurrentComponent, getCurrentCompositeComponent, getListenersForEventClass, getNamingContainer, getResourceBundleMap, getStateHelper, getStateHelper, getValueExpression, initialStateMarked, isCompositeComponent, isInView, isVisitable, popComponentFromEL, processEvent, pushComponentToEL, setInView, setValueExpression, subscribeToEvent, unsubscribeFromEvent, visitTreeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetNamepublic static final String COMPONENT_TYPE
public javax.faces.convert.Converter getConverter()
getConverter in interface javax.faces.component.ValueHolderpublic void setConverter(javax.faces.convert.Converter converter)
setConverter in interface javax.faces.component.ValueHolderpublic Object getLocalValue()
ParamHoldergetLocalValue in interface javax.faces.component.ValueHoldergetLocalValue in interface ParamHolderpublic Object getValue()
ParamHolderApplication.createConverter(Class), passing the value's class, then return the result of
Converter.getAsString(javax.faces.context.FacesContext, javax.faces.component.UIComponent, Object),
otherwise return the original value of the parameter.getValue in interface javax.faces.component.ValueHoldergetValue in interface ParamHoldergetValue in class javax.faces.component.UIParameterConverter.getAsString(javax.faces.context.FacesContext, javax.faces.component.UIComponent, Object)public void encodeAll(javax.faces.context.FacesContext context)
throws IOException
encodeAll in class javax.faces.component.UIComponentIOExceptionCopyright © 2012–2014 OmniFaces. All rights reserved.