我使用的是PF3.2,JSF 2.0和GF 3.1。
我有一个数据表,上面有一个自定义过滤器。在Firefox中一切正常,但在IE中datatable不会更新。当我单击页面中的任意位置时,ajax就会触发,datatable也会更新。
这是代码-
<p:dataTable id="std"
value="#{myController.stdList}"
selection="#{myController.std}"
selectionMode="multiple"
var="std"
widgetVar="empTable"
paginator="true"
pageLinks="5"
paginatorPosition="bottom"
paginatorAlwaysVisible="true"
currentPageReportTemplate="Page {currentPage} of {totalPages}"
paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink}"
rows="10"
rowKey="#{std}"
sortBy="#{std.lastName}"
sortOrder="ascending"
>
<p:ajax event="rowSelect"
listener="#{myController.onRowSelectListener}"
process="@this"
update="std"
/>
<f:facet name="header">
<p:outputPanel>
<h:outputText value="#{bundle.GlobalFilterPrompt}" />
<p:inputText id="stdFilter"
style="width:150px"
valueChangeListener="#{myController.stdListener}">
<p:ajax update="attendees"
process="@this"
event="change"
/>
</p:inputText>
stdListener方法从输入框中读取值,获取新数据并更新数据表。
为什么它在IE中不起作用?
谢谢
发布于 2014-01-01 03:25:38
我已经成功地使用PrimeFaces remoteCommand调用了数据表的AJAX/jQuery filter()函数:
<p:inputText id="stdFilter" value="#{myController.myFilterValue}"
style="width:150px">
<p:ajax event="change" onsuccess="myFilterUpdateCommand();"/>
<p:remoteCommand id="myRemoteCommandId" name="myFilterUpdateCommand"
actionListener="#{myController.stdListener()}"
update="attendees"
oncomplete="empTable.filter();"/>
我认为您需要向inputText组件添加一个值,以便将筛选器值添加到模型/支持bean。
https://stackoverflow.com/questions/10788130
复制相似问题