/** * Specialized implementation to prevent caching of the MetaRuleset when ProjectStage is * Development. */ @Override public void setAttributes(FaceletContext ctx, Object instance) { if (instance != null) { if (ctx.getFacesContext().isProjectStage(ProjectStage.Development)) { Metadata meta = createMetaRuleset(instance.getClass()).finish(); meta.applyMetadata(ctx, instance); } else { super.setAttributes(ctx, instance); } } }
protected void doNewComponentActions(FaceletContext ctx, String id, UIComponent c) { if (log.isLoggable(Level.FINE)) { log.fine(owner.getTag() + " Component[" + id + "] Created: " + c.getClass().getName()); } // If this is NOT a composite component... if (null == createCompositeComponentDelegate) { // set the attributes and properties into the UIComponent instance. owner.setAttributes(ctx, c); } // otherwise, allow the composite component code to do it. // mark it owned by a facelet instance c.getAttributes().put(ComponentSupport.MARK_CREATED, id); if (ctx.getFacesContext().isProjectStage(ProjectStage.Development)) { // inject the location into the component c.getAttributes().put(UIComponent.VIEW_LOCATION_KEY, owner.getTag().getLocation()); } }