public class IltFacesGraphInteractor extends UICommand implements IlvFacesComponent, IlvFacesInteractor, IlvViewHelper, IlvDHTMLConstants
The IltFacesGraphInteractor faces component implements an
interactor that converts client-side interactions into server-side mouse
events.
The value change listener registered with this component can be called
from inside or outside the JSF life cycle depending on the
invocationContext value. Possible values are:
JSF_CONTEXT: the interactor will submit the page and
the action will be processed during the JSF life cycle.IMAGE_SERVLET_CONTEXT: the interactor will only
query a new image from the server, and the action is processed
out of the JSF life cycle.
The IMAGE_SERVLET_CONTEXT value implies some limitations
and is designed to only allow interactions on the underlying graphic
component, that is, the IlpGraphView view component.
IltFacesFakeGraphInteractor object designed to
provide access to a fake faces view component.IltFacesDHTMLFakeNetworkView object or an
IltFacesDHTMLFakeEquipmentView object and only
allows access to the underlying graphic component
(IlpGraphView).valueChangeEvent.getOldValue() method returns
null.NotInJSFLifecycleException being thrown.In both modes:
IltFacesGraphInteractor source = (IltFacesGraphInteractor)valueChangeEvent.getSource();
boolean inJSFLifecycle = source.getInvocationContext() == IlvDHTMLConstants.JSF_CONTEXT;
IlpNetwork network = ((IltFacesDHTMLNetworkView)source.getView()).getNetwork();
| Modifier and Type | Field and Description |
|---|---|
static Boolean |
AUTO_SUBMIT_DEFAULT_VALUE
The default value for the
autoSubmit property. |
static Integer |
INVOCATION_CONTEXT_DEFAULT_VALUE
The default value of the
invocationContext property. |
static Integer |
LINE_WIDTH_DEFAULT_VALUE
The default value for the
lineWidth property. |
static Boolean |
PARTIAL_SUBMIT_DEFAULT_VALUE
The default value for the
partialSubmit property. |
COMPONENT_FAMILY, COMPONENT_TYPEATTRS_WITH_DECLARED_DEFAULT_VALUES, BEANINFO_KEY, bindings, COMPOSITE_COMPONENT_TYPE_KEY, COMPOSITE_FACET_NAME, CURRENT_COMPONENT, CURRENT_COMPOSITE_COMPONENT, FACETS_KEY, HONOR_CURRENT_COMPONENT_ATTRIBUTES_PARAM_NAME, VIEW_LOCATION_KEYACCESSIBLE, ACTION_NAME, AUTO_SUBMIT, BACKGROUND_COLOR, CAPABILITIES_LOADED_HANDLER, COMPONENT, DO_ACTION_ON_BG_DESELECT, ERROR_MESSAGE, GENERATE_IMAGE_MAP, HOTKEYS, 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, PARTIAL_SUBMIT, PORTLET_CONTEXT_KEY, PORTLET_SESSION_KEY, REPLACE_PATTERN, RESIZABLE, SELECTION_RESIZABLE_CLASS, SESSION_EXP_HANDLER, SUBMITTED_VALUE, WAITING_IMAGEAFTER_HANDLER, BASETEXTDIRECTION, BEFORE_HANDLER, BUTTON_GROUP_ID, BUTTON_TYPE, CHARTS_BUNDLE, CHARTS_MESSAGE_BUNDLE, CORE_BUNDLE, CORE_MESSAGE_BUNDLE, CURSOR, DATA, DECODED_PROPERTY, DEFAULT_LINE_COLOR, DELETION_ALLOWED, DIAGRAMMER_BUNDLE, DIAGRAMMER_MESSAGE_BUNDLE, ENABLED, EVENT_TYPE, FILL_ON, FORCE_UPDATE_PROPERTIES, FRAMEWORK_BUNDLE, FRAMEWORK_MESSAGE_BUNDLE, GANTT_BUNDLE, GANTT_MESSAGE_BUNDLE, HEIGHT, IMAGE, IMAGE_MODE, INFO_PROVIDER_MB, INT_NOT_DEFINED, INTERACTORS, INTERCEPT_INTERACTOR, ITEM_DISABLED_STYLE_CLASS, ITEM_HIGHLIGHTED_STYLE_CLASS, ITEM_STYLE_CLASS, LINE_COLOR, LINE_WIDTH, MAPS_BUNDLE, MAPS_MESSAGE_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, PROGRESSIVE_ZOOM, PROJECT, RENDER, RESOURCES_PATH, RESOURCES_PATH_PREFIX, ROLLOVER_IMAGE, SCROLL_BAR, SELECTED, SELECTED_IMAGE, SERVICE_FORWARD, SERVICE_FORWARD_INT, SERVLET, SERVLET_CLASS, SERVLET_URL, STYLE, STYLE_CLASS, TGO_BUNDLE, TGO_MESSAGE_BUNDLE, TITLE, TOGGLE, VALUE, VIEW, VIEW_ID, WIDTH| Constructor and Description |
|---|
IltFacesGraphInteractor()
Creates a new
IltFacesGraphInteractor instance. |
| Modifier and Type | Method and Description |
|---|---|
void |
broadcast(FacesEvent event)
Invoke any listeners attached to this object which are listening for
an event whose type matches the specified event's runtime type.
|
void |
clearDecodedPropertyMap()
Clears the decoded properties.
|
String |
getActionName()
Returns the action name.
|
Map |
getAttributes()
Returns a mutable
Map instance representing the attributes
and properties associated with this UIComponent object
keyed by attribute name. |
static String |
getComponentType()
Returns the component type identifier of this component.
|
String |
getCursor()
Returns the
cursor property, that is, the mouse cursor to be
displayed when using this interactor. |
String |
getFamily() |
int |
getInvocationContext()
Returns the
invocationContext property. |
Color |
getLineColor()
Returns the
lineColor property. |
int |
getLineWidth()
Returns the
lineWidth property. |
String |
getMenuModelId()
Returns the
menuModelId property, that is, the model
identifier used in menu operations. |
String |
getMessage()
Returns the
message property, that is, the text displayed by
the message box attached to the view if there is one. |
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
autoSubmit property. |
boolean |
isDecodedProperty(String property)
Returns
true if the specified property was decoded during the "Apply
Request Value" phase of the JSF lifecycle, false otherwise. |
boolean |
isPartialSubmit()
Returns the
partialSubmit property. |
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 |
setActionName(String actionName)
Sets the action name of the event that will be triggered when this
interactor is used.
|
void |
setAutoSubmit(boolean autoSubmit)
Sets the
autoSubmit property. |
void |
setCursor(String cursor)
Sets the
cursor property. |
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
invocationContext property. |
void |
setLineColor(Color lineColor)
Sets the
lineColor property. |
void |
setLineWidth(int lineWidth)
Sets the
lineWidth property. |
void |
setMenuModelId(String modelId)
Sets the
menuModelId property. |
void |
setMessage(String message)
Sets the
message property. |
void |
setPartialSubmit(boolean partialSubmit)
Sets the
partialSubmit property. |
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 by the local values of the
component if these values were updated from the client.
|
addActionListener, getAction, getActionExpression, getActionListener, getActionListeners, getValue, isImmediate, queueEvent, removeActionListener, setAction, setActionExpression, setActionListener, setImmediate, setValueaddClientBehavior, addFacesListener, clearInitialState, decode, encodeBegin, encodeChildren, encodeEnd, findComponent, getChildCount, getChildren, getClientBehaviors, getClientId, getDefaultEventName, getEventNames, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getListenersForEventClass, getParent, getPassThroughAttributes, getRenderer, getRendererType, getRendersChildren, getValueBinding, invokeOnComponent, isRendered, isTransient, markInitialState, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding, subscribeToEvent, unsubscribeFromEventencodeAll, getClientId, getCompositeComponentParent, getContainerClientId, getCurrentComponent, getCurrentCompositeComponent, getNamingContainer, getPassThroughAttributes, getResourceBundleMap, getStateHelper, getStateHelper, getTransientStateHelper, getTransientStateHelper, getValueExpression, initialStateMarked, isCompositeComponent, isInView, isVisitable, popComponentFromEL, processEvent, pushComponentToEL, restoreTransientState, saveTransientState, setInView, setValueExpression, visitTreepublic static final Integer LINE_WIDTH_DEFAULT_VALUE
lineWidth property.public static final Boolean AUTO_SUBMIT_DEFAULT_VALUE
autoSubmit property.public static final Boolean PARTIAL_SUBMIT_DEFAULT_VALUE
partialSubmit property.public static final Integer INVOCATION_CONTEXT_DEFAULT_VALUE
invocationContext property.public IltFacesGraphInteractor()
IltFacesGraphInteractor instance.public int getLineWidth()
lineWidth property.public void setLineWidth(int lineWidth)
lineWidth property.lineWidth - The line width of the dragged rectangle.public Color getLineColor()
lineColor property. This is an HTML color.public void setLineColor(Color lineColor)
lineColor property. This is an HTML color.lineColor - The color of the dragged rectangle.public boolean isAutoSubmit()
autoSubmit property.public boolean isPartialSubmit()
partialSubmit property.public void setAutoSubmit(boolean autoSubmit)
autoSubmit property.autoSubmit - The auto submit mode to set.public void setPartialSubmit(boolean partialSubmit)
partialSubmit property.partialSubmit - The partial submit mode to set.public int getInvocationContext()
invocationContext property.JSF_CONTEXT or
IMAGE_SERVLET_CONTEXT.public void setInvocationContext(int invocationContext)
invocationContext property. Valid values are
IlvDHTMLConstants.JSF_CONTEXT and
IlvDHTMLConstants.IMAGE_SERVLET_CONTEXT.invocationContext - The invocation context to be set.public String getActionName()
Returns the action name. An action event will be triggered with this name when the interactor is used.
The default action name is "jtgointeractor".
public void setActionName(String actionName)
Sets the action name of the event that will be triggered when this interactor is used.
The default action name is "jtgointeractor".
actionName - The name of the action.public static String getComponentType()
public String getCursor()
cursor property, that is, the mouse cursor to be
displayed when using this interactor.getCursor in interface IlvFacesInteractorpublic void setCursor(String cursor)
cursor property. Valid values are the values
supported by the target browsers.setCursor in interface IlvFacesInteractorcursor - The mouse cursor to be set.public String getMessage()
message property, that is, the text displayed by
the message box attached to the view if there is one.getMessage in interface IlvFacesInteractorpublic void setMessage(String message)
message property.setMessage in interface IlvFacesInteractormessage - The message text displayed when using this interactor.public String getMenuModelId()
menuModelId property, that is, the model
identifier used in menu operations.getMenuModelId in interface IlvFacesInteractorpublic void setMenuModelId(String modelId)
menuModelId property.setMenuModelId in interface IlvFacesInteractormodelId - The menu model identifier for this interactor.public boolean isDecodedProperty(String property)
true if the specified property was decoded during the "Apply
Request Value" phase of the JSF lifecycle, false otherwise.isDecodedProperty in interface IlvFacesComponentproperty - The property to test.true if the property was decoded, false otherwise.public void setDecodedProperty(String property)
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.setDecodedProperty in interface IlvFacesComponentproperty - The property to set to decoded.public void resetDecodedProperties()
resetDecodedProperties in interface IlvFacesComponentpublic void clearDecodedPropertyMap()
clearDecodedPropertyMap in interface IlvFacesComponentpublic String getViewId()
getViewId in interface IlvViewHelperpublic void setViewId(String viewId)
setViewId in interface IlvViewHelperviewId - The ID of the view.public IlvBasicView getView()
getView in interface IlvViewHelperpublic void setView(IlvBasicView view)
setView in interface IlvViewHelperview - The view component associated with this component.public void updateModel(FacesContext context)
updateModel in interface IlvViewHelpercontext - The current faces context.public Map getAttributes()
Returns a mutable Map instance representing the attributes
and properties associated with this UIComponent object
keyed by attribute name. The attribute name must be a String.
The implementation returned must support all of the standard and optional
Map methods, plus support the following additional
requirements:
Map implementation must implement
the java.io.Serializable interface.null key or value must
throw a NullPointerException.String object must
throw a ClassCastException.UIComponent object, the
methods listed below will have the following behavior:
containsKey: returns false.get(): if the property is readable, call
the getter method to retrieve the returned value. Primitive
values are wrapped in their corresponding wrapper classes.
Otherwise throw IllegalArgumentException.put(): if the property is writable, call
the setter method to set the corresponding value. Primitive values
are unwrapped in their corresponding wrapper classes.
If the property is not writable, or an attempt is made to
set a property of primitive type to null,
throw IllegalArgumentException.remove: throws
IllegalArgumentException.getAttributes in class UIComponentBasepublic Object saveState(FacesContext context)
saveState in interface IlvFacesComponentsaveState in interface IlvViewHelpersaveState in interface StateHoldersaveState in class UIComponentBasecontext - The current faces context.public void restoreState(FacesContext context, Object stateObj)
restoreState in interface IlvFacesComponentrestoreState in interface IlvViewHelperrestoreState in interface StateHolderrestoreState in class UIComponentBasecontext - The current faces context.stateObj - The previously saved state of this component.public void broadcast(FacesEvent event) throws AbortProcessingException
Invoke any listeners attached to this object which are listening for an event whose type matches the specified event's runtime type.
This method does not propagate the event up to parent components, ie listeners attached to parent components don't automatically get called.
broadcast in class UICommandevent - The FacesEvent, it must not be nullAbortProcessingException© Copyright Rogue Wave Software, Inc. 1997, 2017. All Rights Reserved.