org.rcfaces.core.component
Class AbstractItemComponent

java.lang.Object
  extended by javax.faces.component.UIComponent
      extended by javax.faces.component.UIComponentBase
          extended by javax.faces.component.UISelectItem
              extended by org.rcfaces.core.internal.component.CameliaItemComponent
                  extended by org.rcfaces.core.component.AbstractItemComponent
All Implemented Interfaces:
StateHolder, IClientDataCapability, IDisabledCapability, IServerDataCapability, IUnlockedClientAttributesCapability, org.rcfaces.core.internal.capability.IComponentLifeCycle, org.rcfaces.core.internal.capability.IRCFacesComponent, org.rcfaces.core.internal.manager.IClientDataManager, org.rcfaces.core.internal.manager.IContainerManager, org.rcfaces.core.internal.manager.IServerDataManager, org.rcfaces.core.internal.manager.ITransientAttributesManager
Direct Known Subclasses:
SelectItemComponent

public abstract class AbstractItemComponent
extends org.rcfaces.core.internal.component.CameliaItemComponent
implements IDisabledCapability, IServerDataCapability, IClientDataCapability, IUnlockedClientAttributesCapability, org.rcfaces.core.internal.manager.IClientDataManager, org.rcfaces.core.internal.manager.IServerDataManager

Technical component, used as a basis for building new RCFaces components.


Field Summary
protected static Set CAMELIA_ATTRIBUTES
           
 
Fields inherited from class org.rcfaces.core.internal.component.CameliaItemComponent
engine
 
Fields inherited from class javax.faces.component.UISelectItem
COMPONENT_FAMILY, COMPONENT_TYPE
 
Fields inherited from class javax.faces.component.UIComponent
bindings
 
Constructor Summary
AbstractItemComponent()
           
 
Method Summary
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)
           
 String getUnlockedClientAttributeNames()
          Returns a string value holding a comma separated list of the client modifiable properties.
 String getUnlockedClientAttributeNames(FacesContext facesContext)
          See getUnlockedClientAttributeNames() for more details
 boolean isDisabled()
          Returns false if the receiver is enabled and all ancestors up to and including the receiver's nearest ancestor shell are enabled.
 boolean isDisabledSetted()
          Returns true if the attribute "disabled" is set.
 boolean isUnlockedClientAttributeNamesSetted()
          Returns true if the attribute "unlockedClientAttributeNames" is set.
 String[] listClientDataKeys()
          Returns the list of variable associated to the component.
 String[] listClientDataKeys(FacesContext facesContext)
           
 String[] listServerDataKeys()
          Returns a list of the keys defined for the component
 String[] listServerDataKeys(FacesContext facesContext)
           
 String removeClientData(String name)
          Removes the variable name and the data associated to it
 Object removeServerData(String name)
          Removes a key and the data object associated to it
 String setClientData(String name, String value)
          Associates data to variable name.
 void setClientData(String name, javax.el.ValueExpression value)
           
 void setDisabled(boolean disabled)
          Disabled the receiver if the argument is true, and enables it otherwise.
 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 setUnlockedClientAttributeNames(String unlockedClientAttributeNames)
          Sets a string value holding a comma separated list of the client modifiable properties.
 void setValueExpression(String name, javax.el.ValueExpression binding)
           
 
Methods inherited from class org.rcfaces.core.internal.component.CameliaItemComponent
clearListeners, confirmListenerAppend, constructPhase, constructTemplate, decodePhase, encodeBegin, encodeChildren, encodeEnd, getAsyncRenderer, getCameliaValueAlias, getChildren, getChildrenListState, getFamily, getRendererType, getTransientAttribute, getValueExpression, hasDefaultProperties, initializeComponent, initializePhase, isClientRendered, isRendered, isTemplateComponent, processDecodes, processEngineUpdates, processEngineValidators, processUpdates, processValidators, queueEvent, renderPhase, restoreState, saveState, setDefaultProperties, setRendered, setTransientAttribute, toString, updatePhase, validationPhase, verifyAsyncDecode
 
Methods inherited from class javax.faces.component.UISelectItem
getItemDescription, getItemLabel, getItemValue, getValue, isItemDisabled, isItemEscaped, setItemDescription, setItemDisabled, setItemEscaped, setItemLabel, setItemValue, setValue
 
Methods inherited from class javax.faces.component.UIComponentBase
addFacesListener, broadcast, decode, 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.internal.manager.IContainerManager
getChildCount
 

Field Detail

CAMELIA_ATTRIBUTES

protected static final Set CAMELIA_ATTRIBUTES
Constructor Detail

AbstractItemComponent

public AbstractItemComponent()
Method Detail

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)

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)

setDisabled

public void setDisabled(boolean disabled)
Description copied from interface: IDisabledCapability
Disabled the receiver if the argument is true, and enables it otherwise. A disabled control is typically not selectable from the user interface and draws with an inactive or "grayed" look.

Specified by:
setDisabled in interface IDisabledCapability
Parameters:
disabled - the new enabled state

isDisabled

public boolean isDisabled()
Description copied from interface: IDisabledCapability
Returns false if the receiver is enabled and all ancestors up to and including the receiver's nearest ancestor shell are enabled.
Otherwise, false is returned. A disabled control is typically not selectable from the user interface and draws with an inactive or "grayed" look.

Specified by:
isDisabled in interface IDisabledCapability
Returns:
the receiver's enabled state

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)

setValueExpression

public void setValueExpression(String name,
                               javax.el.ValueExpression binding)
Overrides:
setValueExpression in class org.rcfaces.core.internal.component.CameliaItemComponent

isDisabledSetted

public final boolean isDisabledSetted()
Returns true if the attribute "disabled" is set.

Returns:
true if the attribute is set.

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)

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

getUnlockedClientAttributeNames

public String getUnlockedClientAttributeNames()
Description copied from interface: IUnlockedClientAttributesCapability
Returns a string value holding a comma separated list of the client modifiable properties.

Specified by:
getUnlockedClientAttributeNames in interface IUnlockedClientAttributesCapability
Returns:
list of modifiable attributes

getUnlockedClientAttributeNames

public String getUnlockedClientAttributeNames(FacesContext facesContext)
See getUnlockedClientAttributeNames() for more details


isUnlockedClientAttributeNamesSetted

public final boolean isUnlockedClientAttributeNamesSetted()
Returns true if the attribute "unlockedClientAttributeNames" is set.

Returns:
true if the attribute is set.

setUnlockedClientAttributeNames

public void setUnlockedClientAttributeNames(String unlockedClientAttributeNames)
Description copied from interface: IUnlockedClientAttributesCapability
Sets a string value holding a comma separated list of the client modifiable properties.

Specified by:
setUnlockedClientAttributeNames in interface IUnlockedClientAttributesCapability
Parameters:
unlockedClientAttributeNames - list of modifiable attributes

getCameliaFields

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


Copyright © 2006-2011 Vedana. All Rights Reserved.