struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Lee <>
Subject Rest plugin and Validation : Cannot find a result for editNew
Date Wed, 12 Jan 2011 18:17:46 GMT

I've been having difficulties using validation with the
Convention+Rest plugin using Struts

My validation successfully adds field errors to the action and the
rest workflow chooses to render an editNew result as expected.
If I include a method called editNew (returning either a String or
HttpHeaders) then I get an error saying:

"No result defined for action com.*.*.*.RegisterController and result editNew"

The rest showcase app seems not to have any @Result annotation so I
assumed that this would just work but it does not.

If I add:

   @Result(name = "editNew", type = "redirectAction", location = "register"),

Then it finds the result fine and returns to the page displaying the
validation messages as expected but it has lost all the parameters for
the form.

I think our struts convention config is relatively standard and we are
using the restDefaultStack interceptor stack:

<constant name="struts.convention.action.suffix" value="Controller" />
<constant name="struts.convention.action.mapAllMatches" value="true" />
<constant name="struts.convention.default.parent.package"
value="rest-default" />
<constant name="struts.convention.package.locators.basePackage"
value="com.[package].web.action" />
<constant name="struts.convention.action.checkImplementsAction" value="false" />
<constant name="struts.convention.action.checkAnnotation" value="false" />

I was hoping to be able to display the form details back to the user -
which would work in standard struts.
Has anyone faced this issue before or do I have a basic misunderstanding?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message