All adapter wizard pages must extend techAdapterWizardPage
(which inherits from Jpanel
).
The page constructors must invoke setContextAndPage()
which adds the page to the Wizard and sets up other context information that is needed. See the example in oracle.tip.tools.ide.pm.wizard.adapter.custom.CustomConnectionPage.java
When the user chooses the Finish button, the Adapter Framework invokes the buildDataModel()
method on each wizard page in the same order that the pages were displayed. The buildDataModel()
method is responsible for copying its screen data to the data model. You can do this simply with code similar to the following:
JcaDataInterface jdata = (JcaDataInterface)getDataModel();
jdata.setProperty(propname,screenField.getText().trim());
The JcaAdapterContext
is available on all pages. It has many accessor methods for obtaining useful information. Following is a partial list of accessors that will be commonly used by wizard pages:
Table 3-2 JcaAdapterContext Accessor Methods
|
See the oracle.tip.tools.ide.pm.wizard.adapter.custom.CustomPropertiesPage.java
for an example of a wizard page developed from scratch.