I am encountering a pop up window with error message "Request error, status :0" when onclick event is triggered by a4j:support inside an h:commandButton.
<h:commandButton id="btn1" action="#{beanA.method1}">
<a4j:support event="onclick" action="#{beanB.method1}" reRender="somePanelGrid" />
</h:commandButton>
I also tried using a4j:jsFunction for beanB.method1 and use the onclick attribute of the h:commandButton but the error keeps showing on pop up/alert box. Removing the a4j:support removes the error; however, i still need to execute the beanB.method1 when the commandButton is clicked. What can be the cause of this error? Is there an alternate or better way of doing this?
I think it's because you send multiple request to server-side in the same time when you click, I would rather invoke
beanB.method1()
inbeanA.method1()
, or delay one of the action tooncomplete
stage to get around this issue: