pulldown-select

Used to display a drop-down selection list with a label styled like other drop-down fields in the application.

Attributes

Child Elements

Example

The following code sample illustrates how to use the pulldown-select and multivalue-select tags to control the displayed values for a list predicate on a Subscription Panel, using a drop down list called "Categories" with selections that represent each set of values. The user makes a selection and uses the action button called "Get Services" to change the values in the select box called "Choices".

Note that this panel expects that the Subscription Domain will contain a predicate called "Details", and would not work without it.

<%
  ArrayList<String> choices = new ArrayList<String>();
  String selectedCat = (String)request.getParameter("category");
  if(selectedCat != null && selectedCat.equals("color"))
  {
    choices.add("Red");
    choices.add("Blue");
    choices.add("Yellow");
    choices.add("Black");
  }
  else if(selectedCat != null && selectedCat.equals("food"))
  {
    choices.add("Thai");
    choices.add("Indian");
    choices.add("Italian");
  }
%>
<group label="Custom Controls">
  <multifield-grouping>
    <pulldown-select id="category" required="true" label="Categories" force-label="true"
<%
  if(selectedCat != null) {
%>
    value="<%= selectedCat %>"
<%
  }
%>
    >
      <selection-item value="color" label="Color" />
      <selection-item value="food" label="Food" />
    </pulldown-select>
    <action-button id="refreshButton" label="Get Services" />
  </multifield-grouping>
  <multivalue-select id="PREDICATE_VALUE_Detail" required="true" label="Choices">
<%
  if(selectedCat != null && selectedCat.equals("color"))
  {
%>
    <selected-value value="Blue" />
    <selected-value value="Yellow" />
<%
  }
  else if(selectedCat != null && selectedCat.equals("food"))
  {
%>
    <selected-value value="Indian" />
<%
  }
%>
<%
  if(!choices.isEmpty())
  {
    for(String choice : choices) {
%>
      <selection-item value="<%= choice %>" label="<%= choice %>" />
<%
}
}
%>
  </multivalue-select>
</group>

Custom XML Tags

Custom Subscription and Messaging Panels