|
Nuxeo Enterprise Platform 5.4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.nuxeo.ecm.platform.forms.layout.facelets.FaceletHandlerHelper
public final class FaceletHandlerHelper
Helpers for layout/widget handlers.
Helps generating custom tag handlers and custom tag attributes.
Field Summary | |
---|---|
static java.lang.String |
LAYOUT_ID_PREFIX
|
static java.lang.String |
MESSAGE_ID_SUFFIX
|
static java.lang.String |
WIDGET_ID_PREFIX
|
Constructor Summary | |
---|---|
FaceletHandlerHelper(com.sun.facelets.FaceletContext context,
com.sun.facelets.tag.TagConfig tagConfig)
|
Method Summary | |
---|---|
static com.sun.facelets.tag.TagAttributes |
addTagAttribute(com.sun.facelets.tag.TagAttributes orig,
com.sun.facelets.tag.TagAttribute newAttr)
|
com.sun.facelets.tag.TagAttributes |
copyTagAttributes(java.lang.String id,
java.lang.String... names)
Copies tag attributes with given names from the tag config, using given id as base for the id attribute. |
com.sun.facelets.tag.TagAttribute |
createAttribute(java.lang.String name,
java.lang.String value)
Creates an attribute with given name and value. |
com.sun.facelets.tag.TagAttribute |
createIdAttribute(java.lang.String base)
Creates a unique id and returns corresponding attribute, using given string id as base. |
java.lang.String |
generateLayoutId(java.lang.String layoutName)
|
java.lang.String |
generateMessageId(java.lang.String widgetName)
|
java.lang.String |
generateUniqueId()
Returns a id unique within the facelet context. |
java.lang.String |
generateUniqueId(java.lang.String base)
Returns a id unique within the facelet context using given id as base. |
java.lang.String |
generateValidIdString(java.lang.String base)
|
java.lang.String |
generateWidgetId(java.lang.String widgetName)
|
com.sun.facelets.FaceletHandler |
getAliasTagHandler(java.util.Map<java.lang.String,javax.el.ValueExpression> variables,
com.sun.facelets.FaceletHandler nextHandler)
|
com.sun.facelets.tag.jsf.ConvertHandler |
getConvertHandler(com.sun.facelets.tag.TagAttributes attributes,
com.sun.facelets.FaceletHandler nextHandler,
java.lang.String converterId)
Returns a convert handler for this configuration. |
com.sun.facelets.tag.jsf.ComponentHandler |
getErrorComponentHandler(java.lang.String errorMessage)
Component handler that displays an error on interface |
com.sun.facelets.tag.jsf.ComponentHandler |
getHtmlComponentHandler(com.sun.facelets.tag.TagAttributes attributes,
com.sun.facelets.FaceletHandler nextHandler,
java.lang.String componentType,
java.lang.String rendererType)
Returns an html component handler for this configuration. |
com.sun.facelets.tag.jsf.ComponentHandler |
getMessageComponentHandler(java.lang.String id,
java.lang.String forId,
java.lang.String styleClass)
Returns a message component handler with given attributes. |
static com.sun.facelets.tag.TagAttributes |
getTagAttributes(java.util.List<com.sun.facelets.tag.TagAttribute> attributes)
|
com.sun.facelets.tag.TagAttributes |
getTagAttributes(java.lang.String id,
Widget widget)
Creates tag attributes using given widget properties and field definitions. |
static com.sun.facelets.tag.TagAttributes |
getTagAttributes(com.sun.facelets.tag.TagAttribute... attributes)
|
com.sun.facelets.tag.jsf.ValidateHandler |
getValidateHandler(com.sun.facelets.tag.TagAttributes attributes,
com.sun.facelets.FaceletHandler nextHandler,
java.lang.String validatorId)
Returns a validate handler for this configuration. |
boolean |
shouldCreateReferenceAttribute(java.lang.String key,
java.io.Serializable value)
Returns true if a reference tag attribute should be created for given property value. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String LAYOUT_ID_PREFIX
public static final java.lang.String WIDGET_ID_PREFIX
public static final java.lang.String MESSAGE_ID_SUFFIX
Constructor Detail |
---|
public FaceletHandlerHelper(com.sun.facelets.FaceletContext context, com.sun.facelets.tag.TagConfig tagConfig)
Method Detail |
---|
public java.lang.String generateUniqueId()
public java.lang.String generateUniqueId(java.lang.String base)
public java.lang.String generateValidIdString(java.lang.String base)
public java.lang.String generateWidgetId(java.lang.String widgetName)
public java.lang.String generateLayoutId(java.lang.String layoutName)
public java.lang.String generateMessageId(java.lang.String widgetName)
public com.sun.facelets.tag.TagAttribute createIdAttribute(java.lang.String base)
public com.sun.facelets.tag.TagAttribute createAttribute(java.lang.String name, java.lang.String value)
The attribute namespace is assumed to be empty.
public boolean shouldCreateReferenceAttribute(java.lang.String key, java.io.Serializable value)
Reference tag attributes are using a non-literal EL expression so that this property value is not kept (cached) in the component on ajax refresh.
Off course property values already representing an expression cannot be mapped as is because they would need to be resolved twice.
Converters and validators cannot be referenced either because components
expect corresponding value expressions to resolve to a Converter
or Validator
instance (instead of the converter of validator
id).
public static com.sun.facelets.tag.TagAttributes getTagAttributes(com.sun.facelets.tag.TagAttribute... attributes)
public static com.sun.facelets.tag.TagAttributes getTagAttributes(java.util.List<com.sun.facelets.tag.TagAttribute> attributes)
public static com.sun.facelets.tag.TagAttributes addTagAttribute(com.sun.facelets.tag.TagAttributes orig, com.sun.facelets.tag.TagAttribute newAttr)
public com.sun.facelets.tag.TagAttributes copyTagAttributes(java.lang.String id, java.lang.String... names)
public com.sun.facelets.tag.TagAttributes getTagAttributes(java.lang.String id, Widget widget)
Assumes the "value" attribute has to be computed from the first field definition, using the "value" expression (see widget type tag handler exposed values).
public com.sun.facelets.tag.jsf.ComponentHandler getHtmlComponentHandler(com.sun.facelets.tag.TagAttributes attributes, com.sun.facelets.FaceletHandler nextHandler, java.lang.String componentType, java.lang.String rendererType)
Next handler cannot be null, use LeafFaceletHandler
if no next
handler is needed.
public com.sun.facelets.tag.jsf.ComponentHandler getErrorComponentHandler(java.lang.String errorMessage)
public com.sun.facelets.tag.jsf.ConvertHandler getConvertHandler(com.sun.facelets.tag.TagAttributes attributes, com.sun.facelets.FaceletHandler nextHandler, java.lang.String converterId)
Next handler cannot be null, use LeafFaceletHandler
if no next
handler is needed.
public com.sun.facelets.tag.jsf.ValidateHandler getValidateHandler(com.sun.facelets.tag.TagAttributes attributes, com.sun.facelets.FaceletHandler nextHandler, java.lang.String validatorId)
Next handler cannot be null, use LeafFaceletHandler
if no next
handler is needed.
public com.sun.facelets.tag.jsf.ComponentHandler getMessageComponentHandler(java.lang.String id, java.lang.String forId, java.lang.String styleClass)
Uses component type "javax.faces.HtmlMessage" and renderer type "javax.faces.Message".
public com.sun.facelets.FaceletHandler getAliasTagHandler(java.util.Map<java.lang.String,javax.el.ValueExpression> variables, com.sun.facelets.FaceletHandler nextHandler)
|
Nuxeo Enterprise Platform 5.4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |