struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rick Reumann" <rick.reum...@gmail.com>
Subject Re: Inheritance within form beans
Date Tue, 02 Oct 2007 00:57:27 GMT
On 10/1/07, Kothari, Kailash <Kailash_Kothari@intuit.com> wrote:
 > What I also need is that, when a child form bean is instantiated by
> Struts, I want Struts to check if there is an instance of the parent
> form bean in the session and if so, pre populate that data from the
> parent to the child form bean.

Assuming Struts 1.x...

I can't recall the exact syntax of how the forms are stored in the
session but I know it invovles the  ActionMapping name in the
StrutsConfig, so you could try:

(YourForm)session.getAttribute(yourActionMappingName);

(remember you could have different session scoped instances of the
same type of ActionForm in the session - the key is the action mapping
name they are tied to.)

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


Mime
View raw message