| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
| <html> |
| <head> |
| <title>wml:Setvar</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.SelectionField.html"><img alt="SelectionField" 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.Timer.html"><img alt="Timer" 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>Setvar</b></font></td> |
| </tr> |
| <tr> |
| <td> <A href="../api/org/apache/tapestry/wml/Setvar.html">org.apache.tapestry.wml.Setvar</a> |
| </td> |
| </tr> |
| </table> |
| </td> |
| <td> |
| <table align="right" valign="middle" bgcolor="#c0c0c0" cellpadding="8"> |
| <tr> |
| <td>Non Visual Component</td> |
| </tr> |
| </table> |
| </td> |
| </tr> |
| <tr valign="center"> |
| <td colspan="2"> </td> |
| </tr> |
| <tr> |
| <td colspan="2"> <b>Description</b> <br> |
| The wml:Setvar component specifies the variable to set in the current |
| browser context as a side effect of executing a task such as <go>, |
| <prev>, or <refresh>. </td> |
| </tr> |
| <tr> |
| <td colspan="2"> <b>See Also</b> <br> |
| <A href="wml.Go.html">wml:Go</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>name</td> |
| <td>String</td> |
| <td>in</td> |
| <td>yes</td> |
| <td> </td> |
| <td>The name attribute specifies a WML variable name.</td> |
| </tr> |
| <tr> |
| <td>value</td> |
| <td>String</td> |
| <td>custom</td> |
| <td>yes</td> |
| <td> </td> |
| <td>Bind value to the variable that should recieve the user input |
| string.</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>Template</p> |
| <p> <?xml version="1.0"?><br> |
| <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.2//EN"<br> |
| "http://www.wapforum.org/DTD/wml12.dtd"></p> |
| <p><wml></p> |
| <p><card id="Hello" title="Hello"><br> |
| <onevent type="onenterforward"><br> |
| <refresh><br> |
| <setvar jwcid="@<a href="wml.Setvar.html">wml:Setvar</a>" |
| name="username" value="ognl:username"/><br> |
| </refresh><br> |
| </onevent><br> |
| <p><br> |
| What is your name?<br> |
| <input jwcid="userInput@<a href="wml.Input.html">wml:Input</a>" |
| name="username" value="ognl:username"/><br> |
| </p><br> |
| <do type="accept" label="Accept"><br> |
| <go jwcid="go@<a href="wml.Go.html">wml:Go</a>" |
| stateful="ognl:false" listener="ognl:listeners.submit"><br> |
| <postfield jwcid="username@<a href="wml.Postfield.html">wml:Postfield</a>" |
| name="ognl:components.userInput.name" value="ognl:username"/><br> |
| </go><br> |
| </do><br> |
| </card><br><br> |
| </wml> </p> |
| </td> |
| </tr> |
| <tr> |
| <td colspan="2"> </td> |
| </tr> |
| </table> |
| </td> |
| </tr> |
| <tr> |
| <td colspan="3"> |
| <hr> |
| </td> |
| </tr> |
| <tr> |
| <td align="left"><a href="wml.SelectionField.html"><img alt="SelectionField" 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.Timer.html"><img alt="Timer" src="common-images/next.png"></a></td> |
| </tr> |
| </table> |
| </body> |
| </html> |