Another issue with the id and name atttributes on the form tags is the
use of characters like "/" and "!". I find that these characters don't
work with a JavaScript like

onLoad="self.focus();document.Register_save.username.focus()"

With wildcard support, it will be natural for people to want to use
names like "Register/save" or "Register!save" as regular action names.
When generating tags in Struts 2, the forms should replace other
special characters with "_", so as to work with JavaScript.

We probably don't need to worry about this in WW2, since it doesn't
have wildcard support, but I should work up a patch for Struts 2.

-Ted.


On 8/14/06, tm jee <[EMAIL PROTECTED]> wrote:
I've made the changes to both WebWork cvs head and Struts2 svn head.

With this change, the submit button id (if can't be generated when name is not 
given, eg. when an action and / or method attribute is used) will be a running 
sequence number starting from 0.

eg.

<ww:form id="myFormId">
     .....
     <ww:submit action="execute1" value="Execute 1" />
    <ww:submit action="execute2" value="Execute 2" />
</ww:form>

The id for both submit button will be 'myFormId_0' and 'myFormId_1' 
respectively, unique to within the form they are contained in. The Submit 
should be used within a form for it to be able to have a unique id .


rgds






----- Original Message ----
From: tm jee <[EMAIL PROTECTED]>
To: Struts Developers List <dev@struts.apache.org>
Sent: Monday, 14 August, 2006 10:19:00 AM
Subject: Re: Random IDs for form elements - Why?

> Any chance you can make the change in WebWork 2.2.3 too before the release?
Yup, definitely. :-)

rgds

----- Original Message ----
From: Patrick Lightbody <[EMAIL PROTECTED]>
To: dev@struts.apache.org
Sent: Monday, 14 August, 2006 8:12:48 AM
Subject: Re: Random IDs for form elements - Why?

We should give them unique sequence IDs for each form. We should never 
encourage random numbers - that makes things much harder to automate for 
testing, which has always been a strong point for WebWork.

Any chance you can make the change in WebWork 2.2.3 too before the release?
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=40158&messageID=79909#79909


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]













--
HTH, Ted.
* http://www.husted.com/struts/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to