ilog.views.faces.component
Class IlvFacesComponentBase

java.lang.Object
  extended by javax.faces.component.UIComponent
      extended by javax.faces.component.UIComponentBase
          extended by ilog.views.faces.component.IlvFacesComponentBase
All Implemented Interfaces:
IlvFacesComponent, IlvFacesConstants, Serializable, StateHolder
Direct Known Subclasses:
IlvFacesDiagrammerDataSource, IlvFacesLayerVisibilityTool, IlvFacesSelectionManager, IlvInteractor

public abstract class IlvFacesComponentBase
extends UIComponentBase
implements IlvFacesComponent

This class is a base class for a JViews Faces component. It extends UIComponentBase. If you want to extend from another JavaServer Faces base class, you have to implement the IlvFacesComponent interface. An IlvFacesComponentImpl utility class implements the methods defined by this interface.

Since:
JViews 6.0
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface ilog.views.faces.IlvFacesConstants
BUTTON_GROUP_ID, BUTTON_TYPE, CHARTS_BUNDLE, CORE_BUNDLE, CURSOR, DATA, DECODED_PROPERTY, DEFAULT_LINE_COLOR, DELETION_ALLOWED, DIAGRAMMER_BUNDLE, ENABLED, FILL_ON, FORCE_UPDATE_PROPERTIES, FRAMEWORK_BUNDLE, GANTT_BUNDLE, HEIGHT, IMAGE, IMAGE_MODE, INFO_PROVIDER_MB, INT_NOT_DEFINED, ITEM_DISABLED_STYLE_CLASS, ITEM_HIGHLIGHTED_STYLE_CLASS, ITEM_STYLE_CLASS, LINE_COLOR, LINE_WIDTH, MAPS_BUNDLE, MENU_MODEL_ID, MESSAGE, MESSAGE_BOX, MESSAGE_BOX_ID, MOVE_ALLOWED, OBJECT_FINDER, PARAM_COMPID, PARAM_DATA, PARAM_KEY, PARAM_NAMESPACE, PARAM_RESOURCE, PARAM_SERVICE, PARAM_TYPE, POPUP_MENU, POPUP_MENU_FACTORY, POPUP_MENU_FACTORY_CLASS, PORTLET_NAMESPACE, PROJECT, RESOURCES_PATH, RESOURCES_PATH_PREFIX, ROLLOVER_IMAGE, SELECTED, SELECTED_IMAGE, SERVICE_FORWARD, SERVICE_FORWARD_INT, SERVLET, SERVLET_CLASS, SERVLET_URL, STYLE, STYLE_CLASS, TGO_BUNDLE, TITLE, TOGGLE, VALUE, VIEW, VIEW_ID, WIDTH
 
Constructor Summary
protected IlvFacesComponentBase()
          Creates a new IlvFacesComponentBase instance.
 
Method Summary
 void clearDecodedPropertyMap()
          Clears the decoded properties.
protected  IlvFacesComponent createFacesComponent()
          Creates the IlvFacesComponent implementation.
 Map getAttributes()
          Return a mutable Map representing the attributes (and properties, see below) associated with this UIComponent, keyed by attribute name (which must be a String).
 String getClientId(FacesContext context)
          
 boolean isDecodedProperty(String property)
          Returns true if the specified property was decoded during the "Apply Request Value" phase of the JSF lifecycle, false otherwise.
 void processUpdates(FacesContext context)
          Handles the "Update Model Values" phase of the JSF life cycle.
 void resetDecodedProperties()
          Resets the decoded properties of this component.
 void restoreState(FacesContext context, Object stateObj)
           Perform any processing required to restore the state from the entries in the state Object.
 Object saveState(FacesContext context)
           Gets the state of the instance as a Serializable Object.
 void setDecodedProperty(String property)
          Sets the property to decoded, which means that the property value was updated from the request during the "Apply Request Value" phase of the JSF life cycle.
 void updateModel(FacesContext facesContext)
          Handles the "Update Model Values" phase of the JSF life cycle.
 
Methods inherited from class javax.faces.component.UIComponentBase
addFacesListener, broadcast, decode, encodeBegin, encodeChildren, encodeEnd, findComponent, getChildCount, getChildren, getFacesContext, getFacesListeners, getFacet, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, isRendered, isTransient, processDecodes, processRestoreState, processSaveState, processValidators, queueEvent, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding
 
Methods inherited from class javax.faces.component.UIComponent
getFamily
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IlvFacesComponentBase

protected IlvFacesComponentBase()
Creates a new IlvFacesComponentBase instance.

Method Detail

createFacesComponent

protected IlvFacesComponent createFacesComponent()
Creates the IlvFacesComponent implementation. By default, it returns an instance of IlvFacesComponentImpl.

Returns:
The IlvFacesComponent implementation.

getAttributes

public Map getAttributes()

Return a mutable Map representing the attributes (and properties, see below) associated with this UIComponent, keyed by attribute name (which must be a String). The returned implementation must support all of the standard and optional Map methods, plus support the following additional requirements:

Overrides:
getAttributes in class UIComponentBase
Since:
JViews 8.1

isDecodedProperty

public boolean isDecodedProperty(String property)
Returns true if the specified property was decoded during the "Apply Request Value" phase of the JSF lifecycle, false otherwise.

Specified by:
isDecodedProperty in interface IlvFacesComponent
Parameters:
property - The property to test.
Returns:
true if the property was decoded, false otherwise.

resetDecodedProperties

public void resetDecodedProperties()
Resets the decoded properties of this component.

Specified by:
resetDecodedProperties in interface IlvFacesComponent

setDecodedProperty

public void setDecodedProperty(String property)
Sets the property to decoded, which means that the property value was updated from the request during the "Apply Request Value" phase of the JSF life cycle. This method must be called by renderers only during the execution of their decode method.

Specified by:
setDecodedProperty in interface IlvFacesComponent
Parameters:
property - The property to set to decoded.

clearDecodedPropertyMap

public void clearDecodedPropertyMap()
Clears the decoded properties.

Specified by:
clearDecodedPropertyMap in interface IlvFacesComponent

processUpdates

public void processUpdates(FacesContext context)
Handles the "Update Model Values" phase of the JSF life cycle.

Overrides:
processUpdates in class UIComponentBase

updateModel

public void updateModel(FacesContext facesContext)
Handles the "Update Model Values" phase of the JSF life cycle. This method updates the referenced values with the local values of the component if theses values were updated during the "Apply Request Values" phase.

Parameters:
facesContext - The current faces context.

saveState

public Object saveState(FacesContext context)

Gets the state of the instance as a Serializable Object.

If the class that implements this interface has references to instances that implement StateHolder (such as a UIComponent with event handlers, validators, etc.) this method must call the saveState(javax.faces.context.FacesContext) method on all those instances as well. This method must not save the state of children and facets.

This method must not alter the state of the implementing object. In other words, after executing this code:

 Object state = component.saveState(facesContext);
 

component should be the same as before executing it.

The return from this method must be Serializable

Specified by:
saveState in interface IlvFacesComponent
Specified by:
saveState in interface StateHolder
Overrides:
saveState in class UIComponentBase
Parameters:
context - The current faces context.
Returns:
The state of this component.
Throws:
NullPointerException - if context is null

restoreState

public void restoreState(FacesContext context,
                         Object stateObj)

Perform any processing required to restore the state from the entries in the state Object.

If the class that implements this interface has references to instances that also implement StateHolder (such as a UIComponent with event handlers, validators, etc.) this method must call the restoreState(javax.faces.context.FacesContext, java.lang.Object) method on all those instances as well.

Specified by:
restoreState in interface IlvFacesComponent
Specified by:
restoreState in interface StateHolder
Overrides:
restoreState in class UIComponentBase
Parameters:
context - The current faces context.
stateObj - The previously saved state of this component.
Throws:
NullPointerException - if either context or state are null

getClientId

public String getClientId(FacesContext context)

Overrides:
getClientId in class UIComponentBase


Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.