public class IlvImageButton extends javax.faces.component.UICommand implements IlvFacesComponent
Modifier and Type | Field and Description |
---|---|
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.
|
ATTRS_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_KEY
AFTER_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 |
---|
IlvImageButton()
Creates a new
IlvImageButton instance. |
Modifier and Type | Method and Description |
---|---|
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 |
getBaseTextDirection()
Returns the baseTextDirection.
|
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(javax.faces.context.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(javax.faces.context.FacesContext context,
Object stateObj)
Restores the state of this component from the
state parameter. |
Object |
saveState(javax.faces.context.FacesContext context)
Returns the
state of this component. |
void |
setBaseTextDirection(String baseTextDirection)
Sets the baseTextDirection.
|
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 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(javax.faces.context.FacesContext context)
This method updates the referenced values with the local values of the
component if these values were updated from the client.
|
addActionListener, broadcast, getAction, getActionExpression, getActionListener, getActionListeners, getFamily, isImmediate, queueEvent, removeActionListener, setAction, setActionExpression, setActionListener, setImmediate
addClientBehavior, 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, processValidators, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding, subscribeToEvent, unsubscribeFromEvent
encodeAll, getClientId, getCompositeComponentParent, getContainerClientId, getCurrentComponent, getCurrentCompositeComponent, getNamingContainer, getPassThroughAttributes, getResourceBundleMap, getStateHelper, getStateHelper, getTransientStateHelper, getTransientStateHelper, getValueExpression, initialStateMarked, isCompositeComponent, isInView, isVisitable, popComponentFromEL, processEvent, pushComponentToEL, restoreTransientState, saveTransientState, setInView, setValueExpression, visitTree
public static final Boolean ENABLED_DEFAULT_VALUE
public static final Boolean TOGGLE_DEFAULT_VALUE
public static final Boolean SELECTED_DEFAULT_VALUE
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 javax.faces.component.UIComponentBase
public void clearDecodedPropertyMap()
clearDecodedPropertyMap
in interface IlvFacesComponent
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 IlvFacesComponent
property
- The property to test.true
if the property was decoded, false
otherwise.public void resetDecodedProperties()
resetDecodedProperties
in interface IlvFacesComponent
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 IlvFacesComponent
property
- The property to set to decoded
.public void setValue(Object value)
setValue
in class javax.faces.component.UICommand
value
- The selection state to be set for this button.public Object getValue()
getValue
in class javax.faces.component.UICommand
public 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
- The identifier of the button group.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 String getBaseTextDirection()
public void setBaseTextDirection(String baseTextDirection)
baseTextDirection
- The base Text Direction to set.public void processUpdates(javax.faces.context.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 javax.faces.component.UIComponentBase
context
- The current faces context.NullPointerException
- if context
is null
protected void updateModel(javax.faces.context.FacesContext context)
context
- The current faces context.public Object saveState(javax.faces.context.FacesContext context)
state
of this component.saveState
in interface IlvFacesComponent
saveState
in interface javax.faces.component.StateHolder
saveState
in class javax.faces.component.UIComponentBase
context
- The current faces context.state
of this component.public void restoreState(javax.faces.context.FacesContext context, Object stateObj)
state
parameter.restoreState
in interface IlvFacesComponent
restoreState
in interface javax.faces.component.StateHolder
restoreState
in class javax.faces.component.UIComponentBase
context
- The current faces context.stateObj
- The previously saved state
of this component.© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.