T
- the type of widgets to be instantiated.public interface UIWidgetFactory<T extends UIWidget>
UIFormWriter.newCustomWidget(Path, UIWidgetFactory)
.
The factory must be declared under the element
xs:annotation/xs:appinfo/osd:defaultView
:
<widget osd:class="com.foo.MyWidgetFactory"/>
where com.foo.MyWidgetFactory
is
the fully qualified name of the class implementing this interface.
It is also possible to set additional JavaBean properties:
<widget osd:class="com.foo.MyWidgetFactory"> <param1>...</param1> <param2>...</param2> </widget>
where param1
and param2
are JavaBean properties of the specified class.
For more information, see the JavaBean specifications.
setParam1(...)
and
setParam2(...)
);setup(WidgetFactorySetupContext)
is called for the new instance).newInstance(WidgetFactoryContext)
is called each time an associated element
has to be displayed in the user interface.
UICustomWidget
,
UIFormWriter.newCustomWidget(Path, UIWidgetFactory)
Modifier and Type | Method and Description |
---|---|
T |
newInstance(WidgetFactoryContext aContext)
Creates and returns a new instance of widget.
|
void |
setup(WidgetFactorySetupContext aContext)
Checks and prepares this instance if called while the data model is being loaded.
|
T newInstance(WidgetFactoryContext aContext)
void setup(WidgetFactorySetupContext aContext)
This method is not called by the method UIFormWriter.newCustomWidget(Path, UIWidgetFactory)
.