我是JSF中的新手。这是我的问题:我在JSF页面中的表单中有一个数据表。
<h:form id="mainForm">
<rich:dataScroller for="itemDataTable" maxPages="30"/>
<rich:dataTable rowKeyVar="rkVar" rows="15" id="itemDataTable" value="#{itemsController.itemDM}" var="r">
<h:column id="setValue">
<h:inputText id="finalItem" valueChangeListener="#{itemsController.recalculate()}" value="#{r.items.prices}"/>
</h:column>
...
...
<!-- other columns -->
</rich:dataTable>
<rich:dataScroller for="itemDataTable" maxPages="30"/>
</h:form>
我的数据表中有大约15页。我在第一页中输入了FinalItem的最终值,然后单击下一页。现在,如果我回到第一页,我发现所有先前输入的值都从数据表中消失了。请为此提供帮助,如果我缺少数据表中的一些属性,请告诉我。我还想知道是否有可能从jQuery处理此问题。任何帮助将不胜感激!
in rich:datasCroller ajaxsingle属性的默认值是正确的。您必须明确地将其变为错误。问题是由于AjaxSingle =" true"
,您的数据量值未提交。像这样更改数据滚动器
<rich:dataScroller for="itemDataTable" maxPages="30" ajaxSingle="false"/>
这应该解决您的问题。
请参阅Rich的标签信息:DataScroller
http://livedemo.exadel.com/richfaces-demo/richfaces/datatablescroller.jsf?tab=info&cid=574957
richfaces 4.x
有关RICH的属性:DataScroller
请参阅此链接http://docs.jboss.org/richfaces/latest_4_x/vdldoc/。
您可以使用Execute属性来处理页面上的DataTable。
<rich:dataScroller for="itemDataTable" maxPages="30" execute="your datatable id here"/>
合并datasCroller中的以下行
编辑
<rich:dataScroller for="itemDataTable" maxPages="30" execute="itemDataTable"/>
那应该解决问题!!