...
For example, a form like this \[TODO] Wiki Markup
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<s:form method="post">
<s:textfield label="Name" name="name"/>
<s:textfield label="Age" name="age"/>
<s:submit/>
</s:form>
|
using the default XHTML team, renders like this \[TODO] Wiki Markup
Code Block | ||||
---|---|---|---|---|
| ||||
<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" class="label">Name:</label>
</td>
<td>
<input type="text" name="name" value="" id="quizBasic_name" />
</td>
</tr>
<tr>
<td class="tdLabel">
<label for="quizBasic_age" class="label">Age:</label>
</td>
<td>
<input type="text" name="age" value="0" id="quizBasic_age" />
</td>
</tr>
<tr>
<td colspan="2">
<div align="right">
<input type="submit" id="quizBasic_0" value="Submit" />
</div>
</td>
</tr>
</table>
</form>
|
Note that the Struts 2 tags include new attributes, like "label". The XHTML (and AJAX) themes will automatically inject a label tag into the form.
...