public void addFacesComponent(FacesComponentUsage facesComponentUsage) { FacesComponent facesComponent = facesComponentUsage.getAnnotation(); assert(facesComponent.createTag()); if (null == facesComponentsByNamespace) { facesComponentsByNamespace = new HashMap<String, List<FacesComponentUsage>>(); } List<FacesComponentUsage> componentsInNamespace = null; final String namespace = facesComponent.namespace(); if (!facesComponentsByNamespace.containsKey(facesComponent.namespace())) { componentsInNamespace = new ArrayList<FacesComponentUsage>(); facesComponentsByNamespace.put(namespace, componentsInNamespace); } else { componentsInNamespace = facesComponentsByNamespace.get(namespace); } componentsInNamespace.add(facesComponentUsage); }
/** * @see com.sun.faces.application.annotation.ConfigAnnotationHandler#push(javax.faces.context.FacesContext) */ public void push(FacesContext ctx) { if (components != null) { Application app = ctx.getApplication(); ApplicationAssociate appAss = ApplicationAssociate.getCurrentInstance(); for (Map.Entry<String, FacesComponentUsage> entry : components.entrySet()) { if (entry.getValue().getAnnotation().createTag()) { appAss.addFacesComponent(entry.getValue()); } app.addComponent(entry.getKey(), entry.getValue().getTarget().getName()); } } }
/** * @see com.sun.faces.application.annotation.ConfigAnnotationHandler#push(javax.faces.context.FacesContext) */ @Override public void push(FacesContext ctx) { if (components != null) { Application app = ctx.getApplication(); ApplicationAssociate appAss = ApplicationAssociate.getCurrentInstance(); for (Map.Entry<String, FacesComponentUsage> entry : components.entrySet()) { if (entry.getValue().getAnnotation().createTag()) { appAss.addFacesComponent(entry.getValue()); } app.addComponent(entry.getKey(), entry.getValue().getTarget().getName()); } } }
/** * @see com.sun.faces.application.annotation.ConfigAnnotationHandler#push(javax.faces.context.FacesContext) */ @Override public void push(FacesContext ctx) { if (components != null) { Application app = ctx.getApplication(); ApplicationAssociate appAss = ApplicationAssociate.getCurrentInstance(); for (Map.Entry<String, FacesComponentUsage> entry : components.entrySet()) { if (entry.getValue().getAnnotation().createTag()) { appAss.addFacesComponent(entry.getValue()); } app.addComponent(entry.getKey(), entry.getValue().getTarget().getName()); } } }
/** * @see com.sun.faces.application.annotation.ConfigAnnotationHandler#push(javax.faces.context.FacesContext) */ @Override public void push(FacesContext ctx) { if (components != null) { Application app = ctx.getApplication(); ApplicationAssociate appAss = ApplicationAssociate.getCurrentInstance(); for (Map.Entry<String, FacesComponentUsage> entry : components.entrySet()) { if (entry.getValue().getAnnotation().createTag()) { appAss.addFacesComponent(entry.getValue()); } app.addComponent(entry.getKey(), entry.getValue().getTarget().getName()); } } }