public abstract class OnloadParam extends UIViewParameter
HashParam
and ScriptParam
.UIViewParameter.Reference
Modifier and Type | Field and Description |
---|---|
protected State |
state |
COMPONENT_FAMILY, COMPONENT_TYPE
ALWAYS_PERFORM_VALIDATION_WHEN_REQUIRED_IS_TRUE, CONVERSION_MESSAGE_ID, EMPTY_STRING_AS_NULL_PARAM_NAME, REQUIRED_MESSAGE_ID, UPDATE_MESSAGE_ID, VALIDATE_EMPTY_FIELDS_PARAM_NAME
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 and Description |
---|
OnloadParam()
The constructor instructs JSF to register all scripts during the render response phase if necessary.
|
Modifier and Type | Method and Description |
---|---|
protected abstract void |
decodeAll(FacesContext context)
Decode all relevant
OnloadParam components at once. |
protected void |
decodeImmediately(FacesContext context,
String submittedValue)
This basically acts as if immediate=true is set to save lifecycle overhead.
|
protected abstract String |
getEventValue(FacesContext context)
Returns the value of the
OmniFaces.OMNIFACES_EVENT_PARAM_NAME associated with the current component. |
protected String |
getInitScript(FacesContext context)
Returns script which should be executed upon initialization of a new view.
|
String |
getRender()
Returns a space separated string of client IDs to update on ajax response.
|
protected String |
getUpdateScript(FacesContext context)
Returns script which should be exeucted upon ajax update of the current view.
|
protected boolean |
isOnloadParamRequest(FacesContext context)
Returns
true if the current request was invoked by the current OnloadParam component. |
protected static boolean |
isOnloadParamRequest(FacesContext context,
String onloadEvent)
Returns
true if the current request is triggered by an onload param request of the given onload param event. |
void |
processDecodes(FacesContext context)
If this is invoked during an OnloadParam postback, then decode as if immediate=true to save lifecycle overhead.
|
void |
processUpdates(FacesContext context)
This override which does effectively nothing prevents JSF from performing update during non-onloadparam postbacks.
|
void |
processValidators(FacesContext context)
This override which does effectively nothing prevents JSF from performing validation during non-onloadparam postbacks.
|
void |
setRender(String render)
Sets a space separated string of client IDs to update on ajax response.
|
decode, encodeAll, getConvertedValue, getFamily, getName, getStringValue, getStringValueFromModel, getSubmittedValue, isImmediate, setName, setSubmittedValue, updateModel
addValidator, addValueChangeListener, clearInitialState, compareValues, getConverterMessage, getRequiredMessage, getValidator, getValidatorMessage, getValidators, getValue, getValueChangeListener, getValueChangeListeners, isEmpty, isLocalValueSet, isRequired, isValid, markInitialState, removeValidator, removeValueChangeListener, resetValue, restoreState, saveState, setConverterMessage, setImmediate, setLocalValueSet, setRequired, setRequiredMessage, setValid, setValidator, setValidatorMessage, setValue, setValueChangeListener, validate, validateValue
getConverter, getLocalValue, setConverter
addClientBehavior, addFacesListener, broadcast, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientBehaviors, getClientId, getDefaultEventName, getEventNames, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getListenersForEventClass, getParent, getPassThroughAttributes, getRenderer, getRendererType, getRendersChildren, getValueBinding, invokeOnComponent, isRendered, isTransient, processRestoreState, processSaveState, queueEvent, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding, subscribeToEvent, unsubscribeFromEvent
getClientId, getCompositeComponentParent, getContainerClientId, getCurrentComponent, getCurrentCompositeComponent, getNamingContainer, getPassThroughAttributes, getResourceBundleMap, getStateHelper, getStateHelper, getTransientStateHelper, getTransientStateHelper, getValueExpression, initialStateMarked, isCompositeComponent, isInView, isVisitable, popComponentFromEL, processEvent, pushComponentToEL, restoreTransientState, saveTransientState, setInView, setValueExpression, visitTree
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getConverter, getLocalValue, setConverter
protected final State state
public OnloadParam()
protected String getInitScript(FacesContext context)
context
- The involved faces context.protected String getUpdateScript(FacesContext context)
context
- The involved faces context.protected abstract String getEventValue(FacesContext context)
OmniFaces.OMNIFACES_EVENT_PARAM_NAME
associated with the current component.context
- The involved faces context.OmniFaces.OMNIFACES_EVENT_PARAM_NAME
associated with the current component.protected boolean isOnloadParamRequest(FacesContext context)
true
if the current request was invoked by the current OnloadParam
component.context
- The involved faces context.true
if the current request was invoked by the current OnloadParam
component.public void processDecodes(FacesContext context)
processDecodes
in class UIInput
protected abstract void decodeAll(FacesContext context)
OnloadParam
components at once.context
- The involved faces context.protected void decodeImmediately(FacesContext context, String submittedValue)
context
- The involved faces context.submittedValue
- The submitted value.public void processValidators(FacesContext context)
processValidators
in class UIViewParameter
public void processUpdates(FacesContext context)
processUpdates
in class UIInput
public String getRender()
public void setRender(String render)
render
- A space separated string of client IDs to update on ajax response.protected static boolean isOnloadParamRequest(FacesContext context, String onloadEvent)
true
if the current request is triggered by an onload param request of the given onload param event.context
- The involved faces context.onloadEvent
- The onload param event.true
if the current request is triggered by an onload param request of the given onload param event.Copyright © 2012–2020 OmniFaces. All rights reserved.