|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.faces.component.UIComponent
javax.faces.component.UIComponentBase
javax.faces.component.UICommand
ilog.views.faces.component.IlvImageButton
public class IlvImageButton
This class defines a DHTML button that is represented by images depending on
its state (normal, highlighted, selected).
This button can be a toggle
button (and so have two selection states: selected and not selected) and be a part of
a button group in which one button can be selected at a time.
| Field Summary | |
|---|---|
static Boolean |
ENABLED_DEFAULT_VALUE
Default value of enabled property. |
static Boolean |
SELECTED_DEFAULT_VALUE
Default value of selected property. |
static Boolean |
TOGGLE_DEFAULT_VALUE
Default value of toggle property. |
| Fields inherited from class javax.faces.component.UICommand |
|---|
COMPONENT_FAMILY, COMPONENT_TYPE |
| Constructor Summary | |
|---|---|
IlvImageButton()
Creates a new IlvImageButton instance. |
|
| Method Summary | |
|---|---|
void |
clearDecodedPropertyMap()
Clears the decoded properties. |
IlvFacesComponent |
createFacesComponent()
Creates the component that handles the implementation of the IlvFacesComponent interface. |
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 |
getButtonGroupId()
Returns the identifier of the button group. |
String |
getCursor()
Returns the cursor displayed when the mouse is on the button. |
String |
getImage()
Returns the URL of the image representing the button. |
String |
getMessage()
Returns the message that can be displayed when the cursor is on the button. |
IlvButtonGroup |
getOrCreateButtonGroup(String buttonGroupId)
Finds a button group from its identifier as a child of the view root. |
String |
getRolloverImage()
Returns the URL of the image representing the button when the cursor is over the button. |
String |
getSelectedImage()
Returns the URL of the image representing the button when this button is selected. |
Object |
getValue()
Returns the selection state of this button. |
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 |
isEnabled()
Returns the enabled state of this button. |
boolean |
isSelected()
Returns the selection state of this button. |
boolean |
isToggle()
Returns the toggle state of this button. |
void |
processUpdates(FacesContext context)
Perform the component tree processing required by the Update Model Values phase of the request processing lifecycle for all facets of this component, all children of this component, and this component itself, as follows. |
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 |
setButtonGroupId(String buttonGroupId)
Sets the identifier of the button group linked to this button. |
void |
setCursor(String cursor)
Sets the cursor displayed when the mouse is on the button. |
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 |
setEnabled(boolean enabled)
Determines whether this button is a enable or not. |
void |
setImage(String image)
Sets the URL of the image representing the button. |
void |
setMessage(String message)
Sets the message that can be displayed when the cursor is on the button. |
void |
setRolloverImage(String rolloverImage)
Sets the URL of the image representing the button when the cursor is over the button. |
void |
setSelected(boolean selected)
Sets the selection state. |
void |
setSelectedImage(String selectedImage)
Sets the URL of the image representing the button when this button is selected. |
void |
setToggle(boolean toggle)
Determines whether this button is a toggle button. |
void |
setValue(Object value)
Sets the selection state of this button if it is a toggle button. |
protected 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.UICommand |
|---|
addActionListener, broadcast, getAction, getActionListener, getActionListeners, getFamily, isImmediate, queueEvent, removeActionListener, setAction, setActionListener, setImmediate |
| Methods inherited from class javax.faces.component.UIComponentBase |
|---|
addFacesListener, decode, encodeBegin, encodeChildren, encodeEnd, findComponent, getChildCount, getChildren, getClientId, getFacesContext, getFacesListeners, getFacet, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, isRendered, isTransient, processDecodes, processRestoreState, processSaveState, processValidators, 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 |
| Field Detail |
|---|
public static final Boolean ENABLED_DEFAULT_VALUE
public static final Boolean TOGGLE_DEFAULT_VALUE
public static final Boolean SELECTED_DEFAULT_VALUE
| Constructor Detail |
|---|
public IlvImageButton()
IlvImageButton instance.
| Method Detail |
|---|
public IlvFacesComponent createFacesComponent()
IlvFacesComponent interface. By default, it returns an
IlvFacesComponentImpl instance.
IlvFacesComponent interface.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:
Map implementation must implement
the java.io.Serializable interface.null key or value must
throw a NullPointerException.ClassCastException.UIComponent's implementation class, the following
methods will have special behavior:
containsKey - Return false.get() - If the property is readable, call
the getter method and return the returned value (wrapping
primitive values in their corresponding wrapper classes);
otherwise throw IllegalArgumentException.put() - If the property is writable, call
the setter method to set the corresponding value (unwrapping
primitive values in their corresponding wrapper classes).
If the property is not writeable, or an attempt is made to
set a property of primitive type to null,
throw IllegalArgumentException.remove - Throw
IllegalArgumentException.
getAttributes in class UIComponentBasepublic void clearDecodedPropertyMap()
clearDecodedPropertyMap in interface IlvFacesComponentpublic 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 resetDecodedProperties()
resetDecodedProperties in interface IlvFacesComponentpublic 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 setValue(Object value)
setValue in class UICommandvalue - The selection state to be set for this button.public Object getValue()
getValue in class UICommandpublic void setSelected(boolean selected)
setValue(Object
value).
selected - The selection state of this button.public boolean isSelected()
getValue().
public String getButtonGroupId()
public void setButtonGroupId(String buttonGroupId)
buttonGroupId - The identifier of the button group.public IlvButtonGroup getOrCreateButtonGroup(String buttonGroupId)
buttonGroupId -
public boolean isToggle()
true if this button is a toggle button, false otherwise.public void setToggle(boolean toggle)
toggle - The toggle state to be set for this button.public boolean isEnabled()
true if this button is enabled, false otherwise.public void setEnabled(boolean enabled)
enabled - The enabled state to be set for this button.public String getRolloverImage()
public void setRolloverImage(String rolloverImage)
rolloverImage - The URL of the rollover image to be set for this button.public String getImage()
public void setImage(String image)
image - The image URL to be set for this button.public String getSelectedImage()
public void setSelectedImage(String selectedImage)
selectedImage - The URL of the image to be set.public String getCursor()
public void setCursor(String cursor)
cursor - The cursor to be set.public String getMessage()
public void setMessage(String message)
message - The message that can be displayed when the cursor is on the
button.public void processUpdates(FacesContext context)
Perform the component tree processing required by the Update Model Values phase of the request processing lifecycle for all facets of this component, all children of this component, and this component itself, as follows.
rendered property of this UIComponent
is false, skip further processing.processUpdates() method of all facets
and children of this component, in the order determined
by a call to getFacetsAndChildren().
processUpdates in class UIComponentBasecontext - The current faces context.
NullPointerException - if context
is nullprotected void updateModel(FacesContext context)
context - The current faces context.public Object saveState(FacesContext context)
state of this component.
saveState in interface IlvFacesComponentsaveState in interface StateHoldersaveState in class UICommandcontext - The current faces context.
state of this component.
public void restoreState(FacesContext context,
Object stateObj)
state parameter.
restoreState in interface IlvFacesComponentrestoreState in interface StateHolderrestoreState in class UICommandcontext - The current faces context.stateObj - The previously saved state of this component.
|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||