5

This is not a duplicate post, i just done research but not helping.

First, this is my page... simplified for easy reading.

            <h:form id="treeForm">
                <f:event type="preRenderView" listener="#{taskTreeBean.update}" />              
                <rich:tree id="tree" nodeType="#{node.type}" var="node"
                    value="#{taskTreeBean.rootNodes}" toggleType="client"
                    selectionType="ajax"
                    render="@all"
                    selectionChangeListener="#{taskTreeBean.selectionChanged}">
                    <rich:treeNode>
                    ...
                    </rich:treeNode>
                </rich:tree>
            </h:form>
            <h:form id="taskListTableForm">
                <rich:dataTable id="taskListTable" styleClass="tasklist" keepSaved="true" value="#{taskListModel}" var="task"
                    rowClasses="odd-row, even-row" rows="3">
                    <rich:column>
                    ...
                    </rich:column>
                    <f:facet name="footer">
                        <rich:dataScroller id="scroller" for="taskListTable" />
                    </f:facet>
                </rich:dataTable>
            </h:form>

When i click some tree node, task list form will render, but the viewstate will disappear, which makes dataScroller requires two clicks to next/prev page since the first click is getting back the ViewState value.

I checked the JIRA here - http://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-790.

Tried render="@all" or render="treeForm, taskListTableForm", both failed. I cannot wait mojarra to release 2.2. So is there any workaround here?

Thanks so much. The JIRA is just too difficult to understand.

Edited: There is another problem, the page go from 1 to 2 in the dataTable if i click the tree node. Why?

Tommy
  • 1,960
  • 1
  • 19
  • 32

2 Answers2

5

I am aware that you probably solved this problem, but for future reference, this should provide others with the solution.

Misa
  • 889
  • 1
  • 10
  • 20
  • Thumbs Up Thanks so much this doc explained the whole problem but I must render second form when submit first form I tried to do a container to both forms and each one render on it but with no luck one form must render other one this is the fix rule – Youans Aug 02 '15 at 13:41
  • Thanks I spent the whole day on this. – Ced Apr 14 '16 at 15:55
0

I had the same problem and worked around it by replacing <f:ajax/> with <p:ajax/> from PrimeFaces 3.0. The page in question has no other PrimeFaces components. I don't know why it works, but hopefully it will in your case.

Steve
  • 8,066
  • 11
  • 70
  • 112