Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>This is caused by <a href="http://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-790" rel="nofollow">JSF spec issue 790</a>, a bug which occurs in JSF 2.0/2.1 and is fixed in the upcoming JSF 2.2. Basically, when JSF ajax updates outside the current <code>&lt;h:form&gt;</code> a component which in turn contains another <code>&lt;h:form&gt;</code> component as child, then its view state won't be updated (this is an oversight). It would only be updated when you explicitly specify the form component in the ajax update. You could theoretically solve it by replacing <code>&lt;h:panelGroup id="panelForDynaPage"&gt;</code> by a <code>&lt;h:form id="panelForDynaPage"&gt;</code>, but this is technically the wrong markup.</p> <p>You can use the following JS to fix this bug. This script will create the <code>javax.faces.ViewState</code> hidden field for forms which did not retrieve any view state after ajax update.</p> <pre><code>var ie = /*@cc_on!@*/false; jsf.ajax.addOnEvent(function(data) { if (data.status == "success") { var viewState = document.getElementsByName("javax.faces.ViewState")[0].value; for (var i = 0; i &lt; document.forms.length; i++) { var form = document.forms[i]; if (!hasViewState(form)) { var hidden = document.createElement(ie ? "&lt;input name='javax.faces.ViewState'&gt;" : "input"); hidden.setAttribute("type", "hidden"); hidden.setAttribute("name", "javax.faces.ViewState"); hidden.setAttribute("value", viewState); hidden.setAttribute("autocomplete", "off"); form.appendChild(hidden); } } } }); function hasViewState(form) { for (var i = 0; i &lt; form.elements.length; i++) { if (form.elements[i].name == "javax.faces.ViewState") { return true; } } return false; } </code></pre>
    singulars
    1. This table or related slice is empty.
    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. This table or related slice is empty.
    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