[
https://issues.apache.org/jira/browse/MYFACES-4162?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16197277#comment-16197277
]
Werner Punz commented on MYFACES-4162:
--------------------------------------
I just checked the usecase, that is unrelated to the ajax code.
Following, the login page makes an ajax navigation. The response sends a
viewstate of:
<div id="javax_faces_developmentstage_messages"></div></body>
</html>]]></update><update
id="j_id__v_0:javax.faces.ViewState:1"><![CDATA[me7tJGl/CI84yKJsvkcXExVnpbdtkAQNHiQQUGUK4Hvx2E29]]></update></changes></partial-response>
which apparently ends up in the form as following element:
<input type="hidden" id="j_id__v_0:javax.faces.ViewState:0"
name="j_id__v_0:javax.faces.ViewState"
value="me7tJGl/CI84yKJsvkcXExVnpbdtkAQNHiQQUGUK4Hvx2E29">
As you can see a perfectly valid viewstate
Now the logout button is a normal non ajaxed button
<form jsfc="h:form">
<ui:insert name="header" >
<ui:include src="/lifeheader.xhtml" />
</ui:insert>
where the logout button is in ui:include:
<ui:composition>
<input jsfc="h:commandButton" style="background-color:#F78181; padding: 10px;"
type="submit" id="signOut" value="SignOut" action="signedOut"
actionListener="#{userBean.signOut}"/>
now what happens if i press the first signout, I end up back on the same page
apparently something in the myfaces 2.3 navigational code is messed up here,
but not on the ajax side. Either the server sends a wrong viewstate back at the
ajax request or something else is broken in this usecase.
By pressing the button a second time I finally have the correct viestate and
the navigation goes forward back to the login page.
Sorry there is nothing I can do on my side here, the viewstates coming in from
the server are correctly inserted. The server guys need to debug that out.
Just a sidenote, I replaced quickly our implementation in the pom.xml with
mojarra. Mojarra 2.3.2 navigates correctly.
> bug in the response handling if a full page is sent via ajax
> ------------------------------------------------------------
>
> Key: MYFACES-4162
> URL: https://issues.apache.org/jira/browse/MYFACES-4162
> Project: MyFaces Core
> Issue Type: Bug
> Affects Versions: 2.3.0-beta
> Reporter: Werner Punz
> Assignee: Werner Punz
>
> The example in https://issues.apache.org/jira/browse/MYFACES-4154 sends back
> an entire page due to a page navigation triggered from an ajax call, and
> apparently the page is inserted but the viewstate is lost along the way. I
> need to investigate what happens for such a corner case, since triggering a
> page change navigation from Ajax is rather seldom but needs to be addressed.
> I will need a handful of days to fix this, due to my limited time.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)