Hi,

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

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:

@Results({
   @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?

Thanks,

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to