次の要件があります。
ユーザーがページネーターボタンの1つを押して値が含まれている場合は、globalFilter
inputText
その値を削除する必要があります。
これはテーブルです(遅延読み込み):
<p:dataTable id="osTable"
var="os"
value="#{bean.lazyModel}"
selection="#{bean.selectedObjectSet}"
selectionMode="single"
rowKey="#{os.ID}"
paginator="true"
paginatorPosition="bottom"
paginatorTemplate="{RowsPerPageDropdown} {FirstPageLink} {PreviousPageLink} {CurrentPageReport} {NextPageLink} {LastPageLink}"
rowsPerPageTemplate="5,10,15"
rows="10"
widgetVar="table">
<f:facet name="header">
<p:outputPanel style="float: right">
<h:outputText value="Search all fields:" />
<p:inputText id="globalFilter"
value="#{bean.find}"
onkeypress="if (event.keyCode == 13) {table.filter()}"
style="width:150px">
</p:inputText>
</p:outputPanel>
</f:facet>
私はjavascriptを介してそれを行う必要があると思いますが、この種の機能を実装する方法がわかりません。