[jboss-user] [JBoss Seam] - Failed Validation Reload

davidfed do-not-reply at jboss.com
Mon Nov 5 22:17:08 EST 2007


Seam 1.2.1, JBoss 4.0.5

I see that when a form page fails validation or an action method returns null that the conversational parameters on the URL disappear.

e.g.
http://localhost/edit/provider.seam?cid=5&clr=true
becomes
http://localhost/edit/provider.seam
when the page is reloaded with validation messages.

The same is true when I return null from an action of a submit button.

Generally speaking, the pages still appear to behave properly, but this doesn't work so well in the back stack because we are using non-cached pages to keep the data presentation accurate and that doesn't work so well when the conversation id isn't present.

I've gotten around the problem in the case of an action method by returning a string which triggers a pages.xml action handler that redirects the page to itself.

return "reload";
<page view-id="/edit/*">
  |   <navigation>
  |     <rule if-outcome="reload">
  |       <redirect/>
  |     </rule>
  |   </navigation>
  | </page>

This works but means that I can't conditionally use @End annotations because I'm never returning null.  And it makes our code inconsistent since we use annotations for everything else.

This also doesn't solve the failed validation case. And leads to inconsistent browser behavior as the failed validation adds a page to the history and the redirect technique doesn't.

So is this all expected behavior?  Is there a way to get the parameters in the URL more consistently?  Especially the validation case since I have a work around for the action case.

thanks

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4102050#4102050

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4102050



More information about the jboss-user mailing list