Good to know - thanks! Matt
> -----Original Message----- > From: Cedric Dumoulin [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, February 19, 2003 9:23 AM > To: Struts Users Mailing List > Subject: Re: TilesAction and Controller > > > > Hi, > > If you don't need the struts properties, use a Controller > class and > controllerClass. > If you need the struts preprocessing or the struts > properties in your > controller, use a TilesAction and controllerUrl. > A TilesAction is a regular Struts action which can be > called through > the servlet mechanism, and so can be catch and preprocessed > by Struts. > In addition, a TilesAction should be declare in the struts > config file, > and called throw its URL. > > Cedric > > Raible, Matt wrote: > > >For Struts 1.1b3 and the soon to be released Struts 1.1 RC1, do you > >recommend using TilesAction over the Controller interface > >(http://tinyurl.com/62px) for tiles-specific controllers? I > just wrote > >about using the Controller interface for a Wrox Chapter last > night, and I'd > >hate to be out of date ;-) > > > >Thanks, > > > >Matt > > > > > > > >>-----Original Message----- > >>From: BaTien Duong [mailto:[EMAIL PROTECTED]] > >>Sent: Wednesday, February 19, 2003 8:25 AM > >>To: Struts Users Mailing List > >>Subject: Re: TilesAction and Controller > >> > >> > >>Thanks Cedric and this great developer community. > >> > >>BaTien > >>-------------------------------- > >>----- Original Message ----- > >>From: "Cedric Dumoulin" <[EMAIL PROTECTED]> > >>To: "Struts Users Mailing List" <[EMAIL PROTECTED]> > >>Sent: Wednesday, February 19, 2003 6:25 AM > >>Subject: Re: TilesAction and Controller > >> > >> > >> > >> > >>>BaTien Duong wrote: > >>> > >>> > >>> > >>>>I found the following in tilesAdvancedFeatures: > >>>> > >>>>If you use a class name as controller, it should extend one of the > >>>> > >>>> > >>following > >> > >> > >>>>base classes or interfaces: > >>>>org.apache.struts.action.Action (wrapper > >>>>org.apache.struts.action.StrutsActionControllerWrapper is > >>>> > >>>> > >>used) If you > >> > >> > >>>>provide a Struts Action subclass, it will be wrapped with > >>>> > >>>> > >>the appropriate > >> > >> > >>>>class, and > >>>>Struts' perform method will be called, but the "mapping" > and "form" > >>>>attributes will be null. > >>>> > >>>>Does this means that to pass the error via mapping I must use > >>>> > >>>> > >>controlerUrl > >> > >> > >>>>in <tiles:insert> tag ? Where is > >>>>org.apache.struts.action.StrutsActionControllerWrapper? I > >>>> > >>>> > >>cannot find it > >>in > >> > >> > >>>>src of struts 1.1-b3. > >>>> > >>>> > >>>> > >>> It appears that StrutsActionControllerWrapper is now called > >>>ActionController. > >>> > >>> If you use a Struts action as Tiles controller CLASS, the struts > >>>parameters aren't initialized, so you can't use it. I think > >>> > >>> > >>you can't > >> > >> > >>>pass error via mapping in this way. > >>> But, if you use a struts action URL as controller, the action is > >>>called throw the struts mechanism, and properly > initialized. You can > >>>extends the o.a.s.tiles.actions.TilesAction class and > >>> > >>> > >>overload execute( > >> > >> > >>>ComponentContext ...) to get the context. > >>> > >>> Cedric > >>> > >>> > >>> > >>>>Thanks > >>>> > >>>>----- Original Message ----- > >>>>From: "BaTien Duong" <[EMAIL PROTECTED]> > >>>>To: "Struts Users Mailing List" <[EMAIL PROTECTED]> > >>>>Sent: Monday, February 17, 2003 10:22 AM > >>>>Subject: Fw: TilesAction and Controller > >>>> > >>>> > >>>> > >>>> > >>>> > >>>> > >>>>>Question: Just check to make sure that the controllerClass (NOT > >>>>>controllerUrl) used in <tiles:insert> tag can extends > >>>>> > >>>>> > >>TilesAction (and > >>NOT > >> > >> > >>>>>implements Controller)? > >>>>> > >>>>> > >>>>> > >>>>> > >>>>> > >>>>>>Using TilesAction as a controller, I can pass the > >>>>>> > >>>>>> > >>generated error to > >>the > >> > >> > >>>>>>input page via standard Struts process: > >>>>>> if (!errors.empty()) { > >>>>>> saveErrors(request, errors); > >>>>>> return (new ActionForward(mapping.getInput(); > >>>>>> } > >>>>>> > >>>>>>Question: How can I achieve the same thing with Tiles > Controller? > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>(assuming > >>>>> > >>>>> > >>>>> > >>>>> > >>>>>>that I can have currentURL and RequestURL as Tiles > >>>>>> > >>>>>> > >>attributes in the > >> > >> > >>>>>> > >>>>>> > >>>>>request > >>>>> > >>>>> > >>>>> > >>>>> > >>>>>>scope). > >>>>>> > >>>>>>Cedric and/or someone may save me time to navigate from > >>>>>> > >>>>>> > >>ServletContext > >> > >> > >>>>>>passed into the Controller perform(...) method. > >>>>>> > >>>>>>Thanks > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>> > >>>> > >>>----------------------------------------------------------- > ---------- > >>> > >>> > >>>>To unsubscribe, e-mail: [EMAIL PROTECTED] > >>>>For additional commands, e-mail: > >>>> > >>>> > >>[EMAIL PROTECTED] > >> > >> > >>>> > >>>> > >>>> > >>>> > >>> > >>> > >>> > >>------------------------------------------------------------ > --------- > >> > >> > >>>To unsubscribe, e-mail: [EMAIL PROTECTED] > >>>For additional commands, e-mail: > [EMAIL PROTECTED] > >>> > >>> > >>> > >>------------------------------------------------------------ > --------- > >>To unsubscribe, e-mail: [EMAIL PROTECTED] > >>For additional commands, e-mail: [EMAIL PROTECTED] > >> > >> > >> > > > > > >--------------------------------------------------------------------- > >To unsubscribe, e-mail: [EMAIL PROTECTED] > >For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]