public class TemplateWidgetTypeHandler extends AbstractWidgetTypeHandler
Modifier and Type | Field and Description |
---|---|
static String |
BIND_VALUE_IF_NO_FIELD_PROPERTY_NAME
Property that can be put on the widget type definition to decide whether the widget type should bind to parent
value when no field is set
|
static String |
TEMPLATE_PROPERTY_NAME |
DEV_TEMPLATE_PROPERTY_NAME, DISABLE_DEV_PROPERTY_NAME, properties
Constructor and Description |
---|
TemplateWidgetTypeHandler() |
Modifier and Type | Method and Description |
---|---|
protected void |
addFieldVariable(Map<String,javax.el.ValueExpression> variables,
javax.faces.view.facelets.FaceletContext ctx,
Widget widget,
FieldDefinition fieldDef,
Integer index) |
protected boolean |
getBindValueIfNoFieldValue(Widget widget)
Returns the "bindValueIfNoField" property value, looking up on the widget type definition first, and on the
widget definition if not found.
|
javax.faces.view.facelets.FaceletHandler |
getFaceletHandler(javax.faces.view.facelets.FaceletContext ctx,
javax.faces.view.facelets.TagConfig tagConfig,
Widget widget,
javax.faces.view.facelets.FaceletHandler[] subHandlers)
Returns the facelet handler that will be applied for given widget and template in this context.
|
protected javax.faces.view.facelets.TagAttribute |
getTemplateAttribute(FaceletHandlerHelper helper)
Returns the template attribute.
|
protected String |
getTemplateValue(Widget widget)
Returns the "template" property value, looking up on the widget definition definition first, and on the widget
type definition if not found.
|
protected Map<String,javax.el.ValueExpression> |
getVariablesForRendering(javax.faces.view.facelets.FaceletContext ctx,
FaceletHandlerHelper helper,
Widget widget,
javax.faces.view.facelets.FaceletHandler[] subHandlers,
String widgetTagConfigId,
String template)
Computes variables for rendering, making available the field values in templates using the format "field_0",
"field_1", etc.
|
protected String |
lookupProperty(String name,
Widget widget)
Helper method to retrieve a property value, looking up on the widget definition first, and on the widget type
definition if not found.
|
getDevFaceletHandler, getDocumentConstraintValidatorHandler, getInputSlotHandler, getNextHandler, getNextHandler, getNextHandler, getProperty, getRequiredProperty, setProperties
public static final String TEMPLATE_PROPERTY_NAME
public static final String BIND_VALUE_IF_NO_FIELD_PROPERTY_NAME
public TemplateWidgetTypeHandler()
public javax.faces.view.facelets.FaceletHandler getFaceletHandler(javax.faces.view.facelets.FaceletContext ctx, javax.faces.view.facelets.TagConfig tagConfig, Widget widget, javax.faces.view.facelets.FaceletHandler[] subHandlers) throws WidgetException
WidgetTypeHandler
getFaceletHandler
in interface WidgetTypeHandler
getFaceletHandler
in class AbstractWidgetTypeHandler
ctx
- the facelet context in which this handler will be applied.tagConfig
- the tag configuration this facelet will be applied for.widget
- the widget giving properties the handler will take into account.subHandlers
- facelet handlers for sub widgets.WidgetException
protected Map<String,javax.el.ValueExpression> getVariablesForRendering(javax.faces.view.facelets.FaceletContext ctx, FaceletHandlerHelper helper, Widget widget, javax.faces.view.facelets.FaceletHandler[] subHandlers, String widgetTagConfigId, String template)
protected void addFieldVariable(Map<String,javax.el.ValueExpression> variables, javax.faces.view.facelets.FaceletContext ctx, Widget widget, FieldDefinition fieldDef, Integer index)
protected String getTemplateValue(Widget widget)
protected String lookupProperty(String name, Widget widget)
protected boolean getBindValueIfNoFieldValue(Widget widget)
widget
- protected javax.faces.view.facelets.TagAttribute getTemplateAttribute(FaceletHandlerHelper helper)
Copyright © 2015 Nuxeo SA. All rights reserved.