我在primefaces滑块和treenode中使用p:ajax。每当我展开树时,总是会自动调用oncomplete方法。任何人都可以告诉我如何停止这种自动呼叫
<p:tree value="#{Bean.root}" var="node" dynamic="true">
<p:ajax event="expand"
oncomplete="PF('primefacesPersoDialog').initPosition()" />
<p:treeNode>
<p:outputPanel rendered="#{something ..}">
<div style="styling ..">
<h:outputText style="styling .."
value="#{node.name }" />
<p:outputPanel style="styling ..">
<h:inputHidden id="aaa"
value="#{node.selection}" />
<p:slider for="aaa" step="1" maxValue="2" style="styling .." >
<p:ajax event="slideEnd"
listener="#{bean.methodOne}"
oncomplete="#{bean.methodTwo(node)}"
update="@this" process="@this" />
</p:slider>
</p:outputPanel>
</div>
</p:outputPanel>
</p:treeNode>
</p:tree>