struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kothari, Kailash" <>
Subject Inheritance within form beans
Date Tue, 02 Oct 2007 00:31:22 GMT

I have an interesting Struts design requirement and Im a little lost,
would really appreciate help !

I have multiple form beans in my application and a lot of them share

Instead of duplicating the common attributes in each form bean, I am
opting for an more elegant approach, i.e. encapsulating the common data
in a parent form bean and then building child form beans that extend the

So that's fine.

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.

Of course I could copy that data manually, but the parent form bean is a
legacy class and has grown beyond proportion - hundreds of attributes
and contained objects.

Thanks !

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message