Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Current »

Using panel configuration parameters

You can add configuration options to a panel this way:

install.xml
<panel id ="..." ...>
  <configuration>
    <option_name_1>option_value</option_name_1>
    <option_name_2>option_value</option_name_2>
    ...
  </configuration>
</panel>

To access this, get an instance of Panel:
- GUI installation mode - instances of IzPanel: getMetaData()
- Console installation mode - ConsolePanel: getPanel()

A Panel inherits from DefaultConfigurationHandler, which has the appropriate methods to read these parameters to access the configuration parameters.

Each panel is an implementation of com.izforge.izpack.api.data.Panel and implements the com.izforge.izpack.api.data.Configurable interface (by extending the dedicated com.izforge.izpack.api.handler.DefaultConfigurationHandler). Therefore there can be added parameters with any name to all panel s of each type.

The Configurable interface (and its default implementation DefaultConfigurationHandler) describes how to read this parameters in the implementation of the panel class. It depends on the specific panel class whether it reads parameters and which parameters in particular.

For an example for both, GUI and console installer mode, see:

  • No labels