0
我想在oncomplete觸發primefaces列過濾器上的鍵控,以便datatable可以重新過濾。我嘗試了下面。但它似乎沒有效果?primefaces上的觸發鍵控列過濾器oncomplete
oncomplete="$('#form1\\:mm1001_datatable_listOfMoneyMarket\\:mm1001_column_tradeid').trigger('filter')"
oncomplete="$('#form1\\:mm1001_datatable_listOfMoneyMarket\\:mm1001_column_tradeid').trigger('keyup')"
<h:form id="form1" enctype="multipart/form-data" prependId="false">
<p:dataTable
styleClass="dataTable" id="mm1001_datatable_listOfMoneyMarket"
value="#{pc_Mm1001.w_mmdeal.theListingOfMoneyMarket}"
var="varlistOfMoneyMarket" rows="50" paginator="true"
paginatorTemplate="{FirstPageLink} {PreviousPageLink} {PageLinks}
{NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
rowsPerPageTemplate="10, 25, 50, 75,100,200"
resizableColumns="true" paginatorPosition="bottom"
filteredValue="#{pc_Mm1001.w_mmdeal.listOfFilteredMoneyMarket}"
widgetVar="listOfMoneyMarket">
<p:ajax event="filter" listener="#{pc_Mm1001.filterListener}"></p:ajax>
<p:column id="mm1001_column_tradeid" width="90"
sortBy="#{varlistOfMoneyMarket.trade_id}"
filterBy="#{varlistOfMoneyMarket.trade_id}"
filterMatchMode="contains" resizable="true"
rendered="#{pc_Mm1001.showColumn_trade_id}"
filterStyle="width:80px"
style="text-align: left; font-weight : 400"
headerText="#{msg.mm1001_gridheader_trade_id}"
filterValue="#{pc_Mm1001.w_mmdeal.fv_trade_id}">
<p:commandLink ajax="false" styleClass="commandLink"
id="mm1001_commandlink_tradeid"
action="#{pc_Mm1001.doMm1001_commandlink_tradeidAction}">
<h:outputText id="mm1001_gridoutput_tradeid"
styleClass="outputGridText_px"
value="#{varlistOfMoneyMarket.trade_id}"></h:outputText>
<f:param name="clicked_transaction_id"
value="#{varlistOfMoneyMarket.transaction_id}"></f:param>
</p:commandLink>
</p:column>
</h:form>
KeyUp事件可以在使用的RequestContext當頁面負載被執行? – bittersour
我想你可以使用這樣的:\t \t \t' '和內部'myMethod'使用'RequestContext'執行你的js –
Daniel