concerning p:ajax of PrimeFaces. I have two p:ajax requests within my <p:commandButton>
. I did stdout
within the second method so that I can see if its triggered or not. The same (last) method is triggered twice and I don't know why. If I put only one <p:ajax>
request into my button he fires once and if I put two <p:ajax>
requests he fires twice.
<h:body style="background:#f5f5f5;">
<h:form id="formG">
<p:commandButton styleClass="viewButton" icon="ui-icon-search"
value="#{msg['button.open']}" id="auftragButtonG">
<p:ajax listener="#{auftragBean.saveIdIntoAppScope()}" partialSubmit="true"/>
<p:ajax listener="#{auftragBean.loadXMLData()}" partialSubmit="true"/>
</p:commandButton>
</h:form>
</h:body>
public void loadXMLData(){
setXmlData(entireXmlData(mandantId(), getJobId()));
System.out.println(getXmlData().size());
}
Anybody knows why and how I can ignore the second load?