Re: tokens creating a field in my forms

2003-11-21 Thread Adam Hardy
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: tokens creating a field in my forms

2003-11-21 Thread Raphaël di Cicco
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 [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
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: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


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



tokens creating a field in my forms

2003-11-20 Thread Raphaël di Cicco
Hi,

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?

Raphaël di Cicco
Atos Origin - Ingénieur de réalisation
Les Miroirs 2ème étage - salle 208
e-mail : [EMAIL PROTECTED]
tél : 01-55-91-24-53