title: Navigation on validation failure in Seam/JSF
body: <p>I've been playing with <a href="http://www.seamframework.org/" rel="nofollow noreferrer">Seam</a> (2.0.2.SP1) for a few weeks, and I have most of the basics nailed down, but I haven't come up with a decent solution to the following.</p>
  
  <p>Suppose I have a form at <code>/foo.xhtml</code>, with a rewrite rule such that URLs like <code>/foo.seam?id=&lt;fooId&gt;</code> are converted to <code>/foo/&lt;fooId&gt;</code>.  There's a <code>commandButton</code> on the form with an action of <code>#{fooHome.update}</code>.  I also have a navigation rule in <code>/foo.page.xml</code> that redirects back to a nice, bookmark-friendly GET after a successful POST:</p>
  
  <pre><code>&lt;navigation from-action="#{fooHome.update}"&gt;
      &lt;rule if-outcome="updated"&gt;
          &lt;redirect view-id="/foo.xhtml"&gt;
              &lt;param name="id" value="#{fooHome.instance.id}"/&gt;
          &lt;/redirect&gt;
      &lt;/rule&gt;
  &lt;/navigation&gt;
  </code></pre>
  
  <p>The problem is when a validation error occurs, at which point the navigation rules get skipped, and I end up at <code>/foo</code> after the POST.</p>
  
  <p><strong>My question:  Is there a way to redirect on validation errors, so I end up with a GET request for <code>/foo/&lt;fooId&gt;</code> instead of the POST to <code>/foo</code>?</strong></p>
  
  <p>I tried rolling my own validation methods in <code>fooHome</code>, returning a "failed" outcome, but I don't really want invalid data getting past the validation phase (and thus into the current conversation).</p>