...
Code Block |
---|
|
<s:form method="post">
<s:textfield label="Name" name="name"/>
<s:textfield label="Age" name="age"/>
<s:textfield label="Favorite color" name="answer"/>
<s:submit/>
</s:form>
|
using the default XHTML team, renders like this
Code Block |
---|
| HTML |
---|
| HTML |
---|
title | Generated HTML fragment |
---|
|
<form id="quizBasic" name="quizBasic" onsubmit="return true;"
action="/struts2-showcase/validation/quizBasic.action" method="post">
<table class="wwFormTable">
<tr>
<td class="tdLabel"><label for="quizBasic_name"
>
<label for="quizBasic_name" class="label">Name:</label></td>label>
<td><input type="text" name="name" value=""
id="quizBasic_name" /><</td>
</tr>
<td>
<tr>
<input type="text" <td classname="name" value="tdLabel"><label forid="quizBasic_agename" />
class="label">Age:</label></td>
</tr>
<td><input type="text" name="age" value="0"
<tr>
<td idclass="quizBasic_age" /></td>tdLabel">
</tr>
<label <tr>for="quizBasic_age" class="label">Age:</label>
<td class="tdLabel"><label for="quizBasic_answer"</td>
<td>
class="label">Favorite color:</label></td>
<td><input<input type="text" name="answerage" value="0"
id="quizBasic_age" />
id="quizBasic_answer" /></</td>
</tr>
<tr>
<td colspan="2">
<div align="right"><input>
<input type="submit" id="quizBasic_0"
value="Submit" />
value="Submit" />< </div>
</td>
</tr>
</table>
</form>
|
...