| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
| <!-- $Id$ --> |
| <html> |
| <head> |
| <title>TextField</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="TextArea.html"><IMG alt=TextArea 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="Upload.html"><IMG alt=Upload 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>TextField</b></font></td> |
| </tr> |
| <tr> |
| <td> |
| <A href="../api/org/apache/tapestry/form/TextField.html"> |
| org.apache.tapestry.form.TextField</a> |
| </td> |
| </tr> |
| </table> |
| </td> |
| <td> |
| <table align="right" valign="middle" bgcolor="#c0c0c0" cellspacing="8"> |
| <tr> |
| <td> |
| Text Field <input value="some text"> |
| </td> |
| </tr> |
| </table> |
| </td> |
| </tr> |
| |
| <tr valign="center"> |
| <td colspan="2"> </td> |
| </tr> |
| |
| <tr> |
| <td colspan="2"> |
| <b>Description</b> |
| <br> |
| Used to implement a HTML text form element, either a <input type="text"> or |
| <input type="password">. This component must be wrapped by a |
| <A href="Form.html">Form</a> |
| . |
| </td> |
| </tr> |
| |
| <tr> |
| <td colspan="2"> |
| <b>See Also</b> |
| <br> |
| <A href="Form.html">Form</a>, |
| <a href="TextArea.html">TextArea</a> |
| <A href="ValidField.html">ValidField</a> |
| </td> |
| </tr><!-- Parameters --> |
| <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>value</td> |
| <td>String</td> |
| <td>in-out</td> |
| <td>yes</td> |
| <td> </td> |
| <td>The text inside the text field. The binding is only updated |
| when the the component is not disabled. |
| Corresponds to the "value" HTML attribute. |
| </td> |
| </tr> |
| <tr> |
| <td>hidden</td> |
| <td>boolean</td> |
| <td>in</td> |
| <td>no</td> |
| <td>false</td> |
| <td>If true, then the text field is written as a |
| <input type="password"> form element. |
| </td> |
| </tr> |
| <tr> |
| <td>disabled</td> |
| <td>boolean</td> |
| <td>in</td> |
| <td>no</td> |
| <td>false</td> |
| <td>Controls whether the text field is active or not. If disabled, then |
| any value that comes up when the form is submitted is ignored. |
| Corresponds to the "disabled" HTML attribute. |
| </td> |
| </tr> |
| </table><BR>Body: |
| <STRONG>removed</STRONG><BR>Informal parameters: |
| <STRONG>allowed</STRONG> |
| <br> |
| Reserved parameters: "type", "value" |
| </td> |
| </tr> |
| |
| <tr> |
| <td colspan="2"> |
| <b>Examples</b> |
| <p> |
| The TextField component is used here to provide a plain text and a password |
| form input field. |
| <p> |
| |
| <table class="examples" cellspacing="8" valign="middle"> |
| <tr> |
| <td>Id</td> |
| <td><input size="8" value="1245"></td> |
| <td>Password</td> |
| <td><input size="8" type="password" value="password"></td> |
| </tr> |
| <tr> |
| <td colspan="4" align="right"><input type="submit" value="Submit"></td> |
| </tr> |
| </table> |
| |
| <pre> |
| <form jwcid="@<a href="Form.html">Form</a>" listener="ognl:listeners.formSubmit"> |
| <table valign="middle"> |
| <tr> |
| <td>Id</td> |
| <td><span jwcid="inputId<span class="jwcid">@<a href="TextField.html">TextField</a></span>" value="ognl:visit.id" size="8"/></td> |
| <td>Password</td> |
| <td><span jwcid="inputPassword<span class="jwcid">@<a href="TextField.html">TextField</a></span>" value="ognl:visit.password" hidden="ognl:true" size="8"/></td> |
| </tr> |
| <tr> |
| <td colspan="4" align="right"><input type="submit" value="Submit"/></td> |
| </tr> |
| </table> |
| </form> |
| |
| |
| public class PasswordPage extends BasePage { |
| public void formSubmit(IRequestCycle requestCycle) { |
| // Process the form submission. |
| } |
| } |
| |
| public class Visit implements Serializable { |
| private String id; |
| private String password; |
| |
| public String getId() { return id; } |
| |
| public void setId(String value) { |
| id = value; |
| } |
| |
| public String getPassword() { return password; } |
| |
| public void setPassword(String value) { |
| password = value; |
| } |
| } |
| </pre> |
| |
| </td></tr></table> |
| </td></tr> |
| <tr> |
| <td colspan="3"><hr></td> |
| </tr> |
| <tr> |
| <td align="left"><A href="TextArea.html"><IMG alt=TextArea 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="Upload.html"><IMG alt=Upload src="common-images/next.png"></a></td> |
| </tr> |
| </table> |
| |
| </body> |
| </html> |