Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>This is not normal behavior. This will happen if you bind tag handler attributes or the <code>binding</code> attribute of JSF components to a property of a view scoped bean while partial state saving is turned on. This is known as <a href="http://java.net/jira/browse/JAVASERVERFACES-1492" rel="noreferrer">issue 1492</a> which is fixed in (the upcoming) Mojarra 2.2.</p> <p>In general, you can recognize tag handlers by the lack of the <code>rendered</code> attribute. E.g. <code>&lt;c:if&gt;</code>, <code>&lt;f:validator&gt;</code>, <code>&lt;ui:include&gt;</code>, etc. If you bind an attribute of such a tag handler to a property of the view scoped bean like follows</p> <pre class="lang-html prettyprint-override"><code>&lt;c:if test="#{viewScopedBean.something}"&gt;&lt;/c:if&gt; &lt;h:inputText&gt;&lt;f:validator binding="#{viewScopedBean.validate}" /&gt;&lt;/h:inputText&gt; &lt;ui:include src="#{viewScopedBean.includePage}" /&gt; </code></pre> <p>then the view scoped bean will be recreated everytime the view is to be restored from a partially saved state. This is a chicken-egg issue with the view scope, because in order to get the <em>right</em> view scoped bean, it has to be extracted from the restored view.</p> <p>This will also happen if you reference a property of a view scoped bean in the <code>binding</code> attribute of a JSF component.</p> <pre class="lang-html prettyprint-override"><code>&lt;h:someComponent binding="#{viewScopedBean.someComponent}" /&gt; </code></pre> <h3>See also:</h3> <ul> <li><a href="http://balusc.blogspot.com/2011/09/communication-in-jsf-20.html#ViewScopedFailsInTagHandlers" rel="noreferrer">Communication in JSF 2.0 - <code>@ViewScoped</code> fails in tag handlers</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