When actions are chained, and the last action in the chain does not
contain a corresponding view, the 404 error displayed is not
accurate.

In other words, if Foo.action -> Bar.action and
Foo.success=Bar.action and no Bar.success is declared, yet that is
the result returned, the 404 will display
No view for result [success] exists for action [Foo.action] when it
should really be "...exists for action [Bar.action].

I suggest adding a getActionName method to GenericDispatcher and use
this method when displaying the 404 instead of the "actionName"
variable. I can supply the patches if necessary.

Also, I've implemented something like a request-driven "next action"
kinda thing, and wondering if there's interest in it. Its real
simple. Basically, I find it abit of hassle to have to declare
results for every "next action" I want, so I patched WebWork so I can
specify say

Foo.action?webwork.next=Bar.action

What happens is, if a view is mapped to the result (say SUCCESS),
then the view is used. If there's no corresponding view, then it
searches the request params for "webwork.next" and uses it if it
exists. If it doesn't then throw 404.

And on the theme of 404s, wondering if people are interested in being
able to specify an error page in webwork.properties, something like
webwork.action.error=error.jsp
or in my case, error-view.vm

For the velocity error template bit, I'm using my own VelocityServlet
implementation which is based on the VelocityLayoutServlet found in
velocity-tools, basically you can specify custom error templates in
velocity.properties...

I haven't really checked out WW2 or XWork, so maybe stuff like this
is already implemented. I worked it into my 1.3 dist...

Kelvin



-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger
for complex code. Debugging C/C++ programs can leave you feeling lost and
disoriented. TotalView can help you find your way. Available on major UNIX
and Linux platforms. Try it free. www.etnus.com
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork

Reply via email to