History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: WW-599
Type: Improvement Improvement
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Mark Woon
Reporter: Matt Raible
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
WebWork

Form tags - XHTML improvements

Created: 21/Jul/04 12:32 PM   Updated: 30/Jul/04 01:23 AM
Component/s: Views
Affects Version/s: 2.1
Fix Version/s: 2.1.1

File Attachments: 1. File patch.diff (6 kb)



 Description  « Hide
I am using the following JSP tag to render a <tr> and my label/text
field.

<ww:textfield label="getText('user.firstName')"
        name="'user.firstName'" value="user.firstName"/>

This results in the following XHTML:

<tr>
             <td align="right" valign="top">

<span class="label">

First Name:
                     </span>
         </td>

<td>

<input type="text"
                                    name="user.firstName"
/>
   </td>
</tr>

I know you can't do much about the spacing b/c these tags are backed
by Velocity templates. However, it would be more XHTML compliant (IMO) if there were no "align" attributes, a <th> was used, and a <label> for the <span>. For example:

<tr>
<th><label>First Name:</label></th>

Other improvements I'd like to see:

1. errors are displayed in a <span> after the <input>

2. <table> comes after <form> in <ww:form> tag.

3. <script> -> <script type="text/javascript">

3. form's cssStyle and cssClass get applied to <table> rather than <form>. They aren't applied to form right now anyway.

I'll attach a patch that fixes all of the above.

 All   Comments   Change History      Sort Order:
Matt Raible - [21/Jul/04 12:33 PM ]
Patch for XHTML improvements.

Mark Woon - [30/Jul/04 01:23 AM ]
#0 and #1 will be fixed in the next major release. Fixing them now wouldn't allow the next release to be an drop-in replacement.

#2, #3 and #4 have been addressed. For #4, there's now a wwFormTable class to allow you to customize the table. CSS styling is applied to the form, so you can customize wwFormTable to the form if you need to.