public abstract class UIXEditableValue extends UIXValue implements javax.faces.component.EditableValueHolder
| Type | Phases | Description |
|---|---|---|
javax.faces.event.ValueChangeEvent |
Process Validations Apply Request Values |
The valueChange event is delivered when the value attribute is changed. |
org.apache.myfaces.trinidad.event.AttributeChangeEvent |
Invoke Application Apply Request Values |
Event delivered to describe an attribute change. Attribute change events are not delivered for any programmatic change to a property. They are only delivered when a renderer changes a property without the application's specific request. An example of an attribute change event might include the width of a column that supported client-side resizing. |
UIXComponentBase.ComponentSystemEventListenerWrapper| Modifier and Type | Field and Description |
|---|---|
static String |
COMPONENT_FAMILY |
static String |
COMPONENT_TYPE |
static String |
CONVERSION_MESSAGE_ID |
static PropertyKey |
IMMEDIATE_KEY |
static PropertyKey |
LOCAL_VALUE_SET_KEY |
static PropertyKey |
REQUIRED_KEY |
static PropertyKey |
REQUIRED_MESSAGE_DETAIL_KEY |
static String |
REQUIRED_MESSAGE_ID |
static PropertyKey |
SUBMITTED_VALUE_KEY |
static String |
TRINIDAD_BEAN_VALIDATION_AVAILABLE |
static String |
TRINIDAD_EMPTY_VALUES_AS_NULL_PARAM_NAME |
static FacesBean.Type |
TYPE |
static PropertyKey |
VALID_KEY |
static String |
VALIDATE_EMPTY_FIELDS_PARAM_NAME |
static PropertyKey |
VALIDATOR_KEY |
static PropertyKey |
VALIDATORS_KEY |
static PropertyKey |
VALUE_CHANGE_LISTENER_KEY |
CONVERTER_KEY, VALUE_KEYBINDING_KEY, ID_KEY, RENDERED_KEY, RENDERER_TYPE_KEY, TRANSIENT_KEY| Modifier | Constructor and Description |
|---|---|
protected |
UIXEditableValue()
Construct an instance of the UIXEditableValue.
|
protected |
UIXEditableValue(String rendererType)
Construct an instance of the UIXEditableValue.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addValidator(javax.faces.validator.Validator validator) |
void |
addValueChangeListener(javax.faces.event.ValueChangeListener listener)
Adds a valueChange listener.
|
void |
addValueUpdatedListener(ValueUpdatedListener listener)
Adds a ValueUpdatedListener to the component to handle ValueUpdatedEvent which is queued
within updateModel method.
|
void |
broadcast(javax.faces.event.FacesEvent event)
In addition to to the default
UIComponent.broadcast(javax.faces.event.FacesEvent)
processing, pass the ValueChangeEvent being broadcast to the
method referenced by valueChangeListener (if any). |
protected boolean |
compareValues(Object previous,
Object value)
Return
true if the new value is different from the
previous value. |
protected FacesBean.Type |
getBeanType() |
protected Object |
getConvertedValue(javax.faces.context.FacesContext context,
Object submittedValue) |
String |
getFamily() |
String |
getRequiredMessageDetail()
Gets the message to be displayed, if 'required' validation fails.
|
protected String |
getRequiredMessageKey() |
Object |
getSubmittedValue()
Gets the current submitted value.
|
javax.faces.el.MethodBinding |
getValidator()
Deprecated.
|
javax.faces.validator.Validator[] |
getValidators() |
javax.faces.el.MethodBinding |
getValueChangeListener()
Deprecated.
|
javax.faces.event.ValueChangeListener[] |
getValueChangeListeners()
Returns an array of attached valueChange listeners.
|
protected boolean |
isEmpty(Object value)
Return
true if the value is empty. |
boolean |
isImmediate()
Gets whether the value is converted and validated immediately in the Apply Request Values phase, or is handled in the Process Validators phase, the default.
|
boolean |
isLocalValueSet()
Gets whether a local value is currently set.
|
boolean |
isRequired()
Gets whether a non-null, non-empty value must be entered.
|
boolean |
isValid()
Gets whether the component's value is currently valid
|
void |
processDecodes(javax.faces.context.FacesContext context)
In addition to the standard
processDecodes behavior
inherited from UIXComponentBase, calls
validate() if the the immediate
property is true. |
void |
processUpdates(javax.faces.context.FacesContext context) |
void |
processValidators(javax.faces.context.FacesContext context) |
void |
removeValidator(javax.faces.validator.Validator validator) |
void |
removeValueChangeListener(javax.faces.event.ValueChangeListener listener)
Removes a valueChange listener.
|
void |
removeValueUpdatedListener(ValueUpdatedListener listener)
Removes a ValueUpdatedListener from the component.
|
void |
resetValue()
Convenience method to reset this component's value to an
uninitialized state, by resetting the local value and
submitted values to null (ensuring that
isLocalValueSet()
is false), and setting "valid" to true. |
void |
setImmediate(boolean immediate)
Sets whether the value is converted and validated immediately in the Apply Request Values phase, or is handled in the Process Validators phase, the default.
|
void |
setLocalValueSet(boolean localValueSet)
Sets whether a local value is currently set.
|
void |
setRequired(boolean required)
Sets whether a non-null, non-empty value must be entered.
|
void |
setRequiredMessageDetail(String requiredMessageDetail)
Sets the message to be displayed, if 'required' validation fails.
|
void |
setSubmittedValue(Object submittedValue)
Sets the current submitted value.
|
void |
setValid(boolean valid)
Sets whether the component's value is currently valid
|
void |
setValidator(javax.faces.el.MethodBinding validator)
Deprecated.
|
void |
setValueChangeListener(javax.faces.el.MethodBinding valueChangeListener)
Deprecated.
|
static boolean |
shouldInterpretEmptyStringSubmittedValuesAsNull(javax.faces.context.FacesContext context)
Checks if the
validate() should interpret an empty
submitted value should be handle as NULL |
static boolean |
shouldValidateEmptyFields(javax.faces.context.FacesContext context)
Checks if the
validateValue() should handle
empty field validation (part of BeanValidation and JSF 2.0). |
void |
updateModel(javax.faces.context.FacesContext context) |
void |
validate(javax.faces.context.FacesContext context) |
protected void |
validateValue(javax.faces.context.FacesContext context,
Object newValue) |
getConverter, getLocalValue, getValue, setConverter, setValueadaptMethodBinding, addAttributeChange, addAttributeChangeListener, addClientBehavior, addComponentChange, addComponentChange, addComponentChangeFilter, addFacesListener, broadcastToMethodBinding, broadcastToMethodExpression, clearCachedClientIds, clearInitialState, createFacesBean, decode, decodeChildren, decodeChildrenImpl, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributeChangeListener, getAttributeChangeListeners, getAttributes, getBooleanProperty, getChildCount, getChildren, getClientBehaviors, getClientId, getComponentChangeFilters, getContainerClientId, getDefaultEventName, getFacesBean, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacetNames, getFacets, getFacetsAndChildren, getId, getIntProperty, getLifecycleRenderer, getListenersForEventClass, getParent, getPassThroughAttributes, getProperty, getPropertyKey, getRenderedFacetsAndChildren, getRenderer, getRendererType, getRendersChildren, getValueBinding, getValueExpression, initialStateMarked, invokeOnChildrenComponents, invokeOnComponent, invokeOnNamingContainerComponent, isRendered, isTransient, markInitialState, processRestoreState, processSaveState, queueEvent, removeAttributeChangeListener, removeComponentChangeFilter, removeFacesListener, restoreState, satisfiesPartialTrigger, saveState, setAttributeChangeListener, setAttributeChangeListener, setBooleanProperty, setId, setIntProperty, setParent, setProperty, setRendered, setRendererType, setTransient, setupFlattenedChildrenContext, setupFlattenedContext, setValueBinding, setValueExpression, subscribeToEvent, tearDownFlattenedChildrenContext, tearDownFlattenedContext, toString, unsubscribeFromEvent, updateChildren, updateChildrenImpl, validateChildren, validateChildrenImpladdPartialTarget, broadcastInContext, clearCachedClientIds, defaultGetRenderedFacetsAndChildren, encodeFlattenedChild, encodeFlattenedChildren, getLogicalParent, getLogicalParent, getStateHelper, getStateHelper, isVisitable, partialEncodeVisit, processFlattenedChildren, processFlattenedChildren, processFlattenedChildren, processFlattenedChildren, setPartialTarget, setupChildrenEncodingContext, setupChildrenVisitingContext, setupEncodingContext, setUpEncodingContext, setupVisitingContext, tearDownChildrenEncodingContext, tearDownChildrenVisitingContext, tearDownEncodingContext, tearDownVisitingContext, visitAllChildren, visitChildren, visitChildren, visitTree, visitTreeencodeAll, getClientId, getCompositeComponentParent, getContainerClientId, getCurrentComponent, getCurrentCompositeComponent, getNamingContainer, getPassThroughAttributes, getResourceBundleMap, getTransientStateHelper, getTransientStateHelper, isCompositeComponent, isInView, popComponentFromEL, processEvent, pushComponentToEL, restoreTransientState, saveTransientState, setInViewpublic static final FacesBean.Type TYPE
public static final PropertyKey IMMEDIATE_KEY
public static final PropertyKey VALID_KEY
public static final PropertyKey REQUIRED_KEY
public static final PropertyKey LOCAL_VALUE_SET_KEY
public static final PropertyKey SUBMITTED_VALUE_KEY
public static final PropertyKey VALIDATOR_KEY
public static final PropertyKey VALUE_CHANGE_LISTENER_KEY
public static final PropertyKey REQUIRED_MESSAGE_DETAIL_KEY
public static final String COMPONENT_FAMILY
public static final String COMPONENT_TYPE
public static final PropertyKey VALIDATORS_KEY
public static final String REQUIRED_MESSAGE_ID
public static final String CONVERSION_MESSAGE_ID
public static final String TRINIDAD_BEAN_VALIDATION_AVAILABLE
public static final String VALIDATE_EMPTY_FIELDS_PARAM_NAME
public static final String TRINIDAD_EMPTY_VALUES_AS_NULL_PARAM_NAME
protected UIXEditableValue(String rendererType)
protected UIXEditableValue()
public void resetValue()
isLocalValueSet()
is false), and setting "valid" to true.resetValue in interface javax.faces.component.EditableValueHolderpublic void addValidator(javax.faces.validator.Validator validator)
addValidator in interface javax.faces.component.EditableValueHolderpublic javax.faces.validator.Validator[] getValidators()
getValidators in interface javax.faces.component.EditableValueHolderpublic void removeValidator(javax.faces.validator.Validator validator)
removeValidator in interface javax.faces.component.EditableValueHolderpublic void validate(javax.faces.context.FacesContext context)
public void broadcast(javax.faces.event.FacesEvent event)
throws javax.faces.event.AbortProcessingException
UIComponent.broadcast(javax.faces.event.FacesEvent)
processing, pass the ValueChangeEvent being broadcast to the
method referenced by valueChangeListener (if any).broadcast in class UIXComponentBaseevent - FacesEvent to be broadcastjavax.faces.event.AbortProcessingException - Signal the JavaServer Faces
implementation that no further processing on the current event
should be performedIllegalArgumentException - if the implementation class
of this FacesEvent is not supported by this componentNullPointerException - if event is
nullpublic void processDecodes(javax.faces.context.FacesContext context)
processDecodes behavior
inherited from UIXComponentBase, calls
validate() if the the immediate
property is true. Iif the component is invalid afterwards or
a RuntimeException is thrown, calls
FacesContext.renderResponse().processDecodes in class UIXComponentBasepublic void processUpdates(javax.faces.context.FacesContext context)
processUpdates in class UIXComponentBasepublic void processValidators(javax.faces.context.FacesContext context)
processValidators in class UIXComponentBasepublic void addValueUpdatedListener(ValueUpdatedListener listener)
public void removeValueUpdatedListener(ValueUpdatedListener listener)
public void updateModel(javax.faces.context.FacesContext context)
protected void validateValue(javax.faces.context.FacesContext context,
Object newValue)
protected String getRequiredMessageKey()
protected Object getConvertedValue(javax.faces.context.FacesContext context, Object submittedValue) throws javax.faces.convert.ConverterException
javax.faces.convert.ConverterExceptionprotected boolean compareValues(Object previous, Object value)
Return true if the new value is different from the
previous value.
previous - old value of this component (if any)value - new value of this component (if any)protected boolean isEmpty(Object value)
Return true if the value is empty.
public static boolean shouldInterpretEmptyStringSubmittedValuesAsNull(javax.faces.context.FacesContext context)
validate() should interpret an empty
submitted value should be handle as NULLpublic static boolean shouldValidateEmptyFields(javax.faces.context.FacesContext context)
validateValue() should handle
empty field validation (part of BeanValidation and JSF 2.0).public final boolean isImmediate()
isImmediate in interface javax.faces.component.EditableValueHolderpublic final void setImmediate(boolean immediate)
setImmediate in interface javax.faces.component.EditableValueHolderimmediate - the new immediate valuepublic final boolean isValid()
isValid in interface javax.faces.component.EditableValueHolderpublic final void setValid(boolean valid)
setValid in interface javax.faces.component.EditableValueHoldervalid - the new valid valuepublic final boolean isRequired()
isRequired in interface javax.faces.component.EditableValueHolderpublic final void setRequired(boolean required)
setRequired in interface javax.faces.component.EditableValueHolderrequired - the new required valuepublic final boolean isLocalValueSet()
isLocalValueSet in interface javax.faces.component.EditableValueHolderpublic final void setLocalValueSet(boolean localValueSet)
setLocalValueSet in interface javax.faces.component.EditableValueHolderlocalValueSet - the new localValueSet valuepublic final Object getSubmittedValue()
getSubmittedValue in interface javax.faces.component.EditableValueHolderpublic final void setSubmittedValue(Object submittedValue)
setSubmittedValue in interface javax.faces.component.EditableValueHoldersubmittedValue - the new submittedValue valuepublic final javax.faces.el.MethodBinding getValidator()
getValidator in interface javax.faces.component.EditableValueHolderpublic final void setValidator(javax.faces.el.MethodBinding validator)
setValidator in interface javax.faces.component.EditableValueHoldervalidator - the new validator valuepublic final javax.faces.el.MethodBinding getValueChangeListener()
getValueChangeListener in interface javax.faces.component.EditableValueHolderpublic final void setValueChangeListener(javax.faces.el.MethodBinding valueChangeListener)
setValueChangeListener in interface javax.faces.component.EditableValueHoldervalueChangeListener - the new valueChangeListener valuepublic final String getRequiredMessageDetail()
Parameters:
public final void setRequiredMessageDetail(String requiredMessageDetail)
Parameters:
requiredMessageDetail - the new requiredMessageDetail valuepublic final void addValueChangeListener(javax.faces.event.ValueChangeListener listener)
addValueChangeListener in interface javax.faces.component.EditableValueHolderlistener - the valueChange listener to addpublic final void removeValueChangeListener(javax.faces.event.ValueChangeListener listener)
removeValueChangeListener in interface javax.faces.component.EditableValueHolderlistener - the valueChange listener to removepublic final javax.faces.event.ValueChangeListener[] getValueChangeListeners()
getValueChangeListeners in interface javax.faces.component.EditableValueHolderprotected FacesBean.Type getBeanType()
getBeanType in class UIXValueCopyright © 2001-2017 The Apache Software Foundation. All Rights Reserved.