ilog.views.faces.dhtml.component
Class IlvDHTMLImageButton

java.lang.Object
  extended by javax.faces.component.UIComponent
      extended by javax.faces.component.UIComponentBase
          extended by javax.faces.component.UICommand
              extended by ilog.views.faces.component.IlvImageButton
                  extended by ilog.views.faces.dhtml.component.IlvDHTMLImageButton
All Implemented Interfaces:
IlvFacesComponent, IlvDHTMLConstants, IlvFacesConstants, Serializable, ActionSource, ActionSource2, StateHolder

public class IlvDHTMLImageButton
extends IlvImageButton
implements IlvDHTMLConstants

This class defines a DHTML button that is represented by images depending on its state (normal, highlighted, selected).
The size of the button is determined by the style set through the style and styleClass properties.
If the button is in "button" type, the JavaScript onclick action is executed.

Since:
JViews 6.0
See Also:
Serialized Form

Field Summary
static Boolean DO_ACTION_ON_BG_DESELECT_DEFAULT_VALUE
          Default value of doActionOnBGDeselect property
 
Fields inherited from class ilog.views.faces.component.IlvImageButton
ENABLED_DEFAULT_VALUE, SELECTED_DEFAULT_VALUE, TOGGLE_DEFAULT_VALUE
 
Fields inherited from class javax.faces.component.UICommand
COMPONENT_FAMILY, COMPONENT_TYPE
 
Fields inherited from class javax.faces.component.UIComponent
bindings
 
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
 
Constructor Summary
IlvDHTMLImageButton()
          Creates a new IlvDHTMLImageButton instance.
 
Method Summary
static String getComponentType()
          Returns the type of this component.
 String getFamily()
          
 IlvMessageBox getMessageBox()
          Returns the message box.
 String getMessageBoxId()
          Returns the message box identifier.
 String getOnclick()
          Returns the onclick action of the button.
 String getStyle()
          Returns the inline client style of this component.
 String getStyleClass()
          Returns the client CSS class(es) of this component.
 String getTitle()
          Returns the title of the button.
 String getType()
          Returns the type of the button.
 boolean isDoActionOnBGDeselect()
          Returns whether the button should execute its action when it's deselected by its button group.
 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 setDoActionOnBGDeselect(boolean doActionOnBGDeselect)
          Sets whether the button should execute its action when it's deselected by its button group.
 void setMessageBox(IlvMessageBox messageBox)
          The message box property.
 void setMessageBoxId(String messageBoxId)
          The message box identifier property.
 void setOnclick(String onclick)
          Sets the onclick action of the button.
 void setStyle(String style)
          The inline client style of this component.
 void setStyleClass(String styleClass)
          The client CSS class(es) of this component.
 void setTitle(String title)
          The title of the button.
 void setType(String type)
          Sets the type of the button.
 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 ilog.views.faces.component.IlvImageButton
clearDecodedPropertyMap, createFacesComponent, getAttributes, getButtonGroupId, getCursor, getImage, getMessage, getOrCreateButtonGroup, getRolloverImage, getSelectedImage, getValue, isDecodedProperty, isEnabled, isSelected, isToggle, processUpdates, resetDecodedProperties, setButtonGroupId, setCursor, setDecodedProperty, setEnabled, setImage, setMessage, setRolloverImage, setSelected, setSelectedImage, setToggle, setValue
 
Methods inherited from class javax.faces.component.UICommand
addActionListener, broadcast, getAction, getActionExpression, getActionListener, getActionListeners, isImmediate, queueEvent, removeActionListener, setAction, setActionExpression, setActionListener, setImmediate
 
Methods inherited from class javax.faces.component.UIComponentBase
addFacesListener, decode, encodeBegin, encodeChildren, encodeEnd, findComponent, getChildCount, getChildren, getClientId, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, getValueExpression, invokeOnComponent, isRendered, isTransient, processDecodes, processRestoreState, processSaveState, processValidators, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding, setValueExpression
 
Methods inherited from class javax.faces.component.UIComponent
encodeAll, getContainerClientId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DO_ACTION_ON_BG_DESELECT_DEFAULT_VALUE

public static final Boolean DO_ACTION_ON_BG_DESELECT_DEFAULT_VALUE
Default value of doActionOnBGDeselect property

Since:
JViews 7.5
Constructor Detail

IlvDHTMLImageButton

public IlvDHTMLImageButton()
Creates a new IlvDHTMLImageButton instance.

Method Detail

getFamily

public String getFamily()

Overrides:
getFamily in class UICommand

getComponentType

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

Returns:
The type of this component.

getStyle

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

Returns:
The style.

setStyle

public void setStyle(String style)
The inline client style of this component.

Parameters:
style - The style to set.

getStyleClass

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

Returns:
The styleClass.

setStyleClass

public void setStyleClass(String styleClass)
The client CSS class(es) of this component.

Parameters:
styleClass - The styleClass to set.

getTitle

public String getTitle()
Returns the title of the button.

Returns:
The title.

setTitle

public void setTitle(String title)
The title of the button.

Parameters:
title - The title to set.

getType

public String getType()
Returns the type of the button. Valid values are "submit" or "button". A "submit" button will submit a new request to the server. A button set in "button" type will execute the onclick action without requesting the server.

Returns:
The button type.

getMessageBox

public IlvMessageBox getMessageBox()
Returns the message box.

Returns:
The message box.
Since:
JViews 6.5

setMessageBox

public void setMessageBox(IlvMessageBox messageBox)
The message box property.

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

getMessageBoxId

public String getMessageBoxId()
Returns the message box identifier.

Returns:
The message box ID.
Since:
JViews 6.5

setMessageBoxId

public void setMessageBoxId(String messageBoxId)
The message box identifier property.

Parameters:
messageBoxId - The message box ID to set.
Since:
JViews 6.5

setType

public void setType(String type)
Sets the type of the button. Valid values are "submit" or "button". A "submit" button will submit a new request to the server. A button set in "button" type will execute the onclick action without requesting the server.

Parameters:
type - The button type to be set.

getOnclick

public String getOnclick()
Returns the onclick action of the button. This JavaScript action will be executed when the button is clicked.

Returns:
The onclick action.

setOnclick

public void setOnclick(String onclick)
Sets the onclick action of the button. This JavaScript action will be executed when the button is clicked.

Parameters:
onclick - The onclick action to be to set on this button.

isDoActionOnBGDeselect

public boolean isDoActionOnBGDeselect()
Returns whether the button should execute its action when it's deselected by its button group. It's happening when another button of the button group is selected.

Returns:
The doActionOnBGDeselect.
Since:
JViews 7.5

setDoActionOnBGDeselect

public void setDoActionOnBGDeselect(boolean doActionOnBGDeselect)
Sets whether the button should execute its action when it's deselected by its button group. It's happening when another button of the button group is selected.

Parameters:
doActionOnBGDeselect - The doActionOnBGDeselect to set.
Since:
JViews 7.5

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.

Overrides:
updateModel in class IlvImageButton
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 IlvImageButton
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 StateHolder
Overrides:
restoreState in class IlvImageButton
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.   . All Rights Reserved.