Thomas Thomas wrote:
Hi,

If I fill my form with, for example, "xyz" as login,
and if there is an error,
"xyz" will stay in the textfield,
(for some reason, as additional question if u can say me why that happen,
would be great)

It's a function of the design of Struts. When you form is submitted, Struts automatically populates your form bean. When you forward back to your input page, the values in the form bean are used to populate the form fields. Hence, the user's input is preserved and redisplayed.

That's perfect, BUT

I don't have this behaviour with my  <html:select>  tags for the day and
month of his birth date.

For example if user enters day 31 and month February (which is invalid) and
submits,
there will appear 1 January and an error text under it:
date invalid (that can lead to confusion since 1 January is valid) => the
day 31 and month February is lost,
so I have not the same behavior than with my login => if there is error ,
the login he entered is displayed again.
I hope I was clear.

It's not clear to me what's going on with the date fields. What does your form bean look like? How's it configured in struts-config.xml? Assuming you have two form bean properties (one for day and one for month), they should retain the values entered unless you are doing something to change them.

Try posting the relevant parts of your code and configuration if you still need help with this.

L.


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

Reply via email to