public class PrimeFacesWidgetBuilder extends HtmlWidgetBuilder
Creates native PrimeFaces UIComponents, such as HtmlCalendar
and
HtmlInputNumberSlider
, to suit the inspected fields.
As an implementation detail, PrimeFacesWidgetBuilder
extends
HtmlWidgetBuilder
, which is a little unusual for a widget builder (they normally
implement WidgetBuilder
directly), but we want to reuse a lot of
HtmlWidgetBuilder
's secondary methods. Note that whilst we extend
HtmlWidgetBuilder
we only create PrimeFaces components, not any regular JSF
components.
DATATABLE_ROW_ACTION
Constructor and Description |
---|
PrimeFacesWidgetBuilder() |
PrimeFacesWidgetBuilder(PrimeFacesWidgetBuilderConfig config) |
Modifier and Type | Method and Description |
---|---|
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 int |
getMaximumColumnsInDataTable() |
protected void |
setMaximumLength(javax.faces.component.UIComponent component,
Map<String,String> attributes) |
addColumnComponent, addColumnComponents, createDataTableComponent, initFacesSelect, initStaticSelect
public PrimeFacesWidgetBuilder()
public PrimeFacesWidgetBuilder(PrimeFacesWidgetBuilderConfig config)
public javax.faces.component.UIComponent buildWidget(String elementName, Map<String,String> attributes, UIMetawidget metawidget)
HtmlWidgetBuilder
buildWidget
in interface WidgetBuilder<javax.faces.component.UIComponent,UIMetawidget>
buildWidget
in class HtmlWidgetBuilder
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 setMaximumLength(javax.faces.component.UIComponent component, Map<String,String> attributes)
setMaximumLength
in class HtmlWidgetBuilder
protected void configureDataTableComponent(javax.faces.component.UIData uiData)
configureDataTableComponent
in class HtmlWidgetBuilder
protected javax.faces.component.UIColumn createColumnComponent()
HtmlWidgetBuilder
createColumnComponent
in class HtmlWidgetBuilder
protected javax.faces.component.UIData createDataTableComponent()
HtmlWidgetBuilder
createDataTableComponent
in class HtmlWidgetBuilder
protected javax.faces.component.html.HtmlCommandLink createCommandLinkComponent()
HtmlWidgetBuilder
createCommandLinkComponent
in class HtmlWidgetBuilder
protected int getMaximumColumnsInDataTable()
getMaximumColumnsInDataTable
in class HtmlWidgetBuilder
Copyright © 2015. All Rights Reserved.