struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Don Brown (JIRA)" <j...@apache.org>
Subject [jira] Updated: (WW-1888) Forms generate invalid xhtml using the xhtml template
Date Fri, 02 May 2008 06:47:06 GMT

     [ https://issues.apache.org/struts/browse/WW-1888?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Don Brown updated WW-1888:
--------------------------

    Fix Version/s:     (was: 2.1.3)
                   Future

>From very painful personal experience, I can tell you we won't be removing the name attribute
from the form.  I did that back in Struts 1 and all heck broke loose.  The "xhtml" theme is
certainly misnamed, as it is more about generating more scaffolding form elements than xhtml
compliance. 

> Forms generate invalid xhtml using the xhtml template
> -----------------------------------------------------
>
>                 Key: WW-1888
>                 URL: https://issues.apache.org/struts/browse/WW-1888
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Plugin - Tags
>    Affects Versions: 2.0.6
>            Reporter: Niko Korhonen
>            Assignee: Musachy Barroso
>            Priority: Minor
>             Fix For: Future
>
>
> 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
such:
> <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.


Mime
View raw message