oracle.adf.view.faces.component
Class UIXEditableValue

java.lang.Object
  extended byjavax.faces.component.UIComponent
      extended byoracle.adf.view.faces.component.UIXComponent
          extended byoracle.adf.view.faces.component.UIXComponentBase
              extended byoracle.adf.view.faces.component.UIXValue
                  extended byoracle.adf.view.faces.component.UIXEditableValue
All Implemented Interfaces:
EditableValueHolder, StateHolder, ValueHolder
Direct Known Subclasses:
UIXInput, UIXSelectBoolean, UIXSelectInput, UIXSelectMany, UIXSelectOne

public abstract class UIXEditableValue
extends UIXValue
implements EditableValueHolder

The editableValue web element contains all the shared attributes supported by all ADF Faces components that support the JSF EditableValueHolder interface.

Events:

Type Phases Description
javax.faces.event.ValueChangeEvent Process Validations
Apply Request Values
Event delivered when a new value is entered by a user.


Field Summary
static java.lang.String COMPONENT_FAMILY
           
static java.lang.String COMPONENT_TYPE
           
static java.lang.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 java.lang.String REQUIRED_MESSAGE_ID
           
static PropertyKey SUBMITTED_VALUE_KEY
           
static FacesBean.Type TYPE
           
static PropertyKey VALID_KEY
           
static PropertyKey VALIDATOR_KEY
           
static PropertyKey VALIDATORS_KEY
           
static PropertyKey VALUE_CHANGE_LISTENER_KEY
           
 
Fields inherited from class oracle.adf.view.faces.component.UIXValue
CONVERTER_KEY, VALUE_KEY
 
Fields inherited from class oracle.adf.view.faces.component.UIXComponentBase
BINDING_KEY, ID_KEY, RENDERED_KEY, RENDERER_TYPE_KEY, TRANSIENT_KEY
 
Constructor Summary
protected UIXEditableValue()
          Construct an instance of the UIXEditableValue
protected UIXEditableValue(java.lang.String rendererType)
          Construct an instance of the UIXEditableValue.
 
Method Summary
 void addValidator(Validator validator)
           
 void addValueChangeListener(ValueChangeListener listener)
          Add a new ValueChangeListener to the set of listeners interested in being notified when ValueChangeEvents occur.
 void broadcast(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(java.lang.Object previous, java.lang.Object value)
          Return true if the new value is different from the previous value.
protected  FacesBean.Type getBeanType()
           
protected  java.lang.Object getConvertedValue(FacesContext context, java.lang.Object submittedValue)
           
 java.lang.String getFamily()
           
 java.lang.String getRequiredMessageDetail()
          Gets the message to be displayed, if 'required' validation fails.
protected  java.lang.String getRequiredMessageKey()
           
 java.lang.Object getSubmittedValue()
          Gets the current submitted value.
 MethodBinding getValidator()
          Gets a method reference to a validator method
 Validator[] getValidators()
           
 MethodBinding getValueChangeListener()
          Gets a method reference to an value change listener
 ValueChangeListener[] getValueChangeListeners()
          Return the set of registered ValueChangeListeners for this component.
protected  boolean isEmpty(java.lang.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 in the Process Validators phase.
 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(FacesContext context)
          In addition to the standard processDecodes behavior inherited from UIXComponentBase, calls validate() if the the immediate property is true.
 void processUpdates(FacesContext context)
           
 void processValidators(FacesContext context)
           
 void removeValidator(Validator validator)
           
 void removeValueChangeListener(ValueChangeListener listener)
          Remove an existing ValueChangeListener (if any) from the set of listeners interested in being notified when ValueChangeEvents occur.
 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 in the Process Validators phase.
 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(java.lang.String requiredMessageDetail)
          Sets the message to be displayed, if 'required' validation fails.
 void setSubmittedValue(java.lang.Object submittedValue)
          Sets the current submitted value.
 void setValid(boolean valid)
          Sets whether the component's value is currently valid
 void setValidator(MethodBinding validator)
          Sets a method reference to a validator method
 void setValueChangeListener(MethodBinding valueChangeListener)
          Sets a method reference to an value change listener
 void updateModel(FacesContext context)
           
 void validate(FacesContext context)
           
protected  void validateValue(FacesContext context, java.lang.Object newValue)
           
 
Methods inherited from class oracle.adf.view.faces.component.UIXValue
getConverter, getLocalValue, getValue, setConverter, setValue
 
Methods inherited from class oracle.adf.view.faces.component.UIXComponentBase
addAttributeChange, addAttributeChange, addAttributeChangeListener, addFacesListener, createFacesBean, decode, decodeChildren, decodeChildrenImpl, encodeAll, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributeChangeListener, getAttributeChangeListeners, getAttributes, getBooleanProperty, getChildCount, getChildren, getClientId, getFacesBean, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacetNames, getFacets, getFacetsAndChildren, getId, getIntProperty, getLifecycleRenderer, getLocalClientId, getParent, getProperty, getPropertyKey, getRenderer, getRendererType, getRendersChildren, getValueBinding, isRendered, isTransient, processRestoreState, processSaveState, queueEvent, removeAttributeChangeListener, removeFacesListener, restoreState, saveState, setAttributeChangeListener, setBooleanProperty, setId, setIntProperty, setParent, setProperty, setRendered, setRendererType, setTransient, setValueBinding, toString, updateChildren, updateChildrenImpl, validateChildren, validateChildrenImpl
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.faces.component.ValueHolder
getConverter, getLocalValue, getValue, setConverter, setValue
 

Field Detail

TYPE

public static final FacesBean.Type TYPE

IMMEDIATE_KEY

public static final PropertyKey IMMEDIATE_KEY

VALID_KEY

public static final PropertyKey VALID_KEY

REQUIRED_KEY

public static final PropertyKey REQUIRED_KEY

LOCAL_VALUE_SET_KEY

public static final PropertyKey LOCAL_VALUE_SET_KEY

SUBMITTED_VALUE_KEY

public static final PropertyKey SUBMITTED_VALUE_KEY

VALIDATOR_KEY

public static final PropertyKey VALIDATOR_KEY

VALUE_CHANGE_LISTENER_KEY

public static final PropertyKey VALUE_CHANGE_LISTENER_KEY

REQUIRED_MESSAGE_DETAIL_KEY

public static final PropertyKey REQUIRED_MESSAGE_DETAIL_KEY

COMPONENT_FAMILY

public static final java.lang.String COMPONENT_FAMILY
See Also:
Constant Field Values

COMPONENT_TYPE

public static final java.lang.String COMPONENT_TYPE
See Also:
Constant Field Values

VALIDATORS_KEY

public static final PropertyKey VALIDATORS_KEY

REQUIRED_MESSAGE_ID

public static final java.lang.String REQUIRED_MESSAGE_ID
See Also:
Constant Field Values

CONVERSION_MESSAGE_ID

public static final java.lang.String CONVERSION_MESSAGE_ID
See Also:
Constant Field Values
Constructor Detail

UIXEditableValue

protected UIXEditableValue(java.lang.String rendererType)
Construct an instance of the UIXEditableValue.


UIXEditableValue

protected UIXEditableValue()
Construct an instance of the UIXEditableValue

Method Detail

resetValue

public 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.


addValueChangeListener

public void addValueChangeListener(ValueChangeListener listener)

Add a new ValueChangeListener to the set of listeners interested in being notified when ValueChangeEvents occur.

Specified by:
addValueChangeListener in interface EditableValueHolder
Parameters:
listener - The ValueChangeListener to be added
Throws:
java.lang.NullPointerException - if listener is null

getValueChangeListeners

public ValueChangeListener[] getValueChangeListeners()

Return the set of registered ValueChangeListeners for this component. If there are no registered listeners, a zero-length array is returned.

Specified by:
getValueChangeListeners in interface EditableValueHolder

removeValueChangeListener

public void removeValueChangeListener(ValueChangeListener listener)

Remove an existing ValueChangeListener (if any) from the set of listeners interested in being notified when ValueChangeEvents occur.

Specified by:
removeValueChangeListener in interface EditableValueHolder
Parameters:
listener - The ValueChangeListener to be removed
Throws:
java.lang.NullPointerException - if listener is null

addValidator

public void addValidator(Validator validator)
Specified by:
addValidator in interface EditableValueHolder

getValidators

public Validator[] getValidators()
Specified by:
getValidators in interface EditableValueHolder

removeValidator

public void removeValidator(Validator validator)
Specified by:
removeValidator in interface EditableValueHolder

validate

public void validate(FacesContext context)

broadcast

public void broadcast(FacesEvent event)
               throws AbortProcessingException
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).

Overrides:
broadcast in class UIXComponentBase
Parameters:
event - FacesEvent to be broadcast
Throws:
AbortProcessingException - Signal the JavaServer Faces implementation that no further processing on the current event should be performed
java.lang.IllegalArgumentException - if the implementation class of this FacesEvent is not supported by this component
java.lang.NullPointerException - if event is null

processDecodes

public void processDecodes(FacesContext context)
In addition to the standard 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().

Overrides:
processDecodes in class UIXComponentBase
Throws:
java.lang.NullPointerException

processUpdates

public void processUpdates(FacesContext context)
Overrides:
processUpdates in class UIXComponentBase

processValidators

public void processValidators(FacesContext context)
Overrides:
processValidators in class UIXComponentBase

updateModel

public void updateModel(FacesContext context)

validateValue

protected void validateValue(FacesContext context,
                             java.lang.Object newValue)

getRequiredMessageKey

protected java.lang.String getRequiredMessageKey()

getConvertedValue

protected java.lang.Object getConvertedValue(FacesContext context,
                                             java.lang.Object submittedValue)
                                      throws ConverterException
Throws:
ConverterException

compareValues

protected boolean compareValues(java.lang.Object previous,
                                java.lang.Object value)

Return true if the new value is different from the previous value.

Parameters:
previous - old value of this component (if any)
value - new value of this component (if any)

isEmpty

protected boolean isEmpty(java.lang.Object value)

Return true if the value is empty.


isImmediate

public final boolean isImmediate()
Gets whether the value is converted and validated immediately in the Apply Request Values phase, or in the Process Validators phase.

Specified by:
isImmediate in interface EditableValueHolder

setImmediate

public final void setImmediate(boolean immediate)
Sets whether the value is converted and validated immediately in the Apply Request Values phase, or in the Process Validators phase.

Specified by:
setImmediate in interface EditableValueHolder

isValid

public final boolean isValid()
Gets whether the component's value is currently valid

Specified by:
isValid in interface EditableValueHolder

setValid

public final void setValid(boolean valid)
Sets whether the component's value is currently valid

Specified by:
setValid in interface EditableValueHolder

isRequired

public final boolean isRequired()
Gets whether a non-null, non-empty value must be entered. If false, validators will not be executed when the value is null or empty.

Specified by:
isRequired in interface EditableValueHolder

setRequired

public final void setRequired(boolean required)
Sets whether a non-null, non-empty value must be entered. If false, validators will not be executed when the value is null or empty.

Specified by:
setRequired in interface EditableValueHolder

isLocalValueSet

public final boolean isLocalValueSet()
Gets whether a local value is currently set. If false, values are being retrieved from any attached ValueBinding

Specified by:
isLocalValueSet in interface EditableValueHolder

setLocalValueSet

public final void setLocalValueSet(boolean localValueSet)
Sets whether a local value is currently set. If false, values are being retrieved from any attached ValueBinding

Specified by:
setLocalValueSet in interface EditableValueHolder

getSubmittedValue

public final java.lang.Object getSubmittedValue()
Gets the current submitted value. This value, if non-null, is set by the Renderer to store a possibly invalid value for later conversion or redisplay, and has not yet been converted into the proper type for this component instance. This method should only be used by the decode() and validate() method of this component, or its corresponding Renderer; however, user code may manually set it to null to erase any submitted value.

Specified by:
getSubmittedValue in interface EditableValueHolder

setSubmittedValue

public final void setSubmittedValue(java.lang.Object submittedValue)
Sets the current submitted value. This value, if non-null, is set by the Renderer to store a possibly invalid value for later conversion or redisplay, and has not yet been converted into the proper type for this component instance. This method should only be used by the decode() and validate() method of this component, or its corresponding Renderer; however, user code may manually set it to null to erase any submitted value.

Specified by:
setSubmittedValue in interface EditableValueHolder

getValidator

public final MethodBinding getValidator()
Gets a method reference to a validator method

Specified by:
getValidator in interface EditableValueHolder

setValidator

public final void setValidator(MethodBinding validator)
Sets a method reference to a validator method

Specified by:
setValidator in interface EditableValueHolder

getValueChangeListener

public final MethodBinding getValueChangeListener()
Gets a method reference to an value change listener

Specified by:
getValueChangeListener in interface EditableValueHolder

setValueChangeListener

public final void setValueChangeListener(MethodBinding valueChangeListener)
Sets a method reference to an value change listener

Specified by:
setValueChangeListener in interface EditableValueHolder

getRequiredMessageDetail

public final java.lang.String getRequiredMessageDetail()
Gets the message to be displayed, if 'required' validation fails.

Parameters:


setRequiredMessageDetail

public final void setRequiredMessageDetail(java.lang.String requiredMessageDetail)
Sets the message to be displayed, if 'required' validation fails.

Parameters:


getFamily

public java.lang.String getFamily()
Overrides:
getFamily in class UIXValue

getBeanType

protected FacesBean.Type getBeanType()
Overrides:
getBeanType in class UIXValue


Copyright © 2003-2007 Oracle Corporation. All Rights Reserved.