How can I disable or hide a parameter to the user?

asked 13 Sep '11, 08:31

Jake's gravatar image

Jake ♦♦
796222226235
accept rate: 98%


There are currently two ways to control whether a given parameter will be shown to the user or not:

-Setting the <ask> property to false: You can define it directly inside the parameter, or also you can configure it using a <setInstallerVariable> action, like you can do with any other parameter property. For instance:

<setInstallerVariable name="parameter(name-of-the-parameter).ask" value="0">
  <ruleList>
    <!-- Here you can specify the rules that must be satisfied in order for the ask property to be set to zero -->
  </ruleList>
</setInstallerVariable>

-Setting a <ruleList> inside the parameter. The parameter will be shown to the user only in case the conditions inside the <ruleList> are met. It would look like the following (in our example we are using a <booleanParameter>):

<booleanParameter>
   <name>someName</name>
   <description>Some description</description>
   <explanation>Some Explanation</explanation>
   <default>1</default>
   <!-- More parameter properties can go here -->
   <ruleList>
     <!-- Here you can specify the rules that must be satisfied in order for the parameter to be shown -->
   </ruleList>
</booleanParameter>

Another property that can also affect the display of a parameter is the <cliOptionShow> property. Setting it to zero will avoid this parameter to be shown on the help summary, that you can obtain by invoking the installer and passing to it the "--help" option. Please note that this will not prevent to effectively configure the parameter from the command line or an option file, it will just not show the parameter information to the user.

link

answered 13 Sep '11, 08:35

Jake's gravatar image

Jake ♦♦
796222226235
accept rate: 98%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×47
×8
×7

Asked: 13 Sep '11, 08:31

Seen: 6,024 times

Last updated: 13 Sep '11, 08:39