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:
EventListener, javax.faces.component.PartialStateHolder, javax.faces.component.StateHolder, javax.faces.component.TransientStateHolder, javax.faces.event.ComponentSystemEventListener, javax.faces.event.FacesListener, javax.faces.event.SystemEventListenerHolder

public class JsValueChangeListener
extends AbstractJsValueChangeListener


Nested Class Summary
protected static class JsValueChangeListener.PropertyKeys
           
 
Field Summary
static String COMPONENT_FAMILY
           
static String COMPONENT_TYPE
           
static String DEFAULT_RENDERER_TYPE
           
 
Fields inherited from class javax.faces.component.UIComponent
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
 
Constructor Summary
JsValueChangeListener()
           
 
Method Summary
 String getBodyTagEvent()
          Events are triggered by the 'onchange' event of the source control.
 String getExpressionValue()
          the javascript expression to evaluate.
 String getFamily()
           
 String getFor()
          for - the id of the target control
 String getProperty()
          The result of the evaluated expression is assigned to the specified property of the target control
 void setBodyTagEvent(String bodyTagEvent)
           
 void setExpressionValue(String expressionValue)
           
 void setFor(String forParam)
           
 void setProperty(String property)
           
 
Methods inherited from class javax.faces.component.UIComponentBase
addClientBehavior, addFacesListener, broadcast, clearInitialState, decode, encodeAll, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientBehaviors, getClientId, getDefaultEventName, getEventNames, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, initialStateMarked, invokeOnComponent, isRendered, isTransient, markInitialState, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, queueEvent, removeFacesListener, restoreAttachedState, restoreState, saveAttachedState, saveState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding, visitTree
 
Methods inherited from class javax.faces.component.UIComponent
getClientId, getCompositeComponentParent, getContainerClientId, getCurrentComponent, getCurrentCompositeComponent, getListenersForEventClass, getNamingContainer, getResourceBundleMap, getStateHelper, getStateHelper, getTransientStateHelper, getTransientStateHelper, getValueExpression, isCompositeComponent, isInView, isVisitable, popComponentFromEL, processEvent, pushComponentToEL, restoreTransientState, saveTransientState, setInView, setValueExpression, subscribeToEvent, unsubscribeFromEvent
 
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 String COMPONENT_FAMILY
See Also:
Constant Field Values

COMPONENT_TYPE

public static final String COMPONENT_TYPE
See Also:
Constant Field Values

DEFAULT_RENDERER_TYPE

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

JsValueChangeListener

public JsValueChangeListener()
Method Detail

getFamily

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

getFor

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

Specified by:
getFor in class AbstractJsValueChangeListener

setFor

public void setFor(String forParam)

getExpressionValue

public 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(String expressionValue)

getProperty

public 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(String property)

getBodyTagEvent

public 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(String bodyTagEvent)


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