You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Ned Seagoon <th...@hotmail.com> on 2001/02/21 11:33:58 UTC

RE: help! confused over forms and errors and oooh, other stuff :- )

Hi Mark, thanks for the reply

>If I understand your problem correctly, then I don't think you have missed
>anything. I would be interested to know how you would solve the problem in 
>a
>non-struts environment. Unless your item details object is in session 
>scope,
>then it will not survive across two requests, which is the root of the
>problem.

Yeah, the other problem being is that if the details object is in the 
session and the user has two windows open, then all hell will break loose!

>I would persevere with your approach of putting the details object in the
>form bean.
>Have you tried using hidden form variables. E.g.
>
>     <html:hidden property="item.name"/>
>     <html:hidden property="item.manufacturer"/>
>     <html:hidden property="item.price"/>
>     <html:hidden property="item.info"/>

Yeah, I didn't think of doing that. The only problem with that is of 
maintenance. If I add another field to the details object, then every form 
has to change. It's bad enough with forms as it is, I'm thinking about 
modifing the form tag to auto generate hidden fields for any properties of a 
form not accessed explicitally.

Cheers
Ned
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.