Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The directory field is essentially the same as the file field except the field will ensure a directory is selected.

Code Block
languagehtml/xml
<field type="dir" align="left" variable="existing.jboss.home">
  <spec txt="" size="25" set="$INSTALL_PATH$FILE_SEPARATOR${jboss.version}" mustExist="false"

...

/>
</field>

...

The directory supports the following two special attributes for the <spec> element:

...

Messages for the directory field can be customized by creating a custom lang pack and overriding the following values (attribute values wrapped for readability):

Code Block
languagehtml/xml
<str id="UserInputPanel.dir.nodirectory.message" 

...

txt="You must select a valid directory."/>
<str id="UserInputPanel.dir.nodirectory.caption" 

...

txt="No Directory Selected"/>
<str id="UserInputPanel.dir.notdirectory.message" 

...

txt="The directory you have chosen

...

 

...

either does not exist or is not valid."/>
<str id="UserInputPanel.dir.notdirectory.caption"

...

 txt="Invalid Directory"/>

...

Note: Mixing directory fields with other fields that have text in front of them can lead to formatting (layout) issues. Placing these types of elements on different panels can provide a much better user experience.