我的主要 jsf 包括 2 个 jsf,其中每个都有一个带有过滤选项的表。
这是主要内容的一个简短示例:
<h:panelGroup id="b1">
<p:commandButton
value="exe"
actionListener="#{bean.handle}"
rendered="#{bean.render}"
update=":mainForm:panel1,:mainForm:panel2">
</p:commandButton>
</h:panelGroup>
</h:panelGrid>
</p:panel>
<ui:include src="table1.xhtml" />
<ui:include src="table2.xhtml" />
Run Code Online (Sandbox Code Playgroud)
问题是我需要在更改 2 个表之间的视图时删除过滤器我不能通过 clearFilters 使用客户端,因为我有 2 个表:
<p:commandButton
oncomplete="table1Widget.clearFilters() ????"
Run Code Online (Sandbox Code Playgroud)
所以我想最好的地方是通过 handle 方法在服务器端,但过滤器列表是空的,表格也是
DataTable dt1 = (DataTable) FacesContext.getCurrentInstance().getViewRoot().findComponent("mainForm: .... ");
Run Code Online (Sandbox Code Playgroud)
如何重置过滤器?
谢谢
| 归档时间: |
|
| 查看次数: |
8622 次 |
| 最近记录: |