It's all about the answers!

Ask a question

Creating a RAM Custom Policy with checkboxes and/or drop down list parameters


Allen Earnest (6212437) | asked Jul 25 '13, 4:32 p.m.
edited Jul 25 '13, 4:33 p.m.
Hello All!

I'm writing some custom policies in RAM and have a question.

I've successfully made a simple policy that has a single text parameter, but I'd like to have a drop-down list on my custom policy to let the admin choose from a list when they are configuring the policy.  I've seen some policies use checkboxes, so I know those are possible.

I assume I must do something special when I set the ConfigurationDetails object, but beyond that I don't know what to do.

Here is my code snippet for creating my text parameter on my current custom policy:

public static final ConfigurationDetails[] CONFIG_DETAILS = {
new ConfigurationDetails(REGEX, "Asset Name Validation Regex", "This regular expression will be used to validate the asset name", false, false)
};


How do I make drop down lists and checkboxes parameters on my custom policy?

Thanks!

Accepted answer


permanent link
Rich Kulp (3.6k38) | answered Jul 25 '13, 5:00 p.m.
FORUM MODERATOR / JAZZ DEVELOPER
edited Jul 25 '13, 5:49 p.m. by Sheehan Anderson (1.2k4)
Go to here in the help:

http://pic.dhe.ibm.com/infocenter/ramhelp/v7r5m1/topic/com.ibm.ram.api.doc/topics/com/ibm/ram/extension/ConfigurationDetails.html

This shows you the javadoc for the different styles of configuration details.

Javadoc for a checkbox
http://pic.dhe.ibm.com/infocenter/ramhelp/v7r5m1/topic/com.ibm.ram.api.doc/topics/com/ibm/ram/extension/MultiValuesConfigurationDetails.html

Javadoc for a drop down list
http://pic.dhe.ibm.com/infocenter/ramhelp/v7r5m1/topic/com.ibm.ram.api.doc/topics/com/ibm/ram/extension/SelectBoxConfigurationDetails.html
Allen Earnest selected this answer as the correct answer

Comments
Allen Earnest commented Jul 26 '13, 9:19 a.m.

many thanks rich!

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.