In this lesson, you configure the parameterValidator
extension
that you defined in the previous lesson for the plug-in project.
About this task
The parameterValidator
extension point allows
for contributing extensions to validate the value of a particular
parameter as it is being entered by the user. For this sample, the value
parameter
accepts a single digit numeric character less than four. You will
use the different possible values that the user can input into the value
parameter
to display different informational messages to the user and to ensure
that the user enters only numeric characters.
Procedure
- Start by first configuring the
parameterValidators
extension.
In the Plug-in Development perspective, right
click the com.ibm.carma.plugin.howto
plug-in project
and select PDE Tools > Open Manifest.
The Plug-in Editor opens.
- From the bottom list of tabs select Extensions.
On this page, you should see the extensions that are associated with
your plug-in project. Select the
(parameterValidator)
option
below the com.ibm.carma.ui.parameterValidators
extension
point. To the right, the Extension Element Details is
listed.
- Use the Sample PDS RAM for this sample, as this is the
RAM you added the custom action to and the appropriate parameters
to in the configuration file you created in Lesson 1. In the uniqueId text
field enter, com.ibm.carma.sample.PDSRAM.
- Open the CARMA Repositories view
and connect to the remote system.
- Expand the host system with the RAM you want to use,
right-click on the particular RAM, and select Properties.
- In the Properties for RAM dialog
box that opens, you should see the unique identification listed. This
is the uniqueId you use when configuring the extension points.
- In the class text field, enter the
name of the class that contains the code that specifies the details
of the parameter validation. Enter the class name,
com.ibm.carma.plugin.howto.action.ValueParamValidationAction
.
You create this class later in this exercise.
- In the parameterId text field, enter
the parameter that is defined in the PDS RAM to which the parameter
validation applied. For this sample, use the
value
parameter,
which you defined on the PDS RAM with a parameterId
of 000
in
Lesson 1.
- Finally, in the actionId text field,
enter the action that is defined on the PDS RAM to which the parameter
validation should be applied. For this sample, use the HowTo custom
action, which you defined on the PDS RAM with an
actionId
of 100
in
Lesson 1.
Results
You have now configured a parameterValidator
to
validate the value
parameter on the HowTo custom
action for the PDS RAM.