struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Hill" <andrew.david.h...@gridnode.com>
Subject RE: About prepopulating a form...
Date Wed, 18 Jun 2003 08:25:09 GMT
Yep. If you dont specify it in the mapping then struts wont know to
create/retrieve the form...
Its quite common to have two actions associated with a form - one for
preparing the form for display and the other for handling the submitted form
after display. (Often the two roles will be combined into one class by using
a DispatchAction)


-----Original Message-----
From: Nadja Senoucci [mailto:senoucci@21st.de]
Sent: Wednesday, 18 June 2003 16:19
To: andrew.david.hill@gridnode.com
Subject: RE: About prepopulating a form...


> <snip>
> The problem I have with this is that in the action
> class the form has not yet been initialized (since it is before form
> gets displayed and submitted, of course) and therefore is null.
> </snip>
>
> Shouldnt be.
>
> The request processor will have instantiated your ActionForm bean for
> you based on whats in the action mapping and it will be provided to
> your actions execute method. Check what you have in struts-config.xml
> for that action.

Well, the action I am using here gets called when someone presses on a
certain link. It is not association with and form... My form bean actually
has another action class that is associated with it and handles what happens
when the form gets submitted.

So, I guess, I have to tell this action class (the one for my link action)
to that this form belongs to it, as well?

Greetings,
Nadja



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message