public class HiddenFieldProcessor extends Object implements WidgetProcessor<javax.faces.component.UIComponent,UIMetawidget>
<input type="hidden"> tags to hidden and
read-only values, so that they POST back.
Note: passing values via hidden tags is a potential security risk: they can be modified by malicious clients before being returned to the server. Where possible, prefer session-scoped or conversation-scoped beans instead.
Note: because this processor relies on StandardBindingProcessor to configure the hidden field's binding, it must come before StandardBindingProcessor in the list of WidgetProcessors.
| Constructor and Description |
|---|
HiddenFieldProcessor() |
| Modifier and Type | Method and Description |
|---|---|
javax.faces.component.UIComponent |
processWidget(javax.faces.component.UIComponent component,
String elementName,
Map<String,String> attributes,
UIMetawidget metawidget)
Process the given widget.
|
protected javax.faces.component.UIComponent |
wrapWithHiddenField(javax.faces.component.UIComponent component,
Map<String,String> attributes,
UIMetawidget metawidget) |
public javax.faces.component.UIComponent processWidget(javax.faces.component.UIComponent component,
String elementName,
Map<String,String> attributes,
UIMetawidget metawidget)
WidgetProcessorWidgetBuilder, and before it is added to the Layout.processWidget in interface WidgetProcessor<javax.faces.component.UIComponent,UIMetawidget>component - the widget to process. Never nullelementName - XML node name of the business field. Typically 'entity', 'property' or 'action'.
Never nullattributes - attributes of the widget to process. Never null. This Map is modifiable - changes
will be passed to subsequent WidgetProcessors and Layoutsmetawidget - the parent Metawidget. Never nullprotected javax.faces.component.UIComponent wrapWithHiddenField(javax.faces.component.UIComponent component,
Map<String,String> attributes,
UIMetawidget metawidget)
attributes - attributes of the widget. Never nullmetawidget - the parent Metawidget. May be useful because the component hasn't been added to
its parent yetCopyright © 2015. All Rights Reserved.