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]

Reply via email to