org.rcfaces.core.component
Class HiddenValueComponent

java.lang.Object
  extended by javax.faces.component.UIComponent
      extended by javax.faces.component.UIComponentBase
          extended by javax.faces.component.UIOutput
              extended by javax.faces.component.UIInput
                  extended by org.rcfaces.core.internal.component.CameliaInputComponent
                      extended by org.rcfaces.core.component.HiddenValueComponent
All Implemented Interfaces:
EditableValueHolder, StateHolder, ValueHolder, IClientDataCapability, IImmediateCapability, IPropertyChangeEventCapability, IServerDataCapability, IUserEventCapability, IValidationEventCapability, IValueLockedCapability, org.rcfaces.core.internal.capability.IComponentLifeCycle, org.rcfaces.core.internal.capability.IConvertValueHolder, org.rcfaces.core.internal.capability.IRCFacesComponent, org.rcfaces.core.internal.capability.ISubmittedExternalValue, org.rcfaces.core.internal.manager.IClientDataManager, org.rcfaces.core.internal.manager.IContainerManager, org.rcfaces.core.internal.manager.IServerDataManager, org.rcfaces.core.internal.manager.ITransientAttributesManager

public class HiddenValueComponent
extends org.rcfaces.core.internal.component.CameliaInputComponent
implements IClientDataCapability, IServerDataCapability, IPropertyChangeEventCapability, IImmediateCapability, IValueLockedCapability, IValidationEventCapability, IUserEventCapability, org.rcfaces.core.internal.manager.IClientDataManager, org.rcfaces.core.internal.manager.IServerDataManager

The hiddenValue Component is a non-visual component. It is equivalent to and Input hidden type HTML tag.

It allows to access and store value on the client and on the server while keeping it concealed. The clientData Component can also be used.

The hiddenValue Component has the following capability :

The default hiddenValue renderer is link to the f_hiddenValue javascript class. f_hiddenValue extends f_eventTarget, fa_serializable, fa_clientData


Field Summary
protected static Set CAMELIA_ATTRIBUTES
           
static String COMPONENT_TYPE
           
 
Fields inherited from class org.rcfaces.core.internal.component.CameliaInputComponent
engine
 
Fields inherited from class javax.faces.component.UIInput
COMPONENT_FAMILY, CONVERSION_MESSAGE_ID, REQUIRED_MESSAGE_ID, UPDATE_MESSAGE_ID
 
Fields inherited from class javax.faces.component.UIComponent
bindings
 
Constructor Summary
HiddenValueComponent()
           
HiddenValueComponent(String componentId)
           
 
Method Summary
 void addPropertyChangeListener(IPropertyChangeListener listener)
          Adds a listener to the component for the propertyChange event
 void addUserEventListener(IUserEventListener listener)
          Adds a listener to the component for the user event
 void addValidationListener(IValidationListener listener)
          Adds a listener to the component for the validation event
protected  Set getCameliaFields()
           
 String getClientData(String name)
          Retrieves the data associated to a variable
 String getClientData(String name, FacesContext facesContext)
           
 int getClientDataCount()
          Returns the number of variable associated to the component.
 Map getClientDataMap()
          Returns a map containing the couples variable-data
 Map getClientDataMap(FacesContext facesContext)
           
 Object getServerData(String name)
          Retrieves an object data associated to a key
 Object getServerData(String name, FacesContext facesContext)
           
 int getServerDataCount()
          Returns the number of keys associated to the component.
 Map getServerDataMap()
          Returns a Map object containing keys and associated data objects
 Map getServerDataMap(FacesContext facesContext)
           
 boolean isValueLocked()
          Get the lock state of the main value of the component.
 boolean isValueLocked(FacesContext facesContext)
          See isValueLocked() for more details
 boolean isValueLockedSetted()
          Returns true if the attribute "valueLocked" is set.
 String[] listClientDataKeys()
          Returns the list of variable associated to the component.
 String[] listClientDataKeys(FacesContext facesContext)
           
 FacesListener[] listPropertyChangeListeners()
          Returns a list of propertyChange listener for the component
 String[] listServerDataKeys()
          Returns a list of the keys defined for the component
 String[] listServerDataKeys(FacesContext facesContext)
           
 FacesListener[] listUserEventListeners()
          Returns a list of user listener for the component
 FacesListener[] listValidationListeners()
          Returns a list of validation listener for the component
 String removeClientData(String name)
          Removes the variable name and the data associated to it
 void removePropertyChangeListener(IPropertyChangeListener listener)
          Removes a listener from the component for the propertyChange event
 Object removeServerData(String name)
          Removes a key and the data object associated to it
 void removeUserEventListener(IUserEventListener listener)
          Removes a listener from the component for the user event
 void removeValidationListener(IValidationListener listener)
          Removes a listener from the component for the validation event
 String setClientData(String name, String value)
          Associates data to variable name.
 void setClientData(String name, javax.el.ValueExpression value)
           
 Object setServerData(String name, Object value)
          Associates and object to a key for the component on the server side
 void setServerData(String name, javax.el.ValueExpression value)
           
 void setValueLocked(boolean valueLocked)
          Set the lock of the main value of the component.
 
Methods inherited from class org.rcfaces.core.internal.component.CameliaInputComponent
broadcast, clearListeners, confirmListenerAppend, constructPhase, constructTemplate, decodePhase, encodeBegin, encodeChildren, encodeEnd, getAsyncRenderer, getCameliaValueAlias, getChildren, getChildrenListState, getConvertedValue, getFamily, getLocalValue, getRendererType, getSubmittedExternalValue, getTransientAttribute, getValue, getValueExpression, hasDefaultProperties, initializeComponent, initializePhase, isClientRendered, isRendered, isSubmittedValueSetted, isTemplateComponent, processDecodes, processEngineUpdates, processEngineValidators, processUpdates, processValidators, queueEvent, renderPhase, restoreState, saveState, setConverter, setConverter, setDefaultProperties, setRendered, setSubmittedExternalValue, setTransientAttribute, setValueExpression, toString, updatePhase, validationPhase, verifyAsyncDecode
 
Methods inherited from class javax.faces.component.UIInput
addValidator, addValueChangeListener, compareValues, decode, getConverterMessage, getRequiredMessage, getSubmittedValue, getValidator, getValidatorMessage, getValidators, getValueChangeListener, getValueChangeListeners, isImmediate, isLocalValueSet, isRequired, isValid, removeValidator, removeValueChangeListener, resetValue, setConverterMessage, setImmediate, setLocalValueSet, setRequired, setRequiredMessage, setSubmittedValue, setValid, setValidator, setValidatorMessage, setValue, setValueChangeListener, updateModel, validate, validateValue
 
Methods inherited from class javax.faces.component.UIOutput
getConverter, setConverter
 
Methods inherited from class javax.faces.component.UIComponentBase
addFacesListener, findComponent, getAttributes, getChildCount, getClientId, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendersChildren, getValueBinding, invokeOnComponent, isTransient, processRestoreState, processSaveState, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding
 
Methods inherited from class javax.faces.component.UIComponent
encodeAll, getContainerClientId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.rcfaces.core.component.capability.IImmediateCapability
isImmediate, setImmediate
 
Methods inherited from interface org.rcfaces.core.internal.manager.IContainerManager
getChildCount
 
Methods inherited from interface javax.faces.component.ValueHolder
getConverter, setConverter, setValue
 

Field Detail

COMPONENT_TYPE

public static final String COMPONENT_TYPE
See Also:
Constant Field Values

CAMELIA_ATTRIBUTES

protected static final Set CAMELIA_ATTRIBUTES
Constructor Detail

HiddenValueComponent

public HiddenValueComponent()

HiddenValueComponent

public HiddenValueComponent(String componentId)
Method Detail

setClientData

public void setClientData(String name,
                          javax.el.ValueExpression value)
Specified by:
setClientData in interface org.rcfaces.core.internal.manager.IClientDataManager

setClientData

public String setClientData(String name,
                            String value)
Description copied from interface: IClientDataCapability
Associates data to variable name.

Specified by:
setClientData in interface IClientDataCapability
Specified by:
setClientData in interface org.rcfaces.core.internal.manager.IClientDataManager
Parameters:
name - the variable to associate data to
value - the data to associate to the variable
Returns:
the data previously associated with the variable (empty if none)

setServerData

public void setServerData(String name,
                          javax.el.ValueExpression value)
Specified by:
setServerData in interface org.rcfaces.core.internal.manager.IServerDataManager

setServerData

public Object setServerData(String name,
                            Object value)
Description copied from interface: IServerDataCapability
Associates and object to a key for the component on the server side

Specified by:
setServerData in interface IServerDataCapability
Specified by:
setServerData in interface org.rcfaces.core.internal.manager.IServerDataManager
Parameters:
name - key used to retrieve the object associated
value - object to associate
Returns:
the object previously associated to teh key (null if none)

getClientData

public String getClientData(String name,
                            FacesContext facesContext)

getServerData

public Object getServerData(String name,
                            FacesContext facesContext)

getClientDataMap

public Map getClientDataMap(FacesContext facesContext)

getServerDataMap

public Map getServerDataMap(FacesContext facesContext)

listClientDataKeys

public String[] listClientDataKeys(FacesContext facesContext)

listServerDataKeys

public String[] listServerDataKeys(FacesContext facesContext)

getClientDataCount

public int getClientDataCount()
Description copied from interface: IClientDataCapability
Returns the number of variable associated to the component.

Specified by:
getClientDataCount in interface IClientDataCapability
Returns:
number of variable

listClientDataKeys

public String[] listClientDataKeys()
Description copied from interface: IClientDataCapability
Returns the list of variable associated to the component.

Specified by:
listClientDataKeys in interface IClientDataCapability
Returns:
a list of variables

removeClientData

public String removeClientData(String name)
Description copied from interface: IClientDataCapability
Removes the variable name and the data associated to it

Specified by:
removeClientData in interface IClientDataCapability
Parameters:
name - the variable to associate data to
Returns:
the data that was associated to the variable

getClientData

public String getClientData(String name)
Description copied from interface: IClientDataCapability
Retrieves the data associated to a variable

Specified by:
getClientData in interface IClientDataCapability
Parameters:
name - the variable to associate data to
Returns:
the data associated to the variable

getClientDataMap

public Map getClientDataMap()
Description copied from interface: IClientDataCapability
Returns a map containing the couples variable-data

Specified by:
getClientDataMap in interface IClientDataCapability
Returns:
a map

listServerDataKeys

public String[] listServerDataKeys()
Description copied from interface: IServerDataCapability
Returns a list of the keys defined for the component

Specified by:
listServerDataKeys in interface IServerDataCapability
Returns:
list of keys

getServerDataMap

public Map getServerDataMap()
Description copied from interface: IServerDataCapability
Returns a Map object containing keys and associated data objects

Specified by:
getServerDataMap in interface IServerDataCapability
Returns:
a map

getServerDataCount

public int getServerDataCount()
Description copied from interface: IServerDataCapability
Returns the number of keys associated to the component.

Specified by:
getServerDataCount in interface IServerDataCapability
Returns:
number of keys

getServerData

public Object getServerData(String name)
Description copied from interface: IServerDataCapability
Retrieves an object data associated to a key

Specified by:
getServerData in interface IServerDataCapability
Parameters:
name - the key to retrieve
Returns:
the data object associated to the key

removeServerData

public Object removeServerData(String name)
Description copied from interface: IServerDataCapability
Removes a key and the data object associated to it

Specified by:
removeServerData in interface IServerDataCapability
Parameters:
name - the key to remove
Returns:
the data object that was associated to the key (null if none)

addPropertyChangeListener

public final void addPropertyChangeListener(IPropertyChangeListener listener)
Description copied from interface: IPropertyChangeEventCapability
Adds a listener to the component for the propertyChange event

Specified by:
addPropertyChangeListener in interface IPropertyChangeEventCapability
Parameters:
listener - the propertyChange listener to add

removePropertyChangeListener

public final void removePropertyChangeListener(IPropertyChangeListener listener)
Description copied from interface: IPropertyChangeEventCapability
Removes a listener from the component for the propertyChange event

Specified by:
removePropertyChangeListener in interface IPropertyChangeEventCapability
Parameters:
listener - the propertyChange listener to remove

listPropertyChangeListeners

public final FacesListener[] listPropertyChangeListeners()
Description copied from interface: IPropertyChangeEventCapability
Returns a list of propertyChange listener for the component

Specified by:
listPropertyChangeListeners in interface IPropertyChangeEventCapability
Returns:
propertyChange listeners' list

isValueLocked

public boolean isValueLocked()
Description copied from interface: IValueLockedCapability
Get the lock state of the main value of the component.

Specified by:
isValueLocked in interface IValueLockedCapability
Returns:
The lock state.

isValueLocked

public boolean isValueLocked(FacesContext facesContext)
See isValueLocked() for more details


isValueLockedSetted

public final boolean isValueLockedSetted()
Returns true if the attribute "valueLocked" is set.

Returns:
true if the attribute is set.

setValueLocked

public void setValueLocked(boolean valueLocked)
Description copied from interface: IValueLockedCapability
Set the lock of the main value of the component.

Specified by:
setValueLocked in interface IValueLockedCapability
Parameters:
valueLocked - The lock state.

addValidationListener

public final void addValidationListener(IValidationListener listener)
Description copied from interface: IValidationEventCapability
Adds a listener to the component for the validation event

Specified by:
addValidationListener in interface IValidationEventCapability
Parameters:
listener - the validation listener to add

removeValidationListener

public final void removeValidationListener(IValidationListener listener)
Description copied from interface: IValidationEventCapability
Removes a listener from the component for the validation event

Specified by:
removeValidationListener in interface IValidationEventCapability
Parameters:
listener - the validation listener to remove

listValidationListeners

public final FacesListener[] listValidationListeners()
Description copied from interface: IValidationEventCapability
Returns a list of validation listener for the component

Specified by:
listValidationListeners in interface IValidationEventCapability
Returns:
validation listeners' list

addUserEventListener

public final void addUserEventListener(IUserEventListener listener)
Description copied from interface: IUserEventCapability
Adds a listener to the component for the user event

Specified by:
addUserEventListener in interface IUserEventCapability
Parameters:
listener - the user listener to add

removeUserEventListener

public final void removeUserEventListener(IUserEventListener listener)
Description copied from interface: IUserEventCapability
Removes a listener from the component for the user event

Specified by:
removeUserEventListener in interface IUserEventCapability
Parameters:
listener - the user listener to remove

listUserEventListeners

public final FacesListener[] listUserEventListeners()
Description copied from interface: IUserEventCapability
Returns a list of user listener for the component

Specified by:
listUserEventListeners in interface IUserEventCapability
Returns:
user listeners' list

getCameliaFields

protected Set getCameliaFields()
Overrides:
getCameliaFields in class org.rcfaces.core.internal.component.CameliaInputComponent


Copyright © 2006-2011 Vedana. All Rights Reserved.