Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Struts 2 »

How to reduce redundant form code in JSPs?

uni

2007-01-02

Replies:

Hi,

My application consists of several forms, all following a common style. Each
form is rendered using a table. This results in the following code for each
field:

<tr>
<td> <bean:message key="field.xxx"> </td>
<td>
<html:text property="xxx" readonly="${readonly}" /><br>
<html:errors property="xxx" /><br>
</td>
</tr>

The only variations are the name of the field ("xxx" in the snippet) as well as
the field type (in most cases html:text, sometimes html:checkbox). Is there a
way to reduce this redundant code?

Thanks for your help,

Thorsten


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

©2008 junlu.com - Jax Systems, LLC, U.S.A.