org.apache.myfaces.custom.jslistener
Class JsValueChangeListener

java.lang.Object
  extended by javax.faces.component.UIComponent
      extended by javax.faces.component.UIComponentBase
          extended by org.apache.myfaces.custom.jslistener.AbstractJsValueChangeListener
              extended by org.apache.myfaces.custom.jslistener.JsValueChangeListener
All Implemented Interfaces:
javax.faces.component.StateHolder

public class JsValueChangeListener
extends AbstractJsValueChangeListener


Field Summary
static java.lang.String COMPONENT_FAMILY
           
static java.lang.String COMPONENT_TYPE
           
static java.lang.String DEFAULT_RENDERER_TYPE
           
 
Constructor Summary
JsValueChangeListener()
           
 
Method Summary
 java.lang.String getBodyTagEvent()
          Events are triggered by the 'onchange' event of the source control.
 java.lang.String getExpressionValue()
          the javascript expression to evaluate.
 java.lang.String getFamily()
           
 java.lang.String getFor()
          for - the id of the target control
 java.lang.String getProperty()
          The result of the evaluated expression is assigned to the specified property of the target control
 void restoreState(javax.faces.context.FacesContext facesContext, java.lang.Object state)
           
 java.lang.Object saveState(javax.faces.context.FacesContext facesContext)
           
 void setBodyTagEvent(java.lang.String bodyTagEvent)
           
 void setExpressionValue(java.lang.String expressionValue)
           
 void setFor(java.lang.String forParam)
           
 void setProperty(java.lang.String property)
           
 
Methods inherited from class javax.faces.component.UIComponentBase
addFacesListener, broadcast, decode, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientId, getFacesContext, getFacesListeners, getFacet, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, isRendered, isTransient, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, 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
 

Field Detail

COMPONENT_FAMILY

public static final java.lang.String COMPONENT_FAMILY
See Also:
Constant Field Values

COMPONENT_TYPE

public static final java.lang.String COMPONENT_TYPE
See Also:
Constant Field Values

DEFAULT_RENDERER_TYPE

public static final java.lang.String DEFAULT_RENDERER_TYPE
See Also:
Constant Field Values
Constructor Detail

JsValueChangeListener

public JsValueChangeListener()
Method Detail

getFamily

public java.lang.String getFamily()
Specified by:
getFamily in class javax.faces.component.UIComponent

getFor

public java.lang.String getFor()
Description copied from class: AbstractJsValueChangeListener
for - the id of the target control

Specified by:
getFor in class AbstractJsValueChangeListener

setFor

public void setFor(java.lang.String forParam)

getExpressionValue

public java.lang.String getExpressionValue()
Description copied from class: AbstractJsValueChangeListener
the javascript expression to evaluate. The keyword '$srcElem' resolves to the source control and the keyword '$destElem' resolves to the target control

Specified by:
getExpressionValue in class AbstractJsValueChangeListener

setExpressionValue

public void setExpressionValue(java.lang.String expressionValue)

getProperty

public java.lang.String getProperty()
Description copied from class: AbstractJsValueChangeListener
The result of the evaluated expression is assigned to the specified property of the target control

Specified by:
getProperty in class AbstractJsValueChangeListener

setProperty

public void setProperty(java.lang.String property)

getBodyTagEvent

public java.lang.String getBodyTagEvent()
Description copied from class: AbstractJsValueChangeListener
Events are triggered by the 'onchange' event of the source control. Here, an additional event can be specified (onload?). If specified this JavaScript event will be inserted in the body tag. JavaScript code will be the same like it is rendered in the parent component.

Specified by:
getBodyTagEvent in class AbstractJsValueChangeListener

setBodyTagEvent

public void setBodyTagEvent(java.lang.String bodyTagEvent)

saveState

public java.lang.Object saveState(javax.faces.context.FacesContext facesContext)
Specified by:
saveState in interface javax.faces.component.StateHolder
Overrides:
saveState in class javax.faces.component.UIComponentBase

restoreState

public void restoreState(javax.faces.context.FacesContext facesContext,
                         java.lang.Object state)
Specified by:
restoreState in interface javax.faces.component.StateHolder
Overrides:
restoreState in class javax.faces.component.UIComponentBase


Copyright © 2011 The Apache Software Foundation. All Rights Reserved.