|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.AbstractMap<K,V> java.util.HashMap<java.lang.String,java.lang.Object> com.ibm.xsp.binding.PropertyMap
public class PropertyMap
Object that acts as a runtime property container, used for the "compositeData" global objects within custom controls, and some other places.
Note, this does not implement StateHolder
, but the items in the map
or in some sub-map under it can be StateHolders, so it must be serialized
using FacesUtil.objectToSerializable(FacesContext, Object)
or
StateHolderUtil#savePropertyMap(FacesContext, PropertyMap)
which both
recursively handle StateHolders in this map or any sub-maps (property-type
maps). Note, the internal state of sub-maps are not saved using either of
those methods, and the internal state of the top level map is only saved in
the savePropertyMap method.
Field Summary | |
---|---|
static java.lang.String |
COMPOSITEDATA
|
Constructor Summary | |
---|---|
PropertyMap()
|
|
PropertyMap(int size)
|
Method Summary | |
---|---|
void |
beginEvaluatePropertyType(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
PropertyMap root,
java.lang.String metaDataPathFromRoot)
|
void |
beginEvaluateRoot(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component)
Not intended to be called by 3rd parties, this is currently invoked on the root property map, that is the property map returned by FacesPropertyProvider.getPropertyMap() . |
void |
beginLazyEvaluate(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component)
Note, lazy evaluate has inherent issues; the lazily evaluated bindings will be evaluated in the wrong context, so variables may resolve to incorrect values. |
void |
endEvaluatePropertyType(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
PropertyMap root,
java.lang.String metaDataPathFromRoot)
|
void |
endEvaluateRoot(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component)
|
void |
endLazyEvaluate(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component)
|
java.lang.Object |
get(java.lang.Object key)
|
boolean |
getBoolean(java.lang.String name)
Helper method to get a boolean property value |
byte |
getByte(java.lang.String name)
Helper method to get a byte property value |
char |
getCharacter(java.lang.String name)
Helper method to get a character property value |
double |
getDouble(java.lang.String name)
Helper method to get a double property value |
float |
getFloat(java.lang.String name)
Helper method to get a float property value |
int |
getInteger(java.lang.String name)
Helper method to get a integer property value |
long |
getLong(java.lang.String name)
Helper method to get a long property value |
java.lang.Object |
getProperty(java.lang.String name)
Return the named property from the map. |
short |
getShort(java.lang.String name)
Helper method to get a short property value |
java.lang.String |
getString(java.lang.String name)
Helper method to get a String property value |
javax.faces.el.ValueBinding |
getValueBinding(java.lang.String name)
Return the ValueBinding with the specified name |
boolean |
isTransient()
|
void |
restoreRoot(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
java.lang.Object state)
|
java.lang.Object |
saveRoot(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component)
|
void |
setBoolean(java.lang.String name,
boolean value)
Helper method to set a boolean property value |
void |
setByte(java.lang.String name,
byte value)
Helper method to set a byte property value |
void |
setCharacter(java.lang.String name,
char value)
Helper method to set a character property value |
void |
setDouble(java.lang.String name,
double value)
Helper method to set a double property value |
void |
setFloat(java.lang.String name,
float value)
Helper method to set a float property value |
void |
setInteger(java.lang.String name,
int value)
Helper method to set a integer property value |
void |
setLong(java.lang.String name,
long value)
Helper method to set a long property value |
void |
setProperty(java.lang.String name,
java.lang.Object value)
Set the named property into the map. |
void |
setShort(java.lang.String name,
short value)
Helper method to set a short property value |
void |
setString(java.lang.String name,
java.lang.String value)
Helper method to set a String property value |
void |
setTransient(boolean transientFlag)
|
Methods inherited from class java.util.HashMap |
---|
clear, clone, containsKey, containsValue, entrySet, isEmpty, keySet, put, putAll, remove, size, values |
Methods inherited from class java.util.AbstractMap |
---|
equals, hashCode, toString |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Map |
---|
equals, hashCode |
Field Detail |
---|
public static final java.lang.String COMPOSITEDATA
Constructor Detail |
---|
public PropertyMap(int size)
public PropertyMap()
Method Detail |
---|
public javax.faces.el.ValueBinding getValueBinding(java.lang.String name)
public java.lang.Object get(java.lang.Object key)
get
in interface java.util.Map<java.lang.String,java.lang.Object>
get
in class java.util.HashMap<java.lang.String,java.lang.Object>
public void beginEvaluateRoot(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)
FacesPropertyProvider.getPropertyMap()
. The implementation calls
beginEvaluatePropertyType(FacesContext, UIComponent, PropertyMap, String)
on any nested property maps saved within root map, which would correspond
to property-types in the xsp-config definition or to a "Group" in the
Custom Control editor's Property Definition tab.
It evaluates any run-time bindings within this property map, within property maps set as a property value, or when a property value is a list of property maps. This is to ensure that the bindings are evaluated within the correct context, at the time of the control tree rendering when the objects in the outer page containing the custom control are still in scope.
context
- component
- public void endEvaluateRoot(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)
public void beginEvaluatePropertyType(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, PropertyMap root, java.lang.String metaDataPathFromRoot)
public void endEvaluatePropertyType(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, PropertyMap root, java.lang.String metaDataPathFromRoot)
public java.lang.Object getProperty(java.lang.String name)
public void setProperty(java.lang.String name, java.lang.Object value)
public void setTransient(boolean transientFlag)
public boolean isTransient()
public java.lang.Object saveRoot(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)
public void restoreRoot(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, java.lang.Object state)
public char getCharacter(java.lang.String name) throws FacesExceptionEx
FacesExceptionEx
public void setCharacter(java.lang.String name, char value)
public byte getByte(java.lang.String name) throws FacesExceptionEx
FacesExceptionEx
public void setByte(java.lang.String name, byte value)
public short getShort(java.lang.String name) throws FacesExceptionEx
FacesExceptionEx
public void setShort(java.lang.String name, short value)
public int getInteger(java.lang.String name) throws FacesExceptionEx
FacesExceptionEx
public void setInteger(java.lang.String name, int value)
public long getLong(java.lang.String name) throws FacesExceptionEx
FacesExceptionEx
public void setLong(java.lang.String name, long value)
public float getFloat(java.lang.String name) throws FacesExceptionEx
FacesExceptionEx
public void setFloat(java.lang.String name, float value)
public double getDouble(java.lang.String name) throws FacesExceptionEx
FacesExceptionEx
public void setDouble(java.lang.String name, double value)
public boolean getBoolean(java.lang.String name) throws FacesExceptionEx
FacesExceptionEx
public void setBoolean(java.lang.String name, boolean value)
public java.lang.String getString(java.lang.String name) throws FacesExceptionEx
FacesExceptionEx
public void setString(java.lang.String name, java.lang.String value)
public void beginLazyEvaluate(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)
lazyEvaluate
- the lazyEvaluate to setpublic void endLazyEvaluate(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |