I need to use the a4j:commandButton instead of h:commandButton because of its reRender option.
When I’m using h:commandButton, it works fine (but off course without reRender):
<h:commandButton id="save" action="#{bean.save}" value="#{conf.buttonSave}"/>
And the same thing using doesn’t (action isn’t started even withour reRender option):
<a4j:commandButton id="save" action="#{bean.save}" value="#{conf.buttonSave}"/>
I’ve also tried:
<h:commandButton id="save" action="#{bean.save}" value="#{conf.buttonSave}">
<a4j:ajax event="click" reRender="table" />
</h:commandButton>
But if I add a4j:ajax it the same problem as a4j:commandButton, action is not started.
Could you help me?
You tagged this JSF 2.0. So you’re using JSF 2.0. Just use the JSF 2.0 builtin
<f:ajax>tag.Note that
<h:dataTable id="table">must be within the same<h:form>the above way. Otherwise you needrender=":table"instead. Also note that you must have a<h:head>instead of<head>in the template in order to get all necessary JavaScripts auto-included.