struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Musachy Barroso (JIRA)" <>
Subject [jira] Closed: (WW-1888) Forms generate invalid xhtml using the xhtml template
Date Mon, 01 Dec 2008 22:49:37 GMT


Musachy Barroso closed WW-1888.

       Resolution: Fixed
    Fix Version/s:     (was: Future)

This was partially fixed, see comments for details

> Forms generate invalid xhtml using the xhtml template
> -----------------------------------------------------
>                 Key: WW-1888
>                 URL:
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Plugin - Tags
>    Affects Versions: 2.0.6
>            Reporter: Niko Korhonen
>            Assignee: Musachy Barroso
>            Priority: Minor
>             Fix For: 2.1.3
> Struts 2 forms with the XHTML template seem to have some XHTML compliancy problems.
> The <s:submit> tag inside <s:form> produces invalid XHTML. The submit tag
produces code like this:
> <td colspan="2">
>   <div align="right"><input type="submit" id="SettingsSubmit_0" value="Submit"/></div>
> </td>
> The problem is that the "align" attribute of the div tag is deprecated since HTML 4.01
and is not valid XHTML. This can be fixed by including the align attribute to the td tag as
> <td colspan="2" align="right">
> Using validation in forms produces invalid XHTML code. The required attribute "type"
not specified in the produced script tag:
> <script src="/../struts/xhtml/validation.js"></script>
> This can be corrected by including the type attribute as such:
> <script src="/../struts/xhtml/validation.js" type="text/javascript"></script>
> The form tag generates this code:
> <form namespace="/pages/webui" id="SettingsSubmit" name="SettingsSubmit" onsubmit="return
validateForm_SettingsSubmit();" action="/../SettingsSubmit.jspa" method="POST">
> There are some problems here:
> 1. There are no "name" attribute in XHTML. This can be fixed by removing it completely
and only using "id".
> 2. There is no "namespace" attribute in XHTML. I don't know how this can be fixed. I
use an edited template that does not produce the "namespace" attribute at all.
> 3. "POST" should be written in lowercase, i.e. "post".
> All of these issues can be fixed by editing the XHTML template files. I can provide my
own modifications if needed.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message