public class HtmlWidgetBuilder extends Object implements WidgetBuilder<javax.faces.component.UIComponent,UIMetawidget>
Creates native JSF HTML UIComponents, such as HtmlInputText
and
HtmlSelectOneMenu
, to suit the inspected fields.
Modifier and Type | Field and Description |
---|---|
protected static String |
DATATABLE_ROW_ACTION |
Constructor and Description |
---|
HtmlWidgetBuilder() |
HtmlWidgetBuilder(HtmlWidgetBuilderConfig config) |
Modifier and Type | Method and Description |
---|---|
protected void |
addColumnComponent(javax.faces.component.UIData dataTable,
Map<String,String> tableAttributes,
String elementName,
Map<String,String> columnAttributes,
UIMetawidget metawidget)
Create a UIColumn component for the given attributes, to the given UIData.
|
protected void |
addColumnComponents(javax.faces.component.UIData dataTable,
Map<String,String> attributes,
NodeList elements,
UIMetawidget metawidget)
Adds column components to the given UIData.
|
javax.faces.component.UIComponent |
buildWidget(String elementName,
Map<String,String> attributes,
UIMetawidget metawidget)
Purely creates the widget.
|
protected void |
configureDataTableComponent(javax.faces.component.UIData uiData) |
protected javax.faces.component.UIColumn |
createColumnComponent()
Create a UIColumn component.
|
protected javax.faces.component.html.HtmlCommandLink |
createCommandLinkComponent()
Create a HtmlCommandLink component.
|
protected javax.faces.component.UIData |
createDataTableComponent()
Create a UIData component.
|
protected javax.faces.component.UIComponent |
createDataTableComponent(String elementName,
Map<String,String> attributes,
UIMetawidget metawidget) |
protected int |
getMaximumColumnsInDataTable() |
protected void |
initFacesSelect(javax.faces.component.UIComponent component,
String facesLookup,
Map<String,String> attributes,
UIMetawidget metawidget) |
protected void |
initStaticSelect(javax.faces.component.UIComponent component,
String lookup,
Class<?> clazz,
Map<String,String> attributes,
UIMetawidget metawidget) |
protected void |
setMaximumLength(javax.faces.component.UIComponent component,
Map<String,String> attributes) |
protected static final String DATATABLE_ROW_ACTION
public HtmlWidgetBuilder()
public HtmlWidgetBuilder(HtmlWidgetBuilderConfig config)
public javax.faces.component.UIComponent buildWidget(String elementName, Map<String,String> attributes, UIMetawidget metawidget)
buildWidget
in interface WidgetBuilder<javax.faces.component.UIComponent,UIMetawidget>
elementName
- XML node name of the business field. Typically 'entity', 'property' or 'action'.
Never nullattributes
- attributes of the business field to build a widget for. Never null. This Map is
modifiable - changes will be passed to subsequent WidgetBuilders, WidgetProcessors
and Layoutsmetawidget
- the parent Metawidget. Never nullprotected void initFacesSelect(javax.faces.component.UIComponent component, String facesLookup, Map<String,String> attributes, UIMetawidget metawidget)
protected void initStaticSelect(javax.faces.component.UIComponent component, String lookup, Class<?> clazz, Map<String,String> attributes, UIMetawidget metawidget)
protected void setMaximumLength(javax.faces.component.UIComponent component, Map<String,String> attributes)
protected javax.faces.component.UIComponent createDataTableComponent(String elementName, Map<String,String> attributes, UIMetawidget metawidget)
elementName
- such as ENTITY or PROPERTY. Can be useful in determining how to construct the EL
for the table.protected void addColumnComponents(javax.faces.component.UIData dataTable, Map<String,String> attributes, NodeList elements, UIMetawidget metawidget)
Clients can override this method to add additional columns, such as a 'Delete' button.
protected void addColumnComponent(javax.faces.component.UIData dataTable, Map<String,String> tableAttributes, String elementName, Map<String,String> columnAttributes, UIMetawidget metawidget)
Clients can override this method to modify the column contents. For example, to place a link around the text.
tableAttributes
- the metadata attributes used to render the parent table. May be useful for
determining the overall type of the rowprotected void configureDataTableComponent(javax.faces.component.UIData uiData)
protected javax.faces.component.UIColumn createColumnComponent()
protected javax.faces.component.UIData createDataTableComponent()
protected javax.faces.component.html.HtmlCommandLink createCommandLinkComponent()
protected int getMaximumColumnsInDataTable()
Copyright © 2015. All Rights Reserved.