public ContextualCompositeMethodExpression(Location location, MethodExpression delegate) { this.delegate = delegate; this.location = location; this.source = null; FacesContext ctx = FacesContext.getCurrentInstance(); UIComponent cc = UIComponent.getCurrentCompositeComponent(ctx); cc.subscribeToEvent(PostAddToViewEvent.class, new SetClientIdListener(this)); }
public ContextualCompositeMethodExpression(ValueExpression source, MethodExpression delegate) { this.delegate = delegate; this.source = source; this.location = null; FacesContext ctx = FacesContext.getCurrentInstance(); UIComponent cc = UIComponent.getCurrentCompositeComponent(ctx); cc.subscribeToEvent(PostAddToViewEvent.class, new SetClientIdListener(this)); }
public ContextualCompositeMethodExpression(ValueExpression source, MethodExpression delegate) { this.delegate = delegate; this.source = source; this.location = null; FacesContext ctx = FacesContext.getCurrentInstance(); UIComponent cc = UIComponent.getCurrentCompositeComponent(ctx); cc.subscribeToEvent(PostAddToViewEvent.class, new SetClientIdListener(this)); }
public ContextualCompositeMethodExpression(ValueExpression source, MethodExpression delegate) { this.delegate = delegate; this.source = source; this.location = null; FacesContext ctx = FacesContext.getCurrentInstance(); UIComponent cc = UIComponent.getCurrentCompositeComponent(ctx); cc.subscribeToEvent(PostAddToViewEvent.class, new SetClientIdListener(this)); }
public ContextualCompositeMethodExpression(Location location, MethodExpression delegate) { this.delegate = delegate; this.location = location; this.source = null; FacesContext ctx = FacesContext.getCurrentInstance(); UIComponent cc = UIComponent.getCurrentCompositeComponent(ctx); cc.subscribeToEvent(PostAddToViewEvent.class, new SetClientIdListener(this)); }
public ContextualCompositeMethodExpression(Location location, MethodExpression delegate) { this.delegate = delegate; this.location = location; this.source = null; FacesContext ctx = FacesContext.getCurrentInstance(); UIComponent cc = UIComponent.getCurrentCompositeComponent(ctx); cc.subscribeToEvent(PostAddToViewEvent.class, new SetClientIdListener(this)); }
public ContextualCompositeMethodExpression(ValueExpression source, MethodExpression delegate) { this.delegate = delegate; this.source = source; this.location = null; FacesContext ctx = FacesContext.getCurrentInstance(); UIComponent cc = UIComponent.getCurrentCompositeComponent(ctx); cc.subscribeToEvent(PostAddToViewEvent.class, new SetClientIdListener(this)); }
public ContextualCompositeMethodExpression(Location location, MethodExpression delegate) { this.delegate = delegate; this.location = location; this.source = null; FacesContext ctx = FacesContext.getCurrentInstance(); UIComponent cc = UIComponent.getCurrentCompositeComponent(ctx); cc.subscribeToEvent(PostAddToViewEvent.class, new SetClientIdListener(this)); }
@Override public Object getValue(ELContext context) { FacesContext facesContext = facesContext(context); // Look for the attribute set by LocationValueExpression // or LocationMethodExpression on the FacesContext UIComponent cc = (UIComponent) facesContext.getAttributes() .get(CompositeComponentELUtils.CURRENT_COMPOSITE_COMPONENT_KEY); if (cc == null) { // take the composite component from the stack cc = UIComponent.getCurrentCompositeComponent(facesContext(context)); } return cc; }
public void processEvent(ComponentSystemEvent event) throws AbortProcessingException { UIComponent component = event.getComponent(); FacesContext context = FacesContext.getCurrentInstance(); // TODO: Implement target for the base tag String target = verifyTarget((String) component.getAttributes().get("target")); if (target != null) { UIComponent cc = UIComponent.getCurrentCompositeComponent(context); if (cc != null) { component.getAttributes().put(COMP_KEY, cc.getClientId(context)); } context.getViewRoot().addComponentResource(context, component, target); } }
public void processEvent(ComponentSystemEvent event) throws AbortProcessingException { UIComponent component = event.getComponent(); FacesContext context = FacesContext.getCurrentInstance(); // TODO: Implement target for the base tag String target = verifyTarget((String) component.getAttributes().get("target")); if (target != null) { UIComponent cc = UIComponent.getCurrentCompositeComponent(context); if (cc != null) { component.getAttributes().put(COMP_KEY, cc.getClientId(context)); } context.getViewRoot().addComponentResource(context, component, target); } }
@Override public void processEvent(ComponentSystemEvent event) throws AbortProcessingException { UIComponent component = event.getComponent(); FacesContext context = FacesContext.getCurrentInstance(); String target = verifyTarget((String) component.getAttributes().get("target")); if (target != null) { // We're checking for a composite component here as if the resource // is relocated, it may still require it's composite component context // in order to properly render. Store it for later use by // encodeBegin() and encodeEnd(). UIComponent cc = UIComponent.getCurrentCompositeComponent(context); if (cc != null) { component.getAttributes().put(COMP_KEY, cc.getClientId(context)); } context.getViewRoot().addComponentResource(context, component, target); } }
@Override public void apply(FaceletContext ctx, UIComponent parent) throws IOException { UIComponent compositeParent = UIComponent.getCurrentCompositeComponent(ctx.getFacesContext()); if (compositeParent != null) { compositeParent.subscribeToEvent(PostAddToViewEvent.class, new RelocateFacetListener(ctx, parent, this.tag.getLocation())); } }
@Override public void apply(FaceletContext ctx, UIComponent parent) throws IOException { UIComponent compositeParent = UIComponent.getCurrentCompositeComponent(ctx.getFacesContext()); if (compositeParent != null) { compositeParent.subscribeToEvent(PostAddToViewEvent.class, new RelocateFacetListener(ctx, parent, this.tag.getLocation())); } }
public void apply(FaceletContext ctx, UIComponent parent) throws IOException { UIComponent compositeParent = UIComponent.getCurrentCompositeComponent(ctx.getFacesContext()); if (compositeParent != null) { compositeParent.subscribeToEvent(PostAddToViewEvent.class, new RelocateFacetListener(ctx, parent, this.tag.getLocation())); } }
@Override public void apply(FaceletContext ctx, UIComponent parent) throws IOException { UIComponent compositeParent = UIComponent.getCurrentCompositeComponent(ctx.getFacesContext()); if (compositeParent != null) { compositeParent.subscribeToEvent(PostAddToViewEvent.class, new RelocateFacetListener(ctx, parent, this.tag.getLocation())); } }
public void apply(FaceletContext ctx, UIComponent parent) throws IOException { UIComponent compositeParent = UIComponent.getCurrentCompositeComponent(ctx.getFacesContext()); if (compositeParent != null) { int count = parent.getChildCount(); compositeParent.subscribeToEvent(PostAddToViewEvent.class, new RelocateChildrenListener(ctx, parent, count, this.tag.getLocation())); } }
@Override public void apply(FaceletContext ctx, UIComponent parent) throws IOException { UIComponent compositeParent = UIComponent.getCurrentCompositeComponent(ctx.getFacesContext()); if (compositeParent != null) { int count = parent.getChildCount(); compositeParent.subscribeToEvent(PostAddToViewEvent.class, new RelocateChildrenListener(ctx, parent, count, this.tag.getLocation())); } }
@Override public void apply(FaceletContext ctx, UIComponent parent) throws IOException { UIComponent compositeParent = UIComponent.getCurrentCompositeComponent(ctx.getFacesContext()); if (compositeParent != null) { int count = parent.getChildCount(); compositeParent.subscribeToEvent(PostAddToViewEvent.class, new RelocateChildrenListener(ctx, parent, count, this.tag.getLocation())); } }
@Override public void apply(FaceletContext ctx, UIComponent parent) throws IOException { UIComponent compositeParent = UIComponent.getCurrentCompositeComponent(ctx.getFacesContext()); if (compositeParent != null) { int count = parent.getChildCount(); compositeParent.subscribeToEvent(PostAddToViewEvent.class, new RelocateChildrenListener(ctx, parent, count, this.tag.getLocation())); } }