我正在尝试使用 RequestContext.update() 更新表以下代码正在运行(jsf):
<h:panelGrid columns="2" style="width: 100%" columnClasses="treeColumn,tableColumn">
<h:panelGroup id="treePanel">
<p:tree id="tree"
value="#{bean.root}"
var="node"
dynamic="true"
cache="true"
animate="true"
selectionMode="single"
selection="#{bean.selectedNode}"
rendered="#{bean.renderTree}">
<p:ajax event="select" listener="#{bean.onNodeSelect}" update=":mainForm:treePanel,:mainForm:tablePanel"/>
<p:ajax event="collapse" listener="#{bean.onNodeCollapse}"/>
<p:treeNode expandedIcon="ui-icon-folder-open"
collapsedIcon="ui-icon-folder-collapsed">
<h:outputText value="#{node.name}" styleClass="tableTreeText"/>
</p:treeNode>
<p:treeNode expandedIcon="ui-icon-folder-open"
collapsedIcon="ui-icon-folder-collapsed">
<h:outputText value="#{node.name}" styleClass="tableTreeText"/>
</p:treeNode>
</p:tree>
</h:panelGroup>
<h:panelGroup id="tablePanel" styleClass="acqPanelTable">
<p:dataTable id="acqDataTable"
widgetVar="acqTablehdsWidget"
var="acq"
value="#{bean.list}"
rendered="#{bean.renderTable}"
filteredValue="#{bean.filteredList}"
paginator="true"
paginatorPosition="bottom"
.....
....
...
..
.
但不是通过服务器端:
RequestContext requestContext = RequestContext.getCurrentInstance();
requestContext.update(":mainForm:tablePanel");
renderTable = true;
我不明白有什么不同?
感谢您对任何建议的帮助
谢谢