Hi,
My problem is that a4j:form with ajaxSubmit="true" doesn't work for
h:commandButton.
The ajax request is send, but the action and actionListener method are never
called.
It seems that this is a general problem with a4j:form and ajaxSubmit="true" when
using h:commandButton.
This is my Example Code:
<f:view>
<a4j:form id="edit1" ajaxSubmit="true">
<h:commandButton value="ajax submit true"
actionListener="#{tabButtonBean.callActionListener}"
action="#{tabButtonBean.callAction}"></h:commandButton>
</a4j:form>
<h:form id="edit2">
<h:commandButton value="standard jsf without ajax"
actionListener="#{tabButtonBean.callActionListener}"
action="#{tabButtonBean.callAction}"></h:commandButton>
</h:form>
<h:form>
<a4j:commandButton value="standard form with a4j:commandButton"
actionListener="#{tabButtonBean.callActionListener}"
action="#{tabButtonBean.callAction}"></a4j:commandButton>
</h:form>
<a4j:log popup="false" level="DEBUG"></a4j:log>
</f:view>
public class TabButtonBean {
public void callActionListener(ActionEvent e) {
System.out.println("Hello World " + e);
}
public String callAction() {
System.out.println("callAction()");
return null;
}
}
Best regards
Stefan