public abstract class UIForm extends Object
Note: Since 5.9.0, a more advanced user interface
can be implemented to replace the default model-driven record form.
For more information, see UserServiceRecordFormFactory
.
A specific record view may be associated with the default view of a table.
The component must be declared under the element
<osd:table>
. For example:
where<xs:annotation> <xs:appinfo> <osd:table> <primaryKeys>/id</primaryKeys> <recordForm osd:class="com.foo.MyUIForm"/> <osd:table> <xs:appinfo> </xs:annotation>
com.foo.MyUIForm
is
the fully qualified name of a class implementing this interface.
The declaration may also use parameters:
where<recordForm class="com.foo.MyUIForm"> <param1>...</param1> <param2>...</param2> </recordForm>
param1
and param2
are JavaBean properties
of the com.foo.MyUIForm
class.
For more information, see the JavaBean specification.
When a session of EBX® generates HTTP responses involving the record view:
setParam1(...)
and
setParam2(...)
).defineHeader(UIFormHeader, UIFormContext)
is invoked.defineBody(UIFormBody, UIFormContext)
is invoked.defineBottomBar(UIFormBottomBar, UIFormContext)
is invoked.Once all these definition methods have been invoked, the specified contents are then written in the following order:
UIFormPane.writePane(UIFormPaneWriter, UIFormContext)
)The EBX® user interface ensures that an instance of this class is executed by no more than one thread at any given time.
UserServiceRecordFormFactory
Constructor and Description |
---|
UIForm() |
Modifier and Type | Method and Description |
---|---|
void |
defineBody(UIFormBody aBody,
UIFormContext aContext)
Specifies the body of the form.
|
void |
defineBottomBar(UIFormBottomBar aBottomBar,
UIFormContext aContext)
Specifies the bottom bar of the form.
|
void |
defineHeader(UIFormHeader aHeader,
UIFormContext aContext)
Specifies the header of the form.
|
boolean |
shallValidateForm(UIFormContext aContext)
Returns
true if the user input associated with this form will be
validated; returns false if the local user input related to the current form
is ignored beyond the execution of this method. |
void |
validateForm(UIFormRequestContext aContext)
This method offers the opportunity to perform custom validation on user input.
|
public void defineHeader(UIFormHeader aHeader, UIFormContext aContext)
For details on when the EBX® user interface invokes this method, see Life cycle.
public void defineBody(UIFormBody aBody, UIFormContext aContext)
For details on when the EBX® user interface invokes this method, see Life cycle.
public void defineBottomBar(UIFormBottomBar aBottomBar, UIFormContext aContext)
For details on when the EBX® user interface invokes this method, see Life cycle.
public void validateForm(UIFormRequestContext aContext)
This method is called only if the method shallValidateForm()
has returned
true
and after all other components have been validated (built-in and UI bean alike).
Default implementation does nothing.
shallValidateForm(UIFormContext)
public boolean shallValidateForm(UIFormContext aContext)
true
if the user input associated with this form will be
validated; returns false
if the local user input related to the current form
is ignored beyond the execution of this method.
More precisely, user input validation is performed in five steps:
shallValidateForm
method is invoked
and decides whether the remaining steps below are to be invoked
(it can also perform some validation itself).true
:
the method validateForm()
is invoked. For example, it can perform user interface-specific checks.
Default implementation always returns true
.
validateForm(UIFormRequestContext)