In the refering action that puts your object in the session, populate the form..

ActionForm theForm = (ActionForm) form;

Object yourObj = ...

String fooStr = yourObj.getSomething();

//for dynaforms
theForm.set("foo",fooStr);

or

//the method in your action form.
theForm.setFoo(fooStr);

//jsp

<html:text property="foo" />

there might be a more ninja way of doing this, but this is what i tend to do...

hope this helps

mark

On Friday, Jun 6, 2003, at 11:24 Europe/London, Nadja Senoucci wrote:

Hello,

I have a more Java than Struts related question but maybe you could answer
it as well? Okay, so I use a link to get to a form. In the ActionForward
that gets executed when the link is used, I load an object and stuff it into
the session. In my form I then want the fields tp be prepopulated with the
data from the object in the session. As I understand it that happens via the
get-methods of the ActionForm class for this form. My question is: How do I
read the object from the session before my get-methods are called? As I
understood so far, I need the HttpServletRequest object for that - which I
only have access to in the validate method (which doesn't help, since that's
already too late)... I know there must a simple way to do this, I just don't
know how...


Greetings,
Nadja

(P.S.: Dirk, I think, I accidently send my Thank-you-reply for the help with
my stupid parsing problem to your email address. I just hit reply and didn't
look at the address the email would be send to... Sorry about that.)





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



Reply via email to