ShowTable of Contents
This demonstration shows you how to combine two models into a wizard-style framework using the LWE Wizard Container builder.
To watch the demonstration in a new window, click
here
.
Refer to the following articles in this wiki for more information about the steps in this demonstration:
Creating a wizard-style framework with the LWE Wizard Container builder
LWE Wizard Container builder example CSS
Downloading the demonstration files for your project
The following files are used in this demonstration. Download these files to follow along with the demonstration:
Person.model
Person.model contains the builder calls that let users change their first name, last name, and marital status at runtime.
Spouse.model contains the builder calls that let users enter details for their spouse at runtime.
PersonalDetails.model contains the builder calls that, at runtime, display the information users enter in
Person.model and
Spouse.model. You can use
PersonalDetails.model to verify the changes that you make using the LWE Wizard Container model.
record.xml is a file that stores the information that users enter in
Person.model and
Spouse.model.
You must also create a Java utility that reads and writes the information from
Person.model and
Spouse.model to
record.xml. Refer to the following article for instructions on creating the Java utility:
Sample Java code that creates a utility to read and write from models to XML
Importing the files into your project
After you download the files, you must import them into specific folders.
1. Create a new project.
2. Create the following directory structure to import
Person.model,
Spouse.model, and
PersonalDetails.model into:
WEB-INF\models\sample
3. Create the following directory structure to import
record.xml into:
WEB-INF\sample\data
4. Create the following directory structure to import the Java utility into:
WEB-INF\work\source\com\ibm\lwm\sample\lwe