You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by ai...@ketura.ardom.co.il on 2003/10/03 23:18:58 UTC

[SCAFFOLD] ProcessAction - Merging properties from a session obje ct

Hi,

Looking at the ProcessAction code, it turns out that in order to get a
session object to the execute() method of a ProcessBean, the following
conditions must be met:

1) A form is submitted
2) That form is an instance of BaseForm (and not DynaActionForm or other
type for that matter)
3) The bean is exposed in session under the name "userProfile"

Otherwise, that session object will not be available to the ProcessBean.

Is there another "build in" method to pass a session object into the
ProcessBean (other than subclassing ProcessAction :-( ?

Thanks,
Noam




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


Re: [SCAFFOLD] ProcessAction - Merging properties from a session obje ct

Posted by Ted Husted <hu...@apache.org>.
There's nothing wrong with subclassing ProcessAction. That whole 
heirarchy is designed to be subclassed. In fact, there's nothing wrong 
with slicing and dicing all the Scaffold stuff until it meets your 
needs. One of the lessons of Scaffold is how far you can take your own 
design and still have it based in Struts. Don't think of it as a 
blackbox, think of it as a starting point for your own library, that 
might do less, or might do more, as your needs dictate.

-Ted.

aies22@ardom.ardom.co.il wrote:
> Hi,
> 
> Looking at the ProcessAction code, it turns out that in order to get a
> session object to the execute() method of a ProcessBean, the following
> conditions must be met:
> 
> 1) A form is submitted
> 2) That form is an instance of BaseForm (and not DynaActionForm or other
> type for that matter)
> 3) The bean is exposed in session under the name "userProfile"
> 
> Otherwise, that session object will not be available to the ProcessBean.
> 
> Is there another "build in" method to pass a session object into the
> ProcessBean (other than subclassing ProcessAction :-( ?
> 
> Thanks,
> Noam
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
> 
> 

-- 
Ted Husted,
   Junit in Action  - <http://www.manning.com/massol/>,
   Struts in Action - <http://husted.com/struts/book.html>,
   JSP Site Design  - <http://www.amazon.com/exec/obidos/ISBN=1861005512>.

"Get Ready, We're Moving Out!!" - <http://www.clark04.com>



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