Hmm not sure why you want to do that..
If you are asking as to how step 2 takes place then this is how I do it..
In my definition of the form bean I have my value object as a parameter with the 
corresponding get and set methods. In my get method for the value object, I copy the 
form bean properties to the value object and in the set method, I copy the properties 
from the value object to the form bean. So in your action class that initialises the 
form bean, set your value object in the form bean. This should now give you the form 
bean that is associated with the page that user needs to modify.

HTH,
V

-----Original Message-----
From: Arnaud Gadby [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 02, 2002 2:52 PM
To: 'Struts Users Mailing List'
Subject: RE : Initializing formBeans


The next question is : how is it possible to access the session from the
FormBean constructor ?

-------------------------------------------
Arnaud GADBY                       

EILEO
9ter rue Carnot
94270 Le Kremlin Bicetre
FRANCE

-----Message d'origine-----
De : Vikram Goyal01 [mailto:[EMAIL PROTECTED]] 
Envoyé : jeudi 2 mai 2002 11:13
À : Struts Users Mailing List
Objet : RE: Initializing formBeans

1. Create a value object that encapsulates the data once the user logs
in.
2. Create a form bean that captures this data from the value object.
3. Modify struts config to assocaite this form with the action on the
modify page.

I think thats it... 



-----Original Message-----
From: Arnaud Gadby [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 02, 2002 12:55 PM
To: [EMAIL PROTECTED]
Subject: Initializing formBeans


Hi !

I'm a newbie with struts and I cannot find the right way to do a simple
thing like this :

I would like to create an HTML form to modify the user information I
recorded in my database.

I didn't find how to initialize my form on a user-basis (the userId is
stored in the session).

Thanks

Arnaud

-------------------------------------------
Arnaud GADBY                       

EILEO
9ter rue Carnot
94270 Le Kremlin Bicetre
FRANCE



--
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]>


--
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