Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The view IDs should not contain the <code>FacesServlet</code> mapping. It should represent the physical file path/name. Change <code>.html</code> to <code>.xhtml</code>. You should also remove <code>?faces-redirect=true</code> and instead add a <code>&lt;redirect /&gt;</code> to the <code>&lt;navigation-case&gt;</code>.</p> <pre><code>&lt;navigation-rule&gt; &lt;from-view-id&gt;/pages/test/test.xhtml&lt;/from-view-id&gt; &lt;navigation-case&gt; &lt;from-outcome&gt;write&lt;/from-outcome&gt; &lt;to-view-id&gt;/pages/test/test-write.xhtml&lt;/to-view-id&gt; &lt;redirect /&gt; &lt;/navigation-case&gt; &lt;/navigation-rule&gt; </code></pre> <p>By the way, this is the old JSF 1.x style. Are you aware of the new JSF2 implicit navigation? You could just return <code>"/pages/test/test-write.xhtml?faces-redirect=true"</code>.</p> <pre><code>public String test() { return "/pages/test/test-write.xhtml?faces-redirect=true"; } </code></pre> <p>No need for bloated XML navigation cases anymore.</p> <p>Further, if your action method is really not doing anything else, then you can also just put exactly that return value in the <code>action</code> attribute instead.</p> <pre><code>&lt;h:commandButton ... action="/pages/test/test-write.xhtml?faces-redirect=true" /&gt; </code></pre> <p>Even more, if it's plain page-to-page navigation, rather use <code>&lt;h:link&gt;</code> instead. It's more SEO friendly as searchbots don't index POST forms:</p> <pre><code>&lt;h:link ... outcome="/pages/test/test-write.xhtml" /&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload