protected void decodeBehaviors(FacesContext context, UIComponent component) { if (!(component instanceof ClientBehaviorHolder)) { return; } Map<String, List<ClientBehavior>> behaviors = ((ClientBehaviorHolder) component).getClientBehaviors(); if (behaviors.isEmpty()) { return; } Map<String, String> params = context.getExternalContext().getRequestParameterMap(); String behaviorEvent = params.get("javax.faces.behavior.event"); if (null != behaviorEvent) { List<ClientBehavior> behaviorsForEvent = behaviors.get(behaviorEvent); if (behaviorsForEvent != null && !behaviorsForEvent.isEmpty()) { String behaviorSource = params.get("javax.faces.source"); String clientId = component.getClientId(context); if (behaviorSource != null && clientId.equals(behaviorSource)) { for (ClientBehavior behavior : behaviorsForEvent) { behavior.decode(context, component); } } } } }
public void invokeContextCallback(FacesContext context, UIComponent target) { if (target.equals(component)) { List<ClientBehavior> behaviorsForEvent = behaviors.get(behaviorEvent); if (behaviorsForEvent != null && !behaviorsForEvent.isEmpty()) { for (ClientBehavior behavior : behaviorsForEvent) { behavior.decode(context, component); } } } } });
public void invokeContextCallback(FacesContext context, UIComponent target) { if (target.equals(component)) { List<ClientBehavior> behaviorsForEvent = behaviors.get(behaviorEvent); if (behaviorsForEvent != null && !behaviorsForEvent.isEmpty()) { for (ClientBehavior behavior : behaviorsForEvent) { behavior.decode(context, component); } } } } });
public void invokeContextCallback(FacesContext context, UIComponent target) { if (target.equals(component)) { List<ClientBehavior> behaviorsForEvent = behaviors.get(behaviorEvent); if (behaviorsForEvent != null && !behaviorsForEvent.isEmpty()) { for (ClientBehavior behavior : behaviorsForEvent) { behavior.decode(context, component); } } } } });
public void invokeContextCallback(FacesContext context, UIComponent target) { if (target.equals(component)) { List<ClientBehavior> behaviorsForEvent = behaviors.get(behaviorEvent); if (behaviorsForEvent != null && !behaviorsForEvent.isEmpty()) { for (ClientBehavior behavior : behaviorsForEvent) { behavior.decode(context, component); } } } } });
@Override public void decode(FacesContext context, UIComponent component) { getWrapped().decode(context, component); }
protected void decodeBehaviors(FacesContext context, UIComponent component, String proxyClientId) { if (!(component instanceof ClientBehaviorHolder)) return; Map<String, List<ClientBehavior>> behaviors = ((ClientBehaviorHolder) component).getClientBehaviors(); Map<String, String> params = context.getExternalContext().getRequestParameterMap(); String behaviorEvent = params.get("javax.faces.behavior.event"); if (behaviors.isEmpty() || behaviorEvent == null) return; List<ClientBehavior> behaviorsForEvent = behaviors.get(behaviorEvent); if (behaviorsForEvent != null && !behaviorsForEvent.isEmpty()) { String behaviorSource = params.get("javax.faces.source"); String clientId = proxyClientId == null ? component.getClientId() : proxyClientId; if(behaviorSource != null && behaviorSource.equals(clientId)) { for (ClientBehavior behavior: behaviorsForEvent) { behavior.decode(context, component); } } } }
protected void decodeBehaviors(FacesContext context, UIComponent component, String proxyClientId) { if (!(component instanceof ClientBehaviorHolder)) return; Map<String, List<ClientBehavior>> behaviors = ((ClientBehaviorHolder) component).getClientBehaviors(); Map<String, String> params = context.getExternalContext().getRequestParameterMap(); String behaviorEvent = params.get("javax.faces.behavior.event"); if (behaviors.isEmpty() || behaviorEvent == null) return; List<ClientBehavior> behaviorsForEvent = behaviors.get(behaviorEvent); if (behaviorsForEvent != null && !behaviorsForEvent.isEmpty()) { String behaviorSource = params.get("javax.faces.source"); String clientId = proxyClientId == null ? component.getClientId() : proxyClientId; if (behaviorSource != null && behaviorSource.equals(clientId)) { for (ClientBehavior behavior : behaviorsForEvent) { behavior.decode(context, component); } } } }
protected void decodeBehaviors(FacesContext context, UIComponent component) { if (!(component instanceof ClientBehaviorHolder)) { return; } Map<String, List<ClientBehavior>> behaviors = ((ClientBehaviorHolder) component).getClientBehaviors(); if (behaviors.isEmpty()) { return; } Map<String, String> params = context.getExternalContext().getRequestParameterMap(); String behaviorEvent = params.get("javax.faces.behavior.event"); if (null != behaviorEvent) { List<ClientBehavior> behaviorsForEvent = behaviors.get(behaviorEvent); if (behaviorsForEvent != null && !behaviorsForEvent.isEmpty()) { String behaviorSource = params.get("javax.faces.source"); String clientId = component.getClientId(context); if (behaviorSource != null && clientId.equals(behaviorSource)) { for (ClientBehavior behavior : behaviorsForEvent) { behavior.decode(context, component); } } } } }
public static void decodeClientBehaviors(final FacesContext facesContext, final UIComponent component) { if (component instanceof ClientBehaviorHolder) { final ClientBehaviorHolder clientBehaviorHolder = (ClientBehaviorHolder) component; final Map<String, List<ClientBehavior>> clientBehaviors = clientBehaviorHolder.getClientBehaviors(); if (clientBehaviors != null && !clientBehaviors.isEmpty()) { final Map<String, String> paramMap = facesContext.getExternalContext().getRequestParameterMap(); final String behaviorEventName = paramMap.get("javax.faces.behavior.event"); if (behaviorEventName != null) { final List<ClientBehavior> clientBehaviorList = clientBehaviors.get(behaviorEventName); if (clientBehaviorList != null && !clientBehaviorList.isEmpty()) { final String clientId = paramMap.get("javax.faces.source"); if (component.getClientId(facesContext).equals(clientId)) { for (final ClientBehavior clientBehavior : clientBehaviorList) { clientBehavior.decode(facesContext, component); } } } } } } }
protected void decodeBehaviors(FacesContext context, UIComponent component) { if (!(component instanceof ClientBehaviorHolder)) { return; } Map<String, List<ClientBehavior>> behaviors = ((ClientBehaviorHolder) component).getClientBehaviors(); if (behaviors.isEmpty()) { return; } Map<String, String> params = context.getExternalContext().getRequestParameterMap(); String behaviorEvent = params.get("javax.faces.behavior.event"); if (null != behaviorEvent) { List<ClientBehavior> behaviorsForEvent = behaviors.get(behaviorEvent); if (behaviorsForEvent != null && !behaviorsForEvent.isEmpty()) { String behaviorSource = params.get("javax.faces.source"); String clientId = component.getClientId(context); if (behaviorSource != null && clientId.equals(behaviorSource)) { for (ClientBehavior behavior : behaviorsForEvent) { behavior.decode(context, component); } } } } }
public static void decodeClientBehaviors(FacesContext facesContext, UIComponent uiComponent) { if (uiComponent instanceof ClientBehaviorHolder) { ClientBehaviorHolder clientBehaviorHolder = (ClientBehaviorHolder) uiComponent; Map<String, List<ClientBehavior>> clientBehaviorMap = clientBehaviorHolder.getClientBehaviors(); Map<String, String> requestParameterMap = facesContext.getExternalContext().getRequestParameterMap(); String behaviorEvent = requestParameterMap.get("javax.faces.behavior.event"); if (behaviorEvent != null) { List<ClientBehavior> clientBehaviors = clientBehaviorMap.get(behaviorEvent); if (clientBehaviors != null) { String source = requestParameterMap.get("javax.faces.source"); if (source != null) { String clientId = uiComponent.getClientId(facesContext); if (clientId.startsWith(source)) { for (ClientBehavior behavior : clientBehaviors) { behavior.decode(facesContext, uiComponent); } } } } } } }
public static void decodeClientBehaviors(FacesContext facesContext, UIComponent uiComponent) { if (uiComponent instanceof ClientBehaviorHolder) { ClientBehaviorHolder clientBehaviorHolder = (ClientBehaviorHolder) uiComponent; Map<String, List<ClientBehavior>> clientBehaviorMap = clientBehaviorHolder.getClientBehaviors(); Map<String, String> requestParameterMap = facesContext.getExternalContext().getRequestParameterMap(); String behaviorEvent = requestParameterMap.get("javax.faces.behavior.event"); if (behaviorEvent != null) { List<ClientBehavior> clientBehaviors = clientBehaviorMap.get(behaviorEvent); if (clientBehaviors != null) { String source = requestParameterMap.get("javax.faces.source"); if (source != null) { String clientId = uiComponent.getClientId(facesContext); if (clientId.startsWith(source)) { for (ClientBehavior behavior : clientBehaviors) { behavior.decode(facesContext, uiComponent); } } } } } } }
protected void decodeBehaviors(FacesContext context, UIComponent component) { if (!(component instanceof ClientBehaviorHolder)) { return; } Map<String, List<ClientBehavior>> behaviors = ((ClientBehaviorHolder) component).getClientBehaviors(); if (behaviors.isEmpty()) { return; } Map<String, String> params = context.getExternalContext().getRequestParameterMap(); String behaviorEvent = params.get("javax.faces.behavior.event"); if (null != behaviorEvent) { List<ClientBehavior> behaviorsForEvent = behaviors.get(behaviorEvent); if (behaviorsForEvent != null && !behaviorsForEvent.isEmpty()) { String behaviorSource = params.get("javax.faces.source"); String clientId = component.getClientId(context); if (behaviorSource != null && clientId.equals(behaviorSource)) { for (ClientBehavior behavior : behaviorsForEvent) { behavior.decode(context, component); } } } } }
public static void decodeClientBehaviors(FacesContext facesContext, UIComponent uiComponent) { if (uiComponent instanceof ClientBehaviorHolder) { ClientBehaviorHolder clientBehaviorHolder = (ClientBehaviorHolder) uiComponent; Map<String, List<ClientBehavior>> clientBehaviorMap = clientBehaviorHolder.getClientBehaviors(); Map<String, String> requestParameterMap = facesContext.getExternalContext().getRequestParameterMap(); String behaviorEvent = requestParameterMap.get("javax.faces.behavior.event"); if (behaviorEvent != null) { List<ClientBehavior> clientBehaviors = clientBehaviorMap.get(behaviorEvent); if (clientBehaviors != null) { String source = requestParameterMap.get("javax.faces.source"); if (source != null) { String clientId = uiComponent.getClientId(facesContext); if (clientId.startsWith(source)) { for (ClientBehavior behavior : clientBehaviors) { behavior.decode(facesContext, uiComponent); } } } } } } }
public void decode(FacesContext facesContext) { Map<String, String> params = facesContext.getExternalContext().getRequestParameterMap(); String clientId = getClientId(facesContext); String source = String.valueOf(params.get("ice.event.captured")); if (clientId.equals(source)) this.queueEvent(new ActionEvent(this)); // decode bahaviors Map<String, List<ClientBehavior>> behaviors = getClientBehaviors(); if(behaviors.isEmpty()) { return; } String behaviorEvent = params.get("javax.faces.behavior.event"); if(null != behaviorEvent) { List<ClientBehavior> behaviorsForEvent = behaviors.get(behaviorEvent); if(behaviors.size() > 0) { String behaviorSource = params.get("javax.faces.source"); if(behaviorSource != null && behaviorSource.startsWith(clientId)) { for (ClientBehavior behavior: behaviorsForEvent) { behavior.decode(facesContext, this); } } } } }
@Override public void decode(FacesContext context) { Map<String, List<ClientBehavior>> clientBehaviors = getClientBehaviors(); if (clientBehaviors.isEmpty()) { return; } if (!getClientId(context).equals(getRequestParameter(context, BEHAVIOR_SOURCE_PARAM_NAME))) { return; } List<ClientBehavior> behaviors = clientBehaviors.get(getRequestParameter(context, BEHAVIOR_EVENT_PARAM_NAME)); if (behaviors == null) { return; } for (ClientBehavior behavior : behaviors) { behavior.decode(context, this); } }
public void decode(FacesContext facesContext) { Map<String, String> params = facesContext.getExternalContext().getRequestParameterMap(); String clientId = getClientId(facesContext); if (params.containsKey(clientId)) this.queueEvent(new ActionEvent(this)); // decode bahaviors Map<String, List<ClientBehavior>> behaviors = getClientBehaviors(); if(behaviors.isEmpty()) { return; } String behaviorEvent = params.get("javax.faces.behavior.event"); if(null != behaviorEvent) { List<ClientBehavior> behaviorsForEvent = behaviors.get(behaviorEvent); if(behaviors.size() > 0) { String behaviorSource = params.get("javax.faces.source"); if(behaviorSource != null && behaviorSource.startsWith(clientId)) { for (ClientBehavior behavior: behaviorsForEvent) { behavior.decode(facesContext, this); } } } } }
@Override public void decode(FacesContext context) { Map<String, List<ClientBehavior>> clientBehaviors = getClientBehaviors(); if (clientBehaviors.isEmpty()) { return; } if (!getClientId(context).equals(getRequestParameter(context, BEHAVIOR_SOURCE_PARAM_NAME))) { return; } List<ClientBehavior> behaviors = clientBehaviors.get(getRequestParameter(context, BEHAVIOR_EVENT_PARAM_NAME)); if (behaviors == null) { return; } for (ClientBehavior behavior : behaviors) { behavior.decode(context, this); } }
protected final String decodeBehaviors(FacesContext context, UIComponent component) { if (!(component instanceof ClientBehaviorHolder)) { return null; } ClientBehaviorHolder holder = (ClientBehaviorHolder) component; Map<String, List<ClientBehavior>> behaviors = holder.getClientBehaviors(); if (behaviors.isEmpty()) { return null; } String behaviorEvent = BEHAVIOR_EVENT_PARAM.getValue(context); if (null != behaviorEvent) { List<ClientBehavior> behaviorsForEvent = behaviors.get(behaviorEvent); if (behaviorsForEvent != null && behaviorsForEvent.size() > 0) { String behaviorSource = BEHAVIOR_SOURCE_PARAM.getValue(context); String clientId = component.getClientId(); if (isBehaviorSource(context, behaviorSource, clientId)) { for (ClientBehavior behavior : behaviorsForEvent) { behavior.decode(context, component); } } return clientId; } } return null; }