public class ReadableIdProcessor extends Object implements WidgetProcessor<StaticXmlWidget,StaticXmlMetawidget>
Unlike UIViewRoot.createUniqueId
, tries to make the id human readable, both for
debugging purposes and for when running unit tests (using, say, WebTest). Because the ids are
based off the value expression (or method expression) of the StaticXmlWidget, this
WidgetProcessor must come after StandardBindingProcessor
(or equivalent).
Constructor and Description |
---|
ReadableIdProcessor() |
Modifier and Type | Method and Description |
---|---|
StaticXmlWidget |
processWidget(StaticXmlWidget widget,
String elementName,
Map<String,String> attributes,
StaticXmlMetawidget metawidget)
Process the given widget.
|
public StaticXmlWidget processWidget(StaticXmlWidget widget, String elementName, Map<String,String> attributes, StaticXmlMetawidget metawidget)
WidgetProcessor
WidgetBuilder
, and before it is added to the Layout
.processWidget
in interface WidgetProcessor<StaticXmlWidget,StaticXmlMetawidget>
widget
- 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 nullCopyright © 2015. All Rights Reserved.