| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
| <html> |
| <head> |
| <title>wml:Select</title> |
| <link rel="stylesheet" type="text/css" href="Tapestry.css" title="style"> |
| </head> |
| <body> |
| <table border="0" cellpadding="0" cellspacing="0" width="100%"> |
| <tr> |
| <td align="left"><a href="wml.PropertySelection.html"><img alt="PropertySelection" src="common-images/prev.png"></a></td> |
| <td align="middle"><a href="index.html"><img alt="Component Index" src="common-images/home.png" ></a></td> |
| <td align="right"><a href="wml.SelectionField.html"><img alt="SelectionField" src="common-images/next.png"></a></td> |
| <tr> |
| <tr> |
| <td colspan="3"> |
| <hr> |
| </td> |
| </tr> |
| <tr> |
| <td colspan="3"> |
| <table border="0" cellpadding="4" cellspacing="4" width="100%"> |
| <tr valign="top"> |
| <td> |
| <table> |
| <tr> |
| <td><font size="+2"><b>wml:Select</b></font></td> |
| </tr> |
| <tr> |
| <td> <A href="../api/org/apache/tapestry/wml/Select.html">org.apache.tapestry.wml.Select</a> |
| </td> |
| </tr> |
| </table> |
| </td> |
| <td> |
| <table align="right" valign="middle" cellpadding="8"> |
| <tr> |
| <td><IMG alt="Image Component" src="images/wml.select.png" ></td> |
| </tr> |
| </table> |
| </td> |
| </tr> |
| <tr valign="center"> |
| <td colspan="2"> </td> |
| </tr> |
| <tr> |
| <td colspan="2"> <b>Description</b> <br> |
| The wml:Select component lets users pick from a list of options. Each |
| option is specified by an wml:Option component. Each Option element |
| may have one line of formatted text (which may be wrapped or truncated |
| by the user agent if too long). </td> |
| </tr> |
| <tr> |
| <td colspan="2"> <b>See Also</b> <br> |
| <A href="wml.Go.html">wml:Go</a>, <A href="wml.Option.html">wml:Option</a> |
| </td> |
| </tr> |
| <tr> |
| <td colspan="2"> <b>Parameters</b> <br> |
| <table border="1" cellpadding="4" cellspacing="4" class="parameters"> |
| <tr> |
| <th>Name</th> |
| <th>Type</th> |
| <th>Direction</th> |
| <th>Required</th> |
| <th>Default</th> |
| <th>Description</th> |
| </tr> |
| <tr> |
| <td>multiple</td> |
| <td>boolean</td> |
| <td>in</td> |
| <td>no</td> |
| <td> </td> |
| <td> This attribute specifies a title for this element, which |
| may be used in the presentation of this object. This attribute |
| specifies a title for this element, which may be used in the |
| presentation of this object. </td> |
| </tr> |
| <tr> |
| <td>name</td> |
| <td>String</td> |
| <td>in</td> |
| <td>no</td> |
| <td> </td> |
| <td> The name attribute indicates the name of the variable to |
| set with the result of the selection. The variable is set to |
| the string value of the chosen option element, which is specified |
| with the value attribute. The name variable's value is used |
| to pre-select options in the select list. </td> |
| </tr> |
| <tr> |
| <td>value</td> |
| <td>String</td> |
| <td>in</td> |
| <td>no</td> |
| <td> </td> |
| <td> The value attribute indicates the default value of the variable |
| named in the name attribute. When the element is displayed, |
| and the variable named in the name attribute is not set, the |
| name variable may be assigned the value specified in the value |
| attribute, depending on the values defined in iname and ivalue. |
| If the name variable already contains a value, the value attribute |
| is ignored. Any application of the default value is done before |
| the list is pre-selected with the value of the name variable. |
| If this element allows the selection of multiple options, the |
| result of the user's choice is a list of all selected values, |
| separated by the semicolon character. The name variable is set |
| with this result. In addition, the value attribute is interpreted |
| as a semicolon-separated list of pre-selected options. </td> |
| </tr> |
| </table> |
| <p> Body: <strong>removed</strong><br> |
| Informal parameters: <strong>allowed</strong><br> |
| Reserved parameters: none </p> |
| </td> |
| </tr> |
| <tr> |
| <td colspan="2"> <p><b>Example</b></p> |
| <p>This example show how to use a WML Select and Option components. |
| Because of simplicity we recommend to use the <a href="wml.PropertySelection.html">wml:PropertySelection</a> |
| component. </p> |
| <table valign="middle"> |
| <tr> |
| <td> <IMG alt="WML Image Example" src="images/wml.select-example.png" > |
| </td> |
| </tr> |
| </table> |
| <br> |
| <p>Template</p> |
| <p> <card jwcid="@<a href="wml.Card.html">wml:Card</a>" |
| id="incomecard"><br> |
| <p><br> |
| How much do you make?<br> |
| <select jwcid="incomeSelect@<a href="wml.Select.html">wml:Select</a>" |
| name="ognl:components.income.varName" title="income"><br> |
| <option jwcid="@<a href="wml.Option.html">wml:Option</a>" |
| value="$10-50K"> $$10-25K </option><br> |
| <option jwcid="@<a href="wml.Option.html">wml:Option</a>" value="$25-50K"> |
| $$25-50K </option><br> |
| <option jwcid="@<a href="wml.Option.html">wml:Option</a>" value="$50-100K"> |
| $$50-100K </option><br> |
| <option jwcid="@<a href="wml.Option.html">wml:Option</a>" value="Over $100K"> |
| Over $$100K </option><br> |
| </select><br> |
| </p><br> |
| </card><br> |
| </p> |
| <p>Specification</p> |
| <p> <page-specification class="org.apache.tapestry.junit.mock.wml.Select"> |
| <br> |
| <property-specification name="income" type="java.lang.String" |
| persistent="yes"/><br> |
| </page-specification><br> |
| </p> |
| </td> |
| </tr> |
| </table> |
| </td> |
| </tr> |
| <tr> |
| <td colspan="3"> |
| <hr> |
| </td> |
| </tr> |
| <tr> |
| <td align="left"><a href="wml.PropertySelection.html"><img alt="PropertySelection" src="common-images/prev.png"></a></td> |
| <td align="middle"><a href="index.html"><img alt="Component Index" src="common-images/home.png" ></a></td> |
| <td align="right"><a href="wml.SelectionField.html"><img alt="SelectionField" src="common-images/next.png"></a></td> |
| </tr> |
| </table> |
| </body> |
| </html> |