A wizard contains one or more panes that contain the input fields, buttons and other controls that make up the user interface.
For each pane, perform the following:
Create a new class that extends AbstractWizardPane.
Implement setupPane(), in which you build a user interface with the help of HTMLB and wizard framework components. The following is the method's signature:
Syntax
Protected void setupPane(IWizardContext ctx, FlowContainer pane) { }
Create your user interface with HTMLB and wizard framework controls that you add to the FlowContainer object passed into the method.
For example, the following adds an input field called first_name, whose value is associated with the data model field info.firstName.
Syntax
TextInputComponent firstNameComp =
new TextInputComponent("first name", "");
firstNameComp.setValueTargetPath("info.firstName");
pane.addComponent("first_name", firstNameComp, false);
It is best to use wizard framework controls, as these can be synchronized with the data model.
For more information on wizard framework controls, see Data Model.
For more information on HTMLB controls, see HTML-Business for Java.
The following lists additional methods that you can implement:
getTitle(): Sets the pane title.
myDoBeforeDisplay(): Performs any initialization before the pane is displayed, such as setting the values of HTMLB controls from the data model.
myProcessInput(): Processes data entered into the wizard UI, and saves to the data model the data from any HTMLB controls in the pane.