ilog.views.faces.dhtml.interactor
Class IlvObjectSelectInteractor

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 ilog.views.faces.dhtml.interactor.IlvObjectSelectInteractor
All Implemented Interfaces:
IlvFacesComponent, IlvViewHelper, IlvDHTMLConstants, IlvFacesConstants, IlvFacesInteractor, Serializable, EditableValueHolder, StateHolder, ValueHolder
Direct Known Subclasses:
IlvFacesNodeOrLinkSelectInteractor, IlvFacesObjectSelectInteractor, IlvObjectSelectRectInteractor

public abstract class IlvObjectSelectInteractor
extends UIInput
implements IlvFacesComponent, IlvFacesInteractor, IlvDHTMLConstants, IlvViewHelper

This class defines an interactor that allows you to select a model object from a view.
Each subclass must register an objectSelectedFinder that will set the value from the JViews Faces View and the parameters passed from the renderer.

Since:
JViews 6.5
See Also:
Serialized Form

Field Summary
static Boolean AUTO_SUBMIT_DEFAULT_VALUE
          Default value of autoSubmit property
static Integer INVOCATION_CONTEXT_DEFAULT_VALUE
          Default value of invocationContext property (JSF_CONTEXT).
 
Fields inherited from class javax.faces.component.UIInput
COMPONENT_FAMILY, COMPONENT_TYPE, CONVERSION_MESSAGE_ID, REQUIRED_MESSAGE_ID
 
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
 
Fields inherited from interface ilog.views.faces.dhtml.IlvDHTMLConstants
AUTO_SUBMIT, BACKGROUND_COLOR, CAPABILITIES_LOADED_HANDLER, COMPONENT, DO_ACTION_ON_BG_DESELECT, ERROR_MESSAGE, GENERATE_IMAGE_MAP, IMAGE_FORMAT, IMAGE_LOADED_HANDLER, IMAGE_MAP_GENERATOR, IMAGE_MAP_GENERATOR_CLASS, IMAGE_MAP_VISIBLE, IMAGE_SERVLET_CONTEXT, INVOCATION_CONTEXT, JSF_CONTEXT, ON_CLICK, ON_SELECTION_CHANGED, PORTLET_CONTEXT_KEY, PORTLET_SESSION_KEY, REPLACE_PATTERN, RESIZABLE, SESSION_EXP_HANDLER, SUBMITTED_VALUE, WAITING_IMAGE
 
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
 
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
IlvObjectSelectInteractor()
          Creates a new IlvObjectSelectInteractor instance.
 
Method Summary
 void clearDecodedPropertyMap()
          Clears the decoded properties.
 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 getCursor()
          Returns the mouse cursor to be displayed when using this interactor.
 int getInvocationContext()
          Returns the invocation context of the valueChangeListener.
 String getMenuModelId()
          Sets the model ID used in menu generation.
 String getMessage()
          Returns the message displayed by the message box attached to the view (if any) to which this interactor is attached.
 IlvObjectSelectedFinder getObjectSelectedFinder()
          Returns the object selected finder instance.
 IlvBasicView getView()
          Returns the view component associated with this component.
 String getViewId()
          Returns the ID of the view linked to this component.
 boolean isAutoSubmit()
          Returns the auto submit mode.
 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 resetDecodedProperties()
          Resets the decoded properties of this component.
 void restoreState(FacesContext context, Object stateObj)
          Restores the state of this component from the state parameter.
 Object saveState(FacesContext context)
          Returns the state of this component.
 void setAutoSubmit(boolean autoSubmit)
          Sets the auto submit mode.
 void setCursor(String cursor)
          Sets the mouse cursor to be displayed when using this interactor.
 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 setInvocationContext(int invocationContext)
          Sets the invocation context of the valueChangeListener.
 void setMenuModelId(String modelId)
          Returns the model ID used in menu generation.
 void setMessage(String message)
          Sets the message displayed when using this interactor.
 void setObjectSelectedFinder(IlvObjectSelectedFinder objectSelectFinder)
          Sets the object selected finder instance.
 void setView(IlvBasicView view)
          Sets the view component associated with this component.
 void setViewId(String viewId)
          Sets the ID of the view linked to 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.
 void validate(FacesContext context)
          Overrides UIInput.validate(FacesContext) to launch an event event if UIInput.getSubmittedValue() returns null.
 
Methods inherited from class javax.faces.component.UIInput
addValidator, addValueChangeListener, broadcast, compareValues, decode, getConvertedValue, getFamily, getSubmittedValue, getValidator, getValidators, getValueChangeListener, getValueChangeListeners, isImmediate, isLocalValueSet, isRequired, isValid, processDecodes, processUpdates, processValidators, removeValidator, removeValueChangeListener, setImmediate, setLocalValueSet, setRequired, setSubmittedValue, setValid, setValidator, setValue, setValueChangeListener, validateValue
 
Methods inherited from class javax.faces.component.UIOutput
getConverter, getLocalValue, getValue, setConverter
 
Methods inherited from class javax.faces.component.UIComponentBase
addFacesListener, encodeBegin, encodeChildren, encodeEnd, findComponent, getChildCount, getChildren, getClientId, getFacesContext, getFacesListeners, getFacet, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, isRendered, isTransient, processRestoreState, processSaveState, queueEvent, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.faces.component.ValueHolder
getConverter, getLocalValue, getValue, setConverter
 

Field Detail

AUTO_SUBMIT_DEFAULT_VALUE

public static final Boolean AUTO_SUBMIT_DEFAULT_VALUE
Default value of autoSubmit property


INVOCATION_CONTEXT_DEFAULT_VALUE

public static final Integer INVOCATION_CONTEXT_DEFAULT_VALUE
Default value of invocationContext property (JSF_CONTEXT).

Since:
JViews 7.5
Constructor Detail

IlvObjectSelectInteractor

public IlvObjectSelectInteractor()
Creates a new IlvObjectSelectInteractor instance.

Method Detail

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

isAutoSubmit

public boolean isAutoSubmit()
Returns the auto submit mode. If true, this interactor will submit the enclosing form on a click event. The auto submit mode is set to true by default.

Returns:
The auto submit mode.

setAutoSubmit

public void setAutoSubmit(boolean autoSubmit)
Sets the auto submit mode. If true, this interactor will submit the enclosing form on a click event. The auto submit mode is set to true by default.

Parameters:
autoSubmit - The auto submit to set.

getView

public IlvBasicView getView()
Returns the view component associated with this component.

Specified by:
getView in interface IlvViewHelper
Returns:
The view component associated with this component.

getViewId

public String getViewId()
Returns the ID of the view linked to this component.

Specified by:
getViewId in interface IlvViewHelper
Returns:
The ID of the view linked to this component.

setView

public void setView(IlvBasicView view)
Sets the view component associated with this component.

Specified by:
setView in interface IlvViewHelper
Parameters:
view - The view component associated with this component.

setViewId

public void setViewId(String viewId)
Sets the ID of the view linked to this component.

Specified by:
setViewId in interface IlvViewHelper
Parameters:
viewId - The ID of the view.

clearDecodedPropertyMap

public void clearDecodedPropertyMap()
Clears the decoded properties.

Specified by:
clearDecodedPropertyMap in interface IlvFacesComponent

getObjectSelectedFinder

public IlvObjectSelectedFinder getObjectSelectedFinder()
Returns the object selected finder instance. This instance will find the clicked object from the view and the parameters.

Returns:
The finder attached to this interactor.

setObjectSelectedFinder

public void setObjectSelectedFinder(IlvObjectSelectedFinder objectSelectFinder)
Sets the object selected finder instance. This instance will find the clicked object from the view and the parameters.

Parameters:
objectSelectFinder - The finder to attach to this interactor.

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.

getCursor

public String getCursor()
Returns the mouse cursor to be displayed when using this interactor.

Specified by:
getCursor in interface IlvFacesInteractor
Returns:
The cursor of the interactor.

getMessage

public String getMessage()
Returns the message displayed by the message box attached to the view (if any) to which this interactor is attached.

Specified by:
getMessage in interface IlvFacesInteractor
Returns:
The message for this interactor.

setCursor

public void setCursor(String cursor)
Sets the mouse cursor to be displayed when using this interactor. Valid values are the values supported by the target browsers.

Specified by:
setCursor in interface IlvFacesInteractor
Parameters:
cursor - The cursor to set.

setMessage

public void setMessage(String message)
Sets the message displayed when using this interactor. The message will be displayed in the message box attached to the view, if any.

Specified by:
setMessage in interface IlvFacesInteractor
Parameters:
message - The message displayed when using this interactor.

getInvocationContext

public int getInvocationContext()
Returns the invocation context of the valueChangeListener.
Valid values are IlvDHTMLConstants.JSF_CONTEXT and IlvDHTMLConstants.IMAGE_SERVLET_CONTEXT:

Returns:
The invocation context.
Since:
JViews 7.5

setInvocationContext

public void setInvocationContext(int invocationContext)
Sets the invocation context of the valueChangeListener.
Valid values are IlvDHTMLConstants.JSF_CONTEXT and IlvDHTMLConstants.IMAGE_SERVLET_CONTEXT:

Parameters:
invocationContext - The invocation context.
Since:
JViews 7.5

getMenuModelId

public String getMenuModelId()
Sets the model ID used in menu generation.

Specified by:
getMenuModelId in interface IlvFacesInteractor
Returns:
The menu model ID of this interactor.
Since:
JViews 7.5

setMenuModelId

public void setMenuModelId(String modelId)
Returns the model ID used in menu generation.

Specified by:
setMenuModelId in interface IlvFacesInteractor
Parameters:
modelId - The model ID of this interactor.
Since:
JViews 7.5

validate

public void validate(FacesContext context)
Overrides UIInput.validate(FacesContext) to launch an event event if UIInput.getSubmittedValue() returns null.

Overrides:
validate in class UIInput

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.

Specified by:
updateModel in interface IlvViewHelper
Overrides:
updateModel in class UIInput
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 IlvViewHelper
Specified by:
saveState in interface StateHolder
Overrides:
saveState in class UIInput
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 state parameter.

Specified by:
restoreState in interface IlvFacesComponent
Specified by:
restoreState in interface IlvViewHelper
Specified by:
restoreState in interface StateHolder
Overrides:
restoreState in class UIInput
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.