[
https://issues.apache.org/jira/browse/MYFACES-4605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17735808#comment-17735808
]
Joe Crichton commented on MYFACES-4605:
---
Here is a simple two form two button case:
{noformat}
http://www.w3.org/1999/xhtml;
xmlns:f="http://xmlns.jcp.org/jsf/core;
xmlns:h="http://xmlns.jcp.org/jsf/html;
xmlns:ui="http://xmlns.jcp.org/jsf/facelets;
xmlns:jsf="http://xmlns.jcp.org/jsf;
xmlns:c="http://java.sun.com/jsp/jstl/core;
xmlns:o="http://omnifaces.org/ui;
xmlns:pt="http://xmlns.jcp.org/jsf/passthrough;>
Carbon Title
http://www.w3.org/1999/xhtml;
xmlns:carbon="http://java.sun.com/jsf/composite/carbon;>
if(window.PrimeFaces){PrimeFaces.settings.locale='en_US';PrimeFaces.settings.viewId='/joetest.xhtml';PrimeFaces.settings.contextPath='/technologyconnect';PrimeFaces.settings.cookiesSecure=false;}
Carbon Title
myfaces.config._autoeval = true;
{noformat}
When I press the first button, this is what I see come back from the post, so
it actually updates j_id__v_0:jakarta.faces.ViewState:1, and does not include
the viewstate in the 2nd form being rendered
{noformat}
{noformat}
However, after the jsf update completes, the 2nd form DOES have a viewstate
value listed with id of j_id__v_0:jakarta.faces.ViewState:0 (different than
anything seen thus far).
{noformat}
{noformat}
So maybe a wild goose chase (sorry). The original issue was an error case I had
caused during the conversion to Jakarta JSF 3.0 dealing with Omnifaces. When I
fixed my name space issue, the code was working, using the Balusc workaround
for 2nd form viewstate fixup.
> Cross form rending via ajax, form is missing ViewState
> --
>
> Key: MYFACES-4605
> URL: https://issues.apache.org/jira/browse/MYFACES-4605
> Project: MyFaces Core
> Issue Type: Bug
>Affects Versions: 3.0.1, 2.3.10
>Reporter: Joe Crichton
>Assignee: Werner Punz
>Priority: Major
> Fix For: 2.3.11, 3.0.3
>
> Attachments: image-2023-06-20-21-22-50-593.png
>
>
> Seems this is an old issue, which was presumably fixed for MyFaces in 2.2 as
> discussed here
> [https://balusc.omnifaces.org/2011/09/communication-in-jsf-20.html#AjaxRenderingOfContentWhichContainsAnotherForm|https://balusc.omnifaces.org/2011/09/communication-in-jsf-20.html#AjaxRenderingOfContentWhichContainsAnotherForm),]
> and [https://github.com/jakartaee/faces/issues/790]
> Using openliberty with jsf-3.0 feature still has this occurring. Using the
> workaround outlined by the first link fixes the issue. I believe the same is
> true for the jsf-2.3 feature as well.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)