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, tagConfig, widget, widgetAttr
Constructor and Description |
---|
TemplateWidgetTypeHandler(javax.faces.view.facelets.TagConfig config) |
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) |
void |
apply(javax.faces.view.facelets.FaceletContext ctx,
javax.faces.component.UIComponent parent,
Widget widget)
Returns the facelet handler that will be applied for given widget and template in this context.
|
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.
|
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,
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.
|
apply, getDevFaceletHandler, getDocumentConstraintValidatorHandler, getInputSlotHandler, getNextHandler, getNextHandler, getProperty, getRequiredProperty, setProperties, setWidget
public static final String TEMPLATE_PROPERTY_NAME
public static final String BIND_VALUE_IF_NO_FIELD_PROPERTY_NAME
public TemplateWidgetTypeHandler(javax.faces.view.facelets.TagConfig config)
public void apply(javax.faces.view.facelets.FaceletContext ctx, javax.faces.component.UIComponent parent, Widget widget) throws WidgetException, IOException
WidgetTypeHandler
apply
in class AbstractWidgetTypeHandler
ctx
- the facelet context in which this handler will be applied.parent
- parent component in the JSF treewidget
- the widget giving properties the handler will take into account.WidgetException
IOException
protected Map<String,javax.el.ValueExpression> getVariablesForRendering(javax.faces.view.facelets.FaceletContext ctx, FaceletHandlerHelper helper, Widget widget, 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 © 2017 Nuxeo. All rights reserved.