jsf - MyFaces doesn't append javax.faces.ViewState back on ajax update of stateless view -


i'm experiencing trouble running multiple times same ajax request updates enclosing form stateless jsf (myfaces 2.2.8 + cdi openwebbeans 1.2.7 running on tomcat 7).

here sscce depict issue better words. let's consider simple form both inputtext , outputtext bound bean parameter. submitting form displays value next inputtext field.

test.xhtml

<!doctype html> <html lang="fr" xmlns="http://www.w3.org/1999/xhtml"     xmlns:f="http://java.sun.com/jsf/core"     xmlns:h="http://java.sun.com/jsf/html"> <f:view transient="true">     <h:head>         <title>test</title>     </h:head>     <h:body>         <h:form>             <h:inputtext value="#{testbean.txt}" />             <h:outputtext value="#{testbean.txt}" />             <h:commandbutton value="submit">                 <f:ajax execute="@form" render="@form" />             </h:commandbutton>         </h:form>     </h:body> </f:view> </html> 

testbean.java

@named @requestscoped public class testbean {     private string txt;      public string gettxt() {         return txt;     }      public void settxt(string txt) {         this.txt = txt;     } } 

could hardly simpler! when submitting value first time, working expected , output displayed. when submitted time (no matter value is), inputtext , outputtext fields emptied (and setter not called).

in fact, what's happening <input type="hidden" autocomplete="off" value="stateless" id="j_id__v_0:javax.faces.viewstate:1" name="javax.faces.viewstate"> that's added form not put in partial rendering. , when it's added manually dom, ajax request working again.

is behaviour expected or bug? there workaround?

thanks!

-- zim

reproduced. indeed myfaces bug. works on mojarra (tested 2.2.11).

you can't else reporting bug myfaces guys. did: issue 3992.


Comments

Popular posts from this blog

Java 3D LWJGL collision -

spring - SubProtocolWebSocketHandler - No handlers -

methods - python can't use function in submodule -