/** * Returns a convert handler for this configuration. * * <p>Next handler cannot be null, use {@link LeafFaceletHandler} if no next handler is needed. */ public ConvertHandler getConvertHandler( String tagConfigId, TagAttributes attributes, FaceletHandler nextHandler, String converterId) { ConverterConfig config = TagConfigFactory.createConverterConfig( tagConfig, tagConfigId, attributes, nextHandler, converterId); return new ConvertHandler(config); }
/** * Returns a validate handler for this configuration. * * <p>Next handler cannot be null, use {@link LeafFaceletHandler} if no next handler is needed. */ public ValidateHandler getValidateHandler( String tagConfigId, TagAttributes attributes, FaceletHandler nextHandler, String validatorId) { ValidatorConfig config = TagConfigFactory.createValidatorConfig( tagConfig, tagConfigId, attributes, nextHandler, validatorId); return new ValidateHandler(config); }
/** * Returns an html component handler for this configuration. * * <p>Next handler cannot be null, use {@link LeafFaceletHandler} if no next handler is needed. */ public ComponentHandler getHtmlComponentHandler( String tagConfigId, TagAttributes attributes, FaceletHandler nextHandler, String componentType, String rendererType) { ComponentConfig config = TagConfigFactory.createComponentConfig( tagConfig, tagConfigId, attributes, nextHandler, componentType, rendererType); return new HtmlComponentHandler(config); }
/** @since 5.6 */ public FaceletHandler getAliasTagHandler( String tagConfigId, Map<String, ValueExpression> variables, List<String> blockedPatterns, FaceletHandler nextHandler) { FaceletHandler currentHandler = nextHandler; if (variables != null) { // XXX also set id ? cache ? TagConfig config = TagConfigFactory.createTagConfig(tagConfig, tagConfigId, getTagAttributes(), nextHandler); currentHandler = new AliasTagHandler(config, variables, blockedPatterns); } return currentHandler; }
/** * Returns a message component handler with given attributes. * * <p>Uses component type "javax.faces.HtmlMessage" and renderer type "javax.faces.Message". */ public ComponentHandler getMessageComponentHandler( String tagConfigId, String id, String forId, String styleClass) { TagAttribute forAttr = createAttribute("for", forId); TagAttribute idAttr = createAttribute("id", id); if (styleClass == null) { // default style class styleClass = "errorMessage"; } TagAttribute styleAttr = createAttribute("styleClass", styleClass); TagAttributes attributes = getTagAttributes(forAttr, idAttr, styleAttr); ComponentConfig config = TagConfigFactory.createComponentConfig( tagConfig, tagConfigId, attributes, new LeafFaceletHandler(), HtmlMessage.COMPONENT_TYPE, null); return new ComponentHandler(config); }