public static boolean handlerIsResourceRelated(ComponentHandler handler){ ComponentConfig config = handler.getComponentConfig(); if ( !"javax.faces.Output".equals(config.getComponentType()) ) { return false; } String rendererType = config.getRendererType(); return ("javax.faces.resource.Script".equals(rendererType) || "javax.faces.resource.Stylesheet".equals(rendererType)); }
public StackHandler(ComponentConfig componentConfig) { super(componentConfig); Tag tag = componentConfig.getTag(); selectedIdTag = tag.getAttributes().get("selectedId"); }
@Override public FaceletHandler getNextHandler() { return config.getNextHandler(); } };
private void processNextHandler(FaceletContext ctx, FaceletHandler handler, UIComponent parent) throws IOException { if (handler instanceof ComponentHandler) { ComponentHandler componentHandler = (ComponentHandler) handler; ComponentConfig componentConfig = componentHandler.getComponentConfig(); String componentType = componentConfig.getComponentType(); if (isUIParameter(componentType)) { FacesContext facesContext = ctx.getFacesContext(); UIComponent component = (UIComponent) facesContext.getApplication().createComponent(componentType); componentHandler.setAttributes(ctx, component); if (parent instanceof ClientBehaviorHolder) { ClientBehaviorHolder clientBehaviorHolder = ((ClientBehaviorHolder) parent); Map<String, List<ClientBehavior>> clientBehaviors = clientBehaviorHolder.getClientBehaviors(); String eventName = getEventName(); if (eventName == null) { eventName = clientBehaviorHolder.getDefaultEventName(); } if (eventName != null) { List<ClientBehavior> eventClientBehaviors = clientBehaviors.get(eventName); for (ClientBehavior clientBehavior : eventClientBehaviors) { if (clientBehavior instanceof ComponentControlBehavior) { ((ComponentControlBehavior) clientBehavior).getChildren().add(component); } } } } componentHandler.applyNextHandler(ctx, component); } } }
private void processNextHandler(FaceletContext ctx, FaceletHandler handler, UIComponent parent) throws IOException { if (handler instanceof ComponentHandler) { ComponentHandler componentHandler = (ComponentHandler) handler; ComponentConfig componentConfig = componentHandler.getComponentConfig(); String componentType = componentConfig.getComponentType(); if (isUIParameter(componentType)) { FacesContext facesContext = ctx.getFacesContext(); UIComponent component = (UIComponent) facesContext.getApplication().createComponent(componentType); componentHandler.setAttributes(ctx, component); if (parent instanceof ClientBehaviorHolder) { ClientBehaviorHolder clientBehaviorHolder = ((ClientBehaviorHolder) parent); Map<String, List<ClientBehavior>> clientBehaviors = clientBehaviorHolder.getClientBehaviors(); String eventName = getEventName(); if (eventName == null) { eventName = clientBehaviorHolder.getDefaultEventName(); } if (eventName != null) { List<ClientBehavior> eventClientBehaviors = clientBehaviors.get(eventName); for (ClientBehavior clientBehavior : eventClientBehaviors) { if (clientBehavior instanceof ComponentControlBehavior) { ((ComponentControlBehavior) clientBehavior).getChildren().add(component); } } } } componentHandler.applyNextHandler(ctx, component); } } }
public static boolean handlerIsResourceRelated(ComponentHandler handler){ ComponentConfig config = handler.getComponentConfig(); if ( !"javax.faces.Output".equals(config.getComponentType()) ) { return false; } String rendererType = config.getRendererType(); return ("javax.faces.resource.Script".equals(rendererType) || "javax.faces.resource.Stylesheet".equals(rendererType)); }
/** * @param config */ public LanguageAwareIncludeHandler(ComponentConfig config) { super(config); TagAttribute attr = null; attr = config.getTag().getAttributes().get("src"); if (null == attr) { attr = config.getTag().getAttributes().get("file"); } if (null == attr) { attr = config.getTag().getAttributes().get("page"); } if (null == attr) { throw new TagException(config.getTag(), "Attribute 'src', 'file' or 'page' is required"); } this.src = attr; this.config = config; }
private void processNextHandler(FaceletContext ctx, FaceletHandler handler, UIComponent parent) throws IOException { if (handler instanceof ComponentHandler) { ComponentHandler componentHandler = (ComponentHandler) handler; ComponentConfig componentConfig = componentHandler.getComponentConfig(); String componentType = componentConfig.getComponentType(); if (isUIParameter(componentType)) { FacesContext facesContext = ctx.getFacesContext(); UIComponent component = (UIComponent) facesContext.getApplication().createComponent(componentType); componentHandler.setAttributes(ctx, component); if (parent instanceof ClientBehaviorHolder) { ClientBehaviorHolder clientBehaviorHolder = ((ClientBehaviorHolder) parent); Map<String, List<ClientBehavior>> clientBehaviors = clientBehaviorHolder.getClientBehaviors(); String eventName = getEventName(); if (eventName == null) { eventName = clientBehaviorHolder.getDefaultEventName(); } if (eventName != null) { List<ClientBehavior> eventClientBehaviors = clientBehaviors.get(eventName); for (ClientBehavior clientBehavior : eventClientBehaviors) { if (clientBehavior instanceof ComponentControlBehavior) { ((ComponentControlBehavior) clientBehavior).getChildren().add(component); } } } } componentHandler.applyNextHandler(ctx, component); } } }
public static boolean handlerIsResourceRelated(ComponentHandler handler){ ComponentConfig config = handler.getComponentConfig(); if ( !"javax.faces.Output".equals(config.getComponentType()) ) { return false; } String rendererType = config.getRendererType(); return ("javax.faces.resource.Script".equals(rendererType) || "javax.faces.resource.Stylesheet".equals(rendererType)); }
public CompositeComponentTagHandler(Resource ccResource, ComponentConfig config) { super(config); this.ccResource = ccResource; this.binding = config.getTag().getAttributes().get("binding"); ((ComponentTagHandlerDelegateImpl)this.getTagHandlerDelegate()).setCreateCompositeComponentDelegate(this); }
private void processNextHandler(FaceletContext ctx, FaceletHandler handler, UIComponent parent) throws IOException { if (handler instanceof ComponentHandler) { ComponentHandler componentHandler = (ComponentHandler) handler; ComponentConfig componentConfig = componentHandler.getComponentConfig(); String componentType = componentConfig.getComponentType(); if (isUIParameter(componentType)) { FacesContext facesContext = ctx.getFacesContext(); UIComponent component = (UIComponent) facesContext.getApplication().createComponent(componentType); componentHandler.setAttributes(ctx, component); if (parent instanceof ClientBehaviorHolder) { ClientBehaviorHolder clientBehaviorHolder = ((ClientBehaviorHolder) parent); Map<String, List<ClientBehavior>> clientBehaviors = clientBehaviorHolder.getClientBehaviors(); String eventName = getEventName(); if (eventName == null) { eventName = clientBehaviorHolder.getDefaultEventName(); } if (eventName != null) { List<ClientBehavior> eventClientBehaviors = clientBehaviors.get(eventName); for (ClientBehavior clientBehavior : eventClientBehaviors) { if (clientBehavior instanceof ComponentControlBehavior) { ((ComponentControlBehavior) clientBehavior).getChildren().add(component); } } } } componentHandler.applyNextHandler(ctx, component); } } }
public static boolean handlerIsResourceRelated(ComponentHandler handler){ ComponentConfig config = handler.getComponentConfig(); if ( !"javax.faces.Output".equals(config.getComponentType()) ) { return false; } String rendererType = config.getRendererType(); return ("javax.faces.resource.Script".equals(rendererType) || "javax.faces.resource.Stylesheet".equals(rendererType)); }
public CompositeComponentTagHandler(Resource ccResource, ComponentConfig config) { super(config); this.ccResource = ccResource; this.binding = config.getTag().getAttributes().get("binding"); ((ComponentTagHandlerDelegateImpl)this.getTagHandlerDelegate()).setCreateCompositeComponentDelegate(this); }
public ComponentHandler(ComponentConfig config) { super(config); this.componentType = config.getComponentType(); this.rendererType = config.getRendererType(); this.id = this.getAttribute("id"); this.binding = this.getAttribute("binding"); }
public CompositeComponentTagHandler(Resource ccResource, ComponentConfig config) { super(config); this.ccResource = ccResource; this.binding = config.getTag().getAttributes().get("binding"); ((ComponentTagHandlerDelegateImpl)this.getTagHandlerDelegate()).setCreateCompositeComponentDelegate(this); }
public ComponentHandler(ComponentConfig config) { super(config); this.componentType = config.getComponentType(); this.rendererType = config.getRendererType(); this.id = this.getAttribute("id"); this.binding = this.getAttribute("binding"); }
public TagAttribute getTagAttribute(String localName) { // workaround for MyFaces if (componentHandler == null) { return getComponentConfig().getTag().getAttributes().get(localName); } return componentHandler.getTagAttribute(localName); }
public ComponentHandler(ComponentConfig config) { super(config); this.componentType = config.getComponentType(); this.rendererType = config.getRendererType(); this.id = this.getAttribute("id"); this.binding = this.getAttribute("binding"); }
public TagAttribute getTagAttribute(String localName) { // workaround for MyFaces if (componentHandler == null) { return getComponentConfig().getTag().getAttributes().get(localName); } return componentHandler.getTagAttribute(localName); }
public ComponentTagHandlerDelegateImpl(ComponentHandler owner) { this.owner = owner; ComponentConfig config = owner.getComponentConfig(); this.componentType = config.getComponentType(); this.rendererType = config.getRendererType(); this.id = owner.getTagAttribute("id"); this.binding = owner.getTagAttribute("binding"); }