-
1. Re: Ajax.Submit() with h:commandbutton
harut Mar 10, 2010 1:59 AM (in response to rhino30)If you need commandButton which should have ajax functionality, then no need to use h:commandButton, use a4j:commandButton. And if you want to do any action after ajax request related action (in your case close the window...), then you can call corresponding JS function in "oncomplete" attribute of a4j:commandButton.
My Question therefore is how can I specify an action !! which is executed when the form is submitted to the server and how can I set Request params with value ? FOr example my checkbox has an ID of CheckID and I'd like to send it with value 1 ? How has the ajax.submit () look like ?
Write ActionListener method for mentioned commandButton. Value of the checkbox will be set to the property of the Bean class which checkbox has as it's value (<h:selectBooleanCheckbox value="#{aneBean.booleanProperty}"/>) before the ActionListener method will be called. So in that method boolean property which corresponds to the checkbox value will have it's actual value...