Yes, I found the discussion in the users list and will now change my behaviour :-)

/ Tomas


----- Original Message ----- 
From: "Craig R. McClanahan" <[EMAIL PROTECTED]>
To: "Struts Developers List" <[EMAIL PROTECTED]>
Sent: Tuesday, June 18, 2002 5:53 PM
Subject: Re: Display request parameter instead of bean property?


> 
> 
> On Tue, 18 Jun 2002, Tomas Viberg wrote:
> 
> > Date: Tue, 18 Jun 2002 13:15:20 +0200
> > From: Tomas Viberg <[EMAIL PROTECTED]>
> > Reply-To: Struts Developers List <[EMAIL PROTECTED]>
> > To: [EMAIL PROTECTED]
> > Subject: Display request parameter instead of bean property?
> >
> > Hello,
> >
> > I've been thinking... Wouldn't it be a good idea that some form fields
> > (text, textarea, etc.), could display the value of the request parameter
> > instead of the bean property under some circumstances. One example when
> > this would be nice is when the conversion of the input value to the
> > target type fails. For instance, if I enter '1.0' in a form field mapped
> > to a bean property of type int, the field contains '0' when it is
> > redisplayed. In this case, I think it would be better if it displayed
> > the (invalid) value entered by the user.
> >
> 
> That is why your form bean properties should generally be strings, and you
> should do the conversion to int later (creating an error message if
> conversion fails).
> 
> > Anybody agree/disagree?
> >
> > Regards,
> > Tomas Viberg <[EMAIL PROTECTED]>
> >
> 
> Craig
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
> 


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

Reply via email to