BaTien Duong wrote:
It appears that StrutsActionControllerWrapper is now called ActionController.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.
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(assuming
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?
that I can have currentURL and RequestURL as Tiles attributes in therequest
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]