Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>As per your own <a href="https://stackoverflow.com/questions/4502465/getters-inside-fverbatim-called-before-form-submission#4518826">answer</a> on this topic:</p> <blockquote> <p><em>I removed the f:verbatim tag, and now it works properly. I still don't understand why it has caused this behaviour though.</em></p> </blockquote> <p>The <code>&lt;f:verbatim&gt;</code> was introduced in JSF 1.0 a long time back with the sole purpose to be able to include plain HTML in the JSF component tree. On JSF 1.0 (and 1.1), when the component tree get built, all the plain HTML was ignored. The page get rendered with all the plain HTML first and then the rendered HTML of JSF components <em>thereafter</em>. So for example</p> <pre class="lang-html prettyprint-override"><code>&lt;p&gt;Hello&lt;/p&gt; &lt;h:inputText /&gt; &lt;p&gt;World&lt;/p&gt; &lt;h:outputText value="outputtext" /&gt; &lt;p&gt;This is weird&lt;/p&gt; </code></pre> <p>get rendered as</p> <pre class="lang-html prettyprint-override"><code>&lt;p&gt;Hello&lt;/p&gt; &lt;p&gt;World&lt;/p&gt; &lt;p&gt;This is weird&lt;/p&gt; &lt;input type="text" /&gt; outputtext </code></pre> <p>The <code>&lt;f:verbatim&gt;</code> allowed developers to take plain HTML into the JSF component tree, so that they get rendered "in sync" as you'd expect from the coding. </p> <pre class="lang-html prettyprint-override"><code>&lt;f:verbatim&gt;&lt;p&gt;Hello&lt;/p&gt;&lt;/f:verbatim&gt; &lt;h:inputText /&gt; &lt;f:verbatim&gt;&lt;p&gt;World&lt;/p&gt;&lt;/f:verbatim&gt; &lt;h:outputText value="outputtext" /&gt; &lt;f:verbatim&gt;&lt;p&gt;This is weird&lt;/p&gt;&lt;/f:verbatim&gt; </code></pre> <p>They however get inlined during view <strong>build</strong> time, not during view <strong>render</strong> time. This is the cause of your problem, the getters get invoked during restore view phase instead of render response phase.</p> <p>Since JSF 1.2, with the improved view handler, it was possible to inline plain HTML "in sync" without hassling with ugly <code>&lt;f:verbatim&gt;</code> tags. So it's not needed anymore. There are also no useful use cases for the tag anymore, expect of possibly some premature performance optimizations, but still then, you should not use it in combination with dynamic data as obtained by Expression Language.</p> <h3>Related questions:</h3> <ul> <li><a href="https://stackoverflow.com/questions/3623911/what-are-the-main-disadvantages-of-java-server-faces-2-0">(Dis)advantages of JSF 2.0</a></li> </ul>
    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