/** * @see com.sun.faces.application.annotation.ConfigAnnotationHandler#collect(Class, java.lang.annotation.Annotation) */ public void collect(Class<?> target, Annotation annotation) { if (components == null) { components = new HashMap<String,FacesComponentUsage>(); } String value = ((FacesComponent) annotation).value(); if (null == value || 0 == value.length()) { value = target.getSimpleName(); value = Character.toLowerCase(value.charAt(0)) + value.substring(1); } components.put(value,new FacesComponentUsage(target, (FacesComponent) annotation)); }
/** * @see com.sun.faces.application.annotation.ConfigAnnotationHandler#collect(Class, java.lang.annotation.Annotation) */ @Override public void collect(Class<?> target, Annotation annotation) { if (components == null) { components = new HashMap<>(); } String value = ((FacesComponent) annotation).value(); if (null == value || 0 == value.length()) { value = target.getSimpleName(); value = Character.toLowerCase(value.charAt(0)) + value.substring(1); } components.put(value,new FacesComponentUsage(target, (FacesComponent) annotation)); }
/** * @see com.sun.faces.application.annotation.ConfigAnnotationHandler#collect(Class, java.lang.annotation.Annotation) */ @Override public void collect(Class<?> target, Annotation annotation) { if (components == null) { components = new HashMap<>(); } String value = ((FacesComponent) annotation).value(); if (null == value || 0 == value.length()) { value = target.getSimpleName(); value = Character.toLowerCase(value.charAt(0)) + value.substring(1); } components.put(value,new FacesComponentUsage(target, (FacesComponent) annotation)); }
/** * @see com.sun.faces.application.annotation.ConfigAnnotationHandler#collect(Class, java.lang.annotation.Annotation) */ @Override public void collect(Class<?> target, Annotation annotation) { if (components == null) { components = new HashMap<>(); } String value = ((FacesComponent) annotation).value(); if (null == value || 0 == value.length()) { value = target.getSimpleName(); value = Character.toLowerCase(value.charAt(0)) + value.substring(1); } components.put(value,new FacesComponentUsage(target, (FacesComponent) annotation)); }
/** * The default constructor sets the default message and sets the renderer type to <code>null</code>. */ public ValidateMultipleFields() { defaultMessage = OmniFaces.getMessage(getClass().getAnnotation(FacesComponent.class).value()); setRendererType(null); }
/** * The default constructor sets the default message and sets the renderer type to <code>null</code>. */ public ValidateMultipleFields() { defaultMessage = OmniFaces.getMessage(getClass().getAnnotation(FacesComponent.class).value()); setRendererType(null); }
@Override public TagHandler createTagHandler(String ns, String localName, TagConfig tag) throws FacesException { assert(containsTagHandler(ns, localName)); TagHandler result = super.createTagHandler(ns, localName, tag); if (null == result) { FacesComponentUsage facesComponentUsage = findFacesComponentUsageForLocalName(ns, localName); String componentType = facesComponentUsage.getAnnotation().value(); if (null == componentType || 0 == componentType.length()) { componentType = facesComponentUsage.getTarget().getSimpleName(); componentType = Character.toLowerCase(componentType.charAt(0)) + componentType.substring(1); } UIComponent throwAwayComponent = FacesContext.getCurrentInstance(). getApplication().createComponent(componentType); String rendererType = throwAwayComponent.getRendererType(); super.addComponent(localName, componentType, rendererType); result = super.createTagHandler(ns, localName, tag); } return result; }
@Override public TagHandler createTagHandler(String ns, String localName, TagConfig tag) throws FacesException { assert(containsTagHandler(ns, localName)); TagHandler result = super.createTagHandler(ns, localName, tag); if (null == result) { FacesComponentUsage facesComponentUsage = findFacesComponentUsageForLocalName(ns, localName); String componentType = facesComponentUsage.getAnnotation().value(); if (null == componentType || 0 == componentType.length()) { componentType = facesComponentUsage.getTarget().getSimpleName(); componentType = Character.toLowerCase(componentType.charAt(0)) + componentType.substring(1); } UIComponent throwAwayComponent = FacesContext.getCurrentInstance(). getApplication().createComponent(componentType); String rendererType = throwAwayComponent.getRendererType(); super.addComponent(localName, componentType, rendererType); result = super.createTagHandler(ns, localName, tag); } return result; }
@Override public TagHandler createTagHandler(String ns, String localName, TagConfig tag) throws FacesException { assert(containsTagHandler(ns, localName)); TagHandler result = super.createTagHandler(ns, localName, tag); if (null == result) { FacesComponentUsage facesComponentUsage = findFacesComponentUsageForLocalName(ns, localName); String componentType = facesComponentUsage.getAnnotation().value(); if (null == componentType || 0 == componentType.length()) { componentType = facesComponentUsage.getTarget().getSimpleName(); componentType = Character.toLowerCase(componentType.charAt(0)) + componentType.substring(1); } UIComponent throwAwayComponent = FacesContext.getCurrentInstance(). getApplication().createComponent(componentType); String rendererType = throwAwayComponent.getRendererType(); super.addComponent(localName, componentType, rendererType); result = super.createTagHandler(ns, localName, tag); } return result; }
@Override public TagHandler createTagHandler(String ns, String localName, TagConfig tag) throws FacesException { assert(containsTagHandler(ns, localName)); TagHandler result = super.createTagHandler(ns, localName, tag); if (null == result) { FacesComponentUsage facesComponentUsage = findFacesComponentUsageForLocalName(ns, localName); String componentType = facesComponentUsage.getAnnotation().value(); if (null == componentType || 0 == componentType.length()) { componentType = facesComponentUsage.getTarget().getSimpleName(); componentType = Character.toLowerCase(componentType.charAt(0)) + componentType.substring(1); } UIComponent throwAwayComponent = FacesContext.getCurrentInstance(). getApplication().createComponent(componentType); String rendererType = throwAwayComponent.getRendererType(); super.addComponent(localName, componentType, rendererType); result = super.createTagHandler(ns, localName, tag); } return result; }