Subject: Re: Inheritance within form beans 2007-10-03 - By Rick Reumann
Back On 10/2/07, Kothari, Kailash <Kailash_Kothari@(protected)> wrote: > Thaks Rick. > > This will give me an instance of the parent bean OR the child bean. > > What I need is a child bean pre populated with data from the parent > bean.
Ok, so just get ParentBean and then populate your subclassed bean...
public SomActionMethod() {
BaseFormBean beanFromSession = (BaseFormBean)session.getAttribute(mappingName);
CurrentFormSubClass myForm = (CurrentFormSubClass)form;
BeanUtils.porpulate( myForm, beanFromSession );
//done, now your myForm is populated with the one from the session }
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------ To unsubscribe, e-mail: user-unsubscribe@(protected) For additional commands, e-mail: user-help@(protected)
|
|