加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

jsf – 在ajax渲染后缺少javax.faces.ViewState

发布时间:2020-12-16 02:49:17 所属栏目:百科 来源:网络整理
导读:这不是一个重复的帖子,我只是做了研究,但没有帮助. 首先,这是我的页面…简化以便于阅读. h:form id="treeForm" f:event type="preRenderView" listener="#{taskTreeBean.update}" / rich:tree id="tree" nodeType="#{node.type}" var="node" value="#{taskTr
这不是一个重复的帖子,我只是做了研究,但没有帮助.

首先,这是我的页面…简化以便于阅读.

<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>

当我单击某个树节点时,任务列表表单将呈现,但视图状态将消失,这使得dataScroller需要两次单击下一个/上一页,因为第一次单击是返回ViewState值.

我在这里检查了JIRA – http://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-790.

尝试render =“@ all”或render =“treeForm,taskListTableForm”,都失败了.我等不及mojarra发布2.2.那么这里有解决方法吗?

非常感谢. JIRA太难理解了.

编辑:还有另一个问题,如果我点击树节点,页面在dataTable中从1变为2.为什么?

解决方法

我知道您可能已经解决了这个问题,但为了将来参考,this应该为其他人提供解决方案.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读