ilog.views.faces.component
Class IlvBasicView

java.lang.Object
  extended by javax.faces.component.UIComponent
      extended by javax.faces.component.UIComponentBase
          extended by javax.faces.component.UIGraphic
              extended by ilog.views.faces.component.IlvBasicView
All Implemented Interfaces:
IlvFacesComponent, IlvFacesConstants, Serializable, StateHolder
Direct Known Subclasses:
IlvBasicViewHelper, IlvFacesView, IlvMessageBox

public class IlvBasicView
extends UIGraphic
implements IlvFacesComponent

This class defines a basic JViews Faces view by extending the JSF UIGraphic object.

Since:
JViews 6.0
See Also:
Serialized Form

Field Summary
protected  IlvObjectSelectedFinder DEFAULT_OBJECT_FINDER
          The default finder used to pick an object on this view.
 
Fields inherited from class javax.faces.component.UIGraphic
COMPONENT_FAMILY, COMPONENT_TYPE
 
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
IlvBasicView()
          Creates a new IlvBasicView instance.
 
Method Summary
 void clearDecodedPropertyMap()
          Clears the decoded properties.
protected  IlvFacesComponent createFacesComponent()
          Creates the instance of IlvFacesComponent that will used as support.
 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).
static String getComponentType()
          Returns the component type identifier of this component.
 Object getData()
          Returns the data to be displayed by this component
 IlvObjectSelectedFinder getDefaultObjectFinder()
          Returns the default finder of this view.
 String getFamily()
          Returns the identifier of the component family to which this component belongs.
 int getHeight()
          Returns the height in pixels of this component.
 IlvMessageBox getMessageBox()
          Returns the associated message box.
 String getMessageBoxId()
          The ID of the associated message box.
 String getStyle()
          Returns the inline client style of this component.
 String getStyleClass()
          Returns the client CSS class(es) of this component.
 int getWidth()
          Returns the width in pixels of this component.
 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 lifecycle.
 void resetDecodedProperties()
          Resets the decoded properties of this component.
 void restoreState(FacesContext context, Object stateObj)
          Restores the state of this component from the stateObj parameter.
 Object saveState(FacesContext context)
          Returns the state of this component.
 void setData(Object data)
          Sets the data to be displayed by this component.
 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 lifecycle.
 void setHeight(int height)
          Sets the height in pixels of this component.
 void setMessageBox(IlvMessageBox messageBox)
          Sets the message box to this instance of this view.
 void setMessageBoxId(String messageBoxId)
          Sets a message box ID to this view.
 void setStyle(String style)
          Sets the inline client style.
 void setStyleClass(String styleClass)
          Sets the client CSS class(es).
 void setWidth(int width)
          Sets the width in pixels of this component.
 void updateModel(FacesContext context)
          This method updates the referenced values with the local values of the component if these values were updated from the client.
 
Methods inherited from class javax.faces.component.UIGraphic
getUrl, getValue, getValueBinding, setUrl, setValue, setValueBinding
 
Methods inherited from class javax.faces.component.UIComponentBase
addFacesListener, broadcast, decode, encodeBegin, encodeChildren, encodeEnd, findComponent, getChildCount, getChildren, getClientId, getFacesContext, getFacesListeners, getFacet, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, isRendered, isTransient, processDecodes, processRestoreState, processSaveState, processValidators, queueEvent, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_OBJECT_FINDER

protected IlvObjectSelectedFinder DEFAULT_OBJECT_FINDER
The default finder used to pick an object on this view.

Since:
JViews 7.5
Constructor Detail

IlvBasicView

public IlvBasicView()
Creates a new IlvBasicView instance.

Method Detail

createFacesComponent

protected IlvFacesComponent createFacesComponent()
Creates the instance of IlvFacesComponent that will used as support.

Returns:
The IlvFacesComponent support object.

getFamily

public String getFamily()

Returns the identifier of the component family to which this component belongs. This identifier, in conjunction with the value of the rendererType property, may be used to select the appropriate Renderer for this component instance.

This implementation returns the fully qualified class name.

Overrides:
getFamily in class UIGraphic
Returns:
The family to which this component belongs.

getComponentType

public static String getComponentType()
Returns the component type identifier of this component.

Returns:
The component type identifier of this component.

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

clearDecodedPropertyMap

public void clearDecodedPropertyMap()
Clears the decoded properties.

Specified by:
clearDecodedPropertyMap in interface IlvFacesComponent

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 lifecycle. 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.

getStyle

public String getStyle()
Returns the inline client style of this component.

Returns:
The inline client style of this component.

getStyleClass

public String getStyleClass()
Returns the client CSS class(es) of this component.

Returns:
The client CSS class(es) of this component.

setStyle

public void setStyle(String style)
Sets the inline client style.

Parameters:
style - The inline client style.

setStyleClass

public void setStyleClass(String styleClass)
Sets the client CSS class(es).

Parameters:
styleClass - The client CSS class(es).

getMessageBox

public IlvMessageBox getMessageBox()
Returns the associated message box.

Returns:
The associated message box.
Since:
JViews 6.5

getMessageBoxId

public String getMessageBoxId()
The ID of the associated message box.

Returns:
The ID of the associated message box.

setMessageBox

public void setMessageBox(IlvMessageBox messageBox)
Sets the message box to this instance of this view. A message box is a component that will display messages from the interactors.

Parameters:
messageBox - The message box to set to the view.
Since:
JViews 6.5

setMessageBoxId

public void setMessageBoxId(String messageBoxId)
Sets a message box ID to this view. This ID will be resolved during the "Render Response Phase". Use the debug dependency tag to show the unresolved dependencies in case of problems. A message box is a component that will display messages from the interactors.

Parameters:
messageBoxId - The ID of the message box to set to the view.

getHeight

public int getHeight()
Returns the height in pixels of this component.

Returns:
The height in pixels of this component.

getWidth

public int getWidth()
Returns the width in pixels of this component.

Returns:
The width in pixels of this component.

setHeight

public void setHeight(int height)
Sets the height in pixels of this component. This attribute will override the size defined by the style or styleClass attribute.


setWidth

public void setWidth(int width)
Sets the width in pixels of this component. This attribute will override the size defined by the style or styleClass attribute.


getData

public Object getData()
Returns the data to be displayed by this component

Returns:
Returns the data to display.
Since:
JViews 7.5

setData

public void setData(Object data)
Sets the data to be displayed by this component.
This type of data accepted by this properties depends on the specific view implementation.

Parameters:
data - The data to display.
Since:
JViews 7.5

getDefaultObjectFinder

public IlvObjectSelectedFinder getDefaultObjectFinder()
Returns the default finder of this view.

Returns:
The default finder if any, null otherwise.
Since:
JViews 7.5
Internal method or field: do not use!

processUpdates

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

Overrides:
processUpdates in class UIComponentBase

updateModel

public void updateModel(FacesContext context)
This method updates the referenced values with the local values of the component if these values were updated from the client.

Parameters:
context - The current faces context.

saveState

public Object saveState(FacesContext context)
Returns the state of this component.

Specified by:
saveState in interface IlvFacesComponent
Specified by:
saveState in interface StateHolder
Overrides:
saveState in class UIGraphic
Parameters:
context - The current faces context.
Returns:
The state of this component.

restoreState

public void restoreState(FacesContext context,
                         Object stateObj)
Restores the state of this component from the stateObj parameter.

Specified by:
restoreState in interface IlvFacesComponent
Specified by:
restoreState in interface StateHolder
Overrides:
restoreState in class UIGraphic
Parameters:
context - The current faces context.
stateObj - The previously saved state of this component.


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