ICEfaces 1.x Compatibility Library 3.3.0
Java API Documentation

com.icesoft.faces.context.effects
Class LocalEffectEncoder

java.lang.Object
  extended by com.icesoft.faces.context.effects.LocalEffectEncoder

public class LocalEffectEncoder
extends java.lang.Object

Encode an effect call to an javascript event


Constructor Summary
LocalEffectEncoder()
           
 
Method Summary
static void encode(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent comp, java.lang.String[] events, java.util.Map rendererValues, org.w3c.dom.Element rootNode, javax.faces.context.ResponseWriter writer)
          For every javascript event in the events parameter, combine the effect javascript if it's appropriate , the application javascript from the passthrough attribute, and the component renderers value from the rendererValues parameter, in that sequence, and output it to the DOM Element or the ResponseWriter, whichever is appropriate.
static void encodeLocalEffect(java.lang.String id, Effect fx, java.lang.String event, javax.faces.context.FacesContext facesContext)
           
static void encodeLocalEffects(javax.faces.component.UIComponent comp, org.w3c.dom.Element rootNode, javax.faces.context.FacesContext facesContext)
           
static void encodeLocalEffects(javax.faces.component.UIComponent comp, org.w3c.dom.Element rootNode, javax.faces.context.FacesContext facesContext, javax.faces.context.ResponseWriter writer, boolean attribTracking, java.util.List attributesThatAreSet)
           
static void encodeLocalEffects(javax.faces.component.UIComponent comp, javax.faces.context.ResponseWriter writer, javax.faces.context.FacesContext facesContext)
           
static java.lang.String[] maskEvents(java.lang.String[] passthruAttributes)
          We only want to try processing the events that are relevant to each specific component, so we want the intersection of the complete event list, and the component's pass-through attributes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocalEffectEncoder

public LocalEffectEncoder()
Method Detail

maskEvents

public static java.lang.String[] maskEvents(java.lang.String[] passthruAttributes)
We only want to try processing the events that are relevant to each specific component, so we want the intersection of the complete event list, and the component's pass-through attributes. So that the indexes still match up, we just null out the undesired entries that we return.

Parameters:
passthruAttributes - Appropriate attributes from ExtendedAttributeConstants
Returns:
The intersection of the complete event list and passthruAttributes. Whatever's in both lists.

encode

public static void encode(javax.faces.context.FacesContext facesContext,
                          javax.faces.component.UIComponent comp,
                          java.lang.String[] events,
                          java.util.Map rendererValues,
                          org.w3c.dom.Element rootNode,
                          javax.faces.context.ResponseWriter writer)
For every javascript event in the events parameter, combine the effect javascript if it's appropriate , the application javascript from the passthrough attribute, and the component renderers value from the rendererValues parameter, in that sequence, and output it to the DOM Element or the ResponseWriter, whichever is appropriate.

Parameters:
facesContext -
comp -
events - The result of calling maskEvents(String[])
rendererValues - Map where they keys are entries in ALL_EVENTS, and the values are the javascript that the component renderer wishes to emit
rootNode -
writer -

encodeLocalEffects

public static void encodeLocalEffects(javax.faces.component.UIComponent comp,
                                      org.w3c.dom.Element rootNode,
                                      javax.faces.context.FacesContext facesContext,
                                      javax.faces.context.ResponseWriter writer,
                                      boolean attribTracking,
                                      java.util.List attributesThatAreSet)

encodeLocalEffects

public static void encodeLocalEffects(javax.faces.component.UIComponent comp,
                                      org.w3c.dom.Element rootNode,
                                      javax.faces.context.FacesContext facesContext)

encodeLocalEffects

public static void encodeLocalEffects(javax.faces.component.UIComponent comp,
                                      javax.faces.context.ResponseWriter writer,
                                      javax.faces.context.FacesContext facesContext)

encodeLocalEffect

public static void encodeLocalEffect(java.lang.String id,
                                     Effect fx,
                                     java.lang.String event,
                                     javax.faces.context.FacesContext facesContext)

ICEfaces 1.x Compatibility Library 3.3.0
Java API Documentation

Copyright 2013 ICEsoft Technologies Canada Corp., All Rights Reserved.