|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.faces.component.UIComponent
org.apache.myfaces.trinidad.component.UIXComponent
org.apache.myfaces.trinidad.component.UIXComponentBase
org.apache.myfaces.trinidad.component.UIXValue
org.apache.myfaces.trinidad.component.UIXEditableValue
public abstract class UIXEditableValue
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. |
Field Summary | |
---|---|
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
|
Fields inherited from class org.apache.myfaces.trinidad.component.UIXValue |
---|
CONVERTER_KEY, VALUE_KEY |
Fields inherited from class org.apache.myfaces.trinidad.component.UIXComponentBase |
---|
BINDING_KEY, ID_KEY, RENDERED_KEY, RENDERER_TYPE_KEY, TRANSIENT_KEY |
Fields inherited from class javax.faces.component.UIComponent |
---|
BEANINFO_KEY, bindings, COMPOSITE_COMPONENT_TYPE_KEY, COMPOSITE_FACET_NAME, CURRENT_COMPONENT, CURRENT_COMPOSITE_COMPONENT, FACETS_KEY, VIEW_LOCATION_KEY |
Constructor Summary | |
---|---|
protected |
UIXEditableValue()
Construct an instance of the UIXEditableValue. |
protected |
UIXEditableValue(String rendererType)
Construct an instance of the UIXEditableValue. |
Method Summary | |
---|---|
void |
addValidator(javax.faces.validator.Validator validator)
|
void |
addValueChangeListener(javax.faces.event.ValueChangeListener listener)
Adds a valueChange listener. |
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()
Gets a method reference to a validator method |
javax.faces.validator.Validator[] |
getValidators()
|
javax.faces.el.MethodBinding |
getValueChangeListener()
Gets a method reference to a value change listener |
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 |
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)
Sets a method reference to a validator method |
void |
setValueChangeListener(javax.faces.el.MethodBinding valueChangeListener)
Sets a method reference to a value change listener |
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)
|
Methods inherited from class org.apache.myfaces.trinidad.component.UIXValue |
---|
getConverter, getLocalValue, getValue, setConverter, setValue |
Methods inherited from class javax.faces.component.UIComponent |
---|
encodeAll, getClientId, getCompositeComponentParent, getContainerClientId, getCurrentComponent, getCurrentCompositeComponent, getNamingContainer, getResourceBundleMap, isCompositeComponent, isInView, popComponentFromEL, processEvent, pushComponentToEL, setInView |
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 |
---|
public 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
Constructor Detail |
---|
protected UIXEditableValue(String rendererType)
protected UIXEditableValue()
Method Detail |
---|
public void resetValue()
isLocalValueSet()
is false), and setting "valid" to true.
resetValue
in interface javax.faces.component.EditableValueHolder
public void addValidator(javax.faces.validator.Validator validator)
addValidator
in interface javax.faces.component.EditableValueHolder
public javax.faces.validator.Validator[] getValidators()
getValidators
in interface javax.faces.component.EditableValueHolder
public void removeValidator(javax.faces.validator.Validator validator)
removeValidator
in interface javax.faces.component.EditableValueHolder
public 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 UIXComponentBase
event
- FacesEvent
to be broadcast
javax.faces.event.AbortProcessingException
- Signal the JavaServer Faces
implementation that no further processing on the current event
should be performed
IllegalArgumentException
- if the implementation class
of this FacesEvent
is not supported by this component
NullPointerException
- if event
is
null
public 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 UIXComponentBase
public void processUpdates(javax.faces.context.FacesContext context)
processUpdates
in class UIXComponentBase
public void processValidators(javax.faces.context.FacesContext context)
processValidators
in class UIXComponentBase
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.ConverterException
protected 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 NULL
public 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.EditableValueHolder
public final void setImmediate(boolean immediate)
setImmediate
in interface javax.faces.component.EditableValueHolder
immediate
- the new immediate valuepublic final boolean isValid()
isValid
in interface javax.faces.component.EditableValueHolder
public final void setValid(boolean valid)
setValid
in interface javax.faces.component.EditableValueHolder
valid
- the new valid valuepublic final boolean isRequired()
isRequired
in interface javax.faces.component.EditableValueHolder
public final void setRequired(boolean required)
setRequired
in interface javax.faces.component.EditableValueHolder
required
- the new required valuepublic final boolean isLocalValueSet()
isLocalValueSet
in interface javax.faces.component.EditableValueHolder
public final void setLocalValueSet(boolean localValueSet)
setLocalValueSet
in interface javax.faces.component.EditableValueHolder
localValueSet
- the new localValueSet valuepublic final Object getSubmittedValue()
getSubmittedValue
in interface javax.faces.component.EditableValueHolder
public final void setSubmittedValue(Object submittedValue)
setSubmittedValue
in interface javax.faces.component.EditableValueHolder
submittedValue
- the new submittedValue valuepublic final javax.faces.el.MethodBinding getValidator()
getValidator
in interface javax.faces.component.EditableValueHolder
public final void setValidator(javax.faces.el.MethodBinding validator)
setValidator
in interface javax.faces.component.EditableValueHolder
validator
- the new validator valuepublic final javax.faces.el.MethodBinding getValueChangeListener()
getValueChangeListener
in interface javax.faces.component.EditableValueHolder
public final void setValueChangeListener(javax.faces.el.MethodBinding valueChangeListener)
setValueChangeListener
in interface javax.faces.component.EditableValueHolder
valueChangeListener
- 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.EditableValueHolder
listener
- the valueChange listener to addpublic final void removeValueChangeListener(javax.faces.event.ValueChangeListener listener)
removeValueChangeListener
in interface javax.faces.component.EditableValueHolder
listener
- the valueChange listener to removepublic final javax.faces.event.ValueChangeListener[] getValueChangeListeners()
getValueChangeListeners
in interface javax.faces.component.EditableValueHolder
public String getFamily()
getFamily
in class UIXValue
protected FacesBean.Type getBeanType()
getBeanType
in class UIXValue
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |