Browse Prior Art Database

Composite Wizard

IP.com Disclosure Number: IPCOM000013849D
Original Publication Date: 2001-Feb-01
Included in the Prior Art Database: 2003-Jun-18
Document File: 4 page(s) / 63K

Publishing Venue

IBM

Abstract

This disclosure discusses a technical high level programming design to create a new "composite" wizard from a group of completed smaller "sub" wizards. The disclosure deals with an implementation done in Java in a Windows environment and implemented within a wizard framework used by IBM developers of wizards for the AS/400 Operations Navigator. The wizard concepts discussed are fairly general however, and the design could be implemented in most any language or development platform.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 31% of the total text.

Page 1 of 4

Composite Wizard

This disclosure discusses a technical high level programming design to create a new "composite" wizard from a group of completed smaller "sub" wizards. The disclosure deals with an implementation done in Java in a Windows environment and implemented within a wizard framework used by IBM developers of wizards for the AS/400 Operations Navigator. The wizard concepts discussed are fairly general however, and the design could be implemented in most any language or development platform.

In our development environment, a wizard consists of two major components or classes, the wizard state machine and the wizard databean. In order to launch the wizard the developer constructs an object of a third class "WizardManager" passing in an instance of the wizard state machine and the databean that the developer coded the implement the wizard, as well as the list of pages or panels for the wizard (in the order they are to be displayed).

The state machine class implements an interface called "WizardStateMachine". An interface in Java defines methods that all classes implementing the interface must implement. The WizardStateMachine interface defines two methods that must be implemented by any class that implements the interface:
public int getNextPage(int pageIndex)
This method is called by the WizardManager every time the user hits the next button. The pageIndex passed in is equal to the index of the page that was just displayed (with the first page of the wizard having an index of 0 the next 1, 2, 3, etc...). This method then returns the next page of the wizard that should be displayed based on the pageIndex value passed in and any data that the user may have entered. The wizard will load and display the page with the index that is retuned. This method is what allows the wizard to skip pages based on user input rather than just always run through all the panels in sequence. This is what makes the class a true "state machine".
public void setButtonStates(int pageIndex)
This method is called by the WizardManager after getNextPage and just prior to the next page being displayed. The programmer places code in this method that disables the "Next" or "Previous" button based on the pageIndex of the page about to be displayed and the content of data fields on that page. The databean class is used to keep track of the data that the user enters from the various data entry fields in the on the pages of the wizard. When a page is displayed, data values in the databean are copied to the page, and when the user hits the "Next" or "Finish" buttons data entered by the user is copied from the panel back to the databean. When the user hits finish, the data values in the databean are used to complete whatever task the wizard was designed to execute in the manner that the user specified. The databean class implements an interface called DataBean that defines three methods that implementing classes must implement:
public void load() This method can be cal...