Tallis Training

Drop-Down List Vs. Radio-Buttons or Checkboxes

In this tutorial you will work with a process-description that contains an enquiry called enquiry1. This enquiry has two sources:

  • Day – a text source with five range values: Monday, Tuesday, Wednesday, Thursday, Friday
  • Month – a text source with twelve range values: January, February, ... , December

You can either create this process-description yourself, or download the ready-made WEC_tutorial1 from the World > Tutorials > Customisation_samples folder in the ACL Web Repository.

1. Run the Process-Description Locally in a Web Browser

In the Enactment Servers Configuration dialog, add the following server configuration:

  • URL: http://localhost:8080
  • Application: CustomTallis

Set this server configuration to be the default configuration.

Run the process-description in a web browser (don't forget to start the Apache Tomcat service).

As you can see, the range values are displayed as lists of radio-buttons.

Choose a day and a month and click Confirm to complete the process.

2. Create a Mapping File

The mapping file is an XML file that binds the process-description to alternative content.

In Apache Software Foundation\Tomcat 5.0\webapps\CustomTallis\customisations\mappings you will find examples of mapping files. Open the file entitled tutorial1mapping.xml.

The first four lines are constant, and can be ignored. The last line closes the guideline tag from the second line.

Nested within the guideline tag is an enquiry tag. The definition attribute of this tag points to the enquiry1 PROforma task.

Within the enquiry tag a sources tag identifies the sources of the enquiry, each with a separate source tag.

Currently, the mapping file identifies only the Month source. The mandatory definition attribute of this source is followed by an optional dropdown attribute, which is set to true (by default this attribute is false). This attribute will cause the month values to be displayed in a drop-down list rather than as radio-buttons.

3. Point to the Mapping File

For the alternative content to be used during enactment, the process-description has to point to the mapping file.

In the Context field of the top-level plan of the process-description, type the following lines:

#metadata
tallis.content=/customisations/mappings/tutorial1mapping.xml

The mapping file has to be placed within the web enactment application folder; the mapping file path is relative to the web application.

4. Run the Process-Description Locally in a Web Browser

Run the process-description.

As you can see, the months now appear in a drop-down list box.

5. Display a Drop-Down List for Days

Modify the mapping file so that the Day source values are displayed in a drop-down list.

This means you have to add the following line to the XML file:

<pf:source definition="Day" dropdown="true"/>

Run the process-description in a web-browser to test your changes.

Top | «Prev | Next»

Last update: