1 Reply Latest reply on Nov 8, 2007 11:14 AM by Pete Muir

    Failed Validation Reload

    David Fedchenko Newbie

      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.




      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/*">
       <rule if-outcome="reload">

      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.