struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Raphaël di Cicco <raphael.dici...@atosorigin.com>
Subject Re: tokens creating a field in my forms
Date Fri, 21 Nov 2003 18:58:10 GMT
OK, I was thinking the same thing.
Referring to fields by id is better but less convenient when all your fields
are accessed by maps therefore their names is something like
"formProp(Foo.foo.fooo)".


----- Original Message ----- 
From: "Adam Hardy" <ahardy.struts@cyberspaceroad.com>
To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
Sent: Friday, November 21, 2003 10:48 AM
Subject: Re: tokens creating a field in my forms


> On 11/20/2003 11:44 AM Raphaël di Cicco wrote:
> > I understand how tokens work. I'm currently modifying my application to
use tokens every time possible. The thing is that I'm doing validation with
javascript on my JSPs, and very often checking form elements with the index.
> > When using token, struts creates a form element at index 0, so every
validation I do is not working anymore since everything is reindexed by 1.
> >
> > I would like the struts form to place the token at the end of the form.
Is that possible?
>
> Hi Raphael,
> without looking at the source code I can't definitely say that it is
> impossible, but it is highly unlikely.
>
> Technically speaking you would be better off referring to your fields in
> javascript by id, rather than by index, since this situation with tokens
> is not the only one that will give you this problem. However I realise
> this will not be helpful to you if you have already finished the
> javascript code! Sorry :(
>
> Adam
> -- 
> struts 1.1 + tomcat 5.0.12 + java 1.4.2
> Linux 2.4.20 RH9
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message