xfsiselect

Purpose

Container for a single selection control, for example a dropdown menu.

Contained by

Contains

Attribute groups

Attributes

Attribute Description Type Default Options Use
errmsg The error message to be issued if the control fails validation xs:string none    optional 
initial The initial value of the control xs:string none    optional 
name The name of the control and the form variable return to the server xs:string none    required 

Examples

<?xml version="1.0" encoding="UTF-8"?>
<canvas layoutName="/forms.mlyt" pageTitle="xfsiselect">
  <xfform name="formControls" action="download.jsp">
    <xfsiselect name="select" caption="Choose platform" captionPane="controlCaption1"
      entryPane="controlEntry1" initial="linux">
      <xfoption caption="Windows" value="windows"/>
      <xfoption caption="MacOS X" value="mac"/>
      <xfoption caption="Linux" value="linux"/>
    </xfsiselect>
    <xfaction type="submit" caption="Download" captionPane="controlCaption2"
      entryPane="controlEntry2"/>
  </xfform>
</canvas>

For the purpose of this demonstration submitted data will be processed by a simple JSP.

<?xml version="1.0" encoding="UTF-8"?>
<%
response.setContentType("x-application/vnd.xdime+xml");
String platform = request.getParameter("select");
%>
<canvas layoutName="/welcome.mlyt" pageTitle="Forms in XDIME 1">
  <pane name="background">
    <p>You've chosen <%=platform%>!</p>
  </pane>
</canvas>

The forms.mlyt layout may have the following structure.

forms.mlyt

Related topics