[
https://issues.apache.org/jira/browse/MYFACES-2881?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12898821#action_12898821
]
Werner Punz commented on MYFACES-2881:
--------------------------------------
Ok Martin, first of all sorry to be so harsh in my responses, I hope you have
not gotten it wrong.
I have issued the patch for myfaces so that you can turn on the update all
forms either globally or locally here is an example:
function sendQueuedFormFixup(event) {
for (var cnt = 0; cnt != 500; cnt++) {
jsf.ajax.request(document.getElementById('queued'), event,
{execute:'@this', render:'refresh', myfaces:{no_portlet_env: true}});
}
return false;
}
if you add myfaces:{no_portlet_env: true} then you can use the better viewstate
fixup.
You also can turn it on globally by adding following script part after your
jsf.js include
//initialize the namespace
window.myfaces = window.myfaces || {};
myfaces.config = myfaces.config || {};
//set the config part
myfaces.config.no_portlet_env = true;
But I think there might be a solution which might fix the issue for both
myfaces and mojarra over a listener.
I will prototype it out and if it works out I will add that code as well.
Because as I said, this code here fixes the issue for myfaces but it wont work
for mojarra which also has the same issue.
> Server state saving with two forms, ajax and normal request is broken
> ---------------------------------------------------------------------
>
> Key: MYFACES-2881
> URL: https://issues.apache.org/jira/browse/MYFACES-2881
> Project: MyFaces Core
> Issue Type: Bug
> Components: General
> Affects Versions: 2.0.1, 2.0.2-SNAPSHOT
> Environment: myfaces 2.0.1 or trunk;
> Reporter: Martin Kočí
> Priority: Blocker
> Fix For: 2.1.0
>
>
> Use simple xhtml with:
> <h:form id="form1">
> <h:commandButton value="Partial">
> <f:ajax execute="@this" render="@this" />
> </h:commandButton>
> </h:fom>
> </h:form>
> <h:form id="form2">
> <h:commandButton value="Full" />
> </h:form>
> then:
> 1) click "Partial" button 20x or more
> 2) click "Full" button
> -> ViewExpiredException appears. If you click "Partial" 19 times or less
> ViewExpiredException does not appear.
> 20 is default for NUMBER_OF_VIEW_IN_SESSION - it you set this param to 1 you
> reproduce this problem with two clicks. Maybe there is more simple test case
> for reproducing this issue but I didn't find it yet.
> This bug is present in 2.0.1 already and is related to server state saving:
> myfaces 2.0.1:
> PSS + server: failed
> PSS + client: ok
> FSS + server: failed
> FSS + client: ok
> myfaces 2.0.2-SNAPSHOT:
> PSS + server: failed
> PSS + client: ok
> FSS + server: failed
> FSS + client: ok
> Very likely this causes MYFACES-2877 too.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.