primefaces数据表的自定义筛选器
我正在使用PF3.2、JSF2.0和GF 3.1 我有一个datatable,上面有一个自定义过滤器。在Firefox中一切正常,但在IE中数据表不会更新。当我点击页面中的任何位置时,ajax就会启动,数据表也会更新 这是代码-primefaces数据表的自定义筛选器,primefaces,Primefaces,我正在使用PF3.2、JSF2.0和GF 3.1 我有一个datatable,上面有一个自定义过滤器。在Firefox中一切正常,但在IE中数据表不会更新。当我点击页面中的任何位置时,ajax就会启动,数据表也会更新 这是代码- <p:dataTable id="std" value="#{myController.stdList}"
<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中不起作用
谢谢我使用PrimeFaces remoteCommand调用了dataTable的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。我使用PrimeFaces remoteCommand调用dataTable的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中