I want to incorporate the functionality to a HtmlCommandButton. How do I go about doing that? I can’t seem to find too many examples on the web. I see there is something called AjaxBehavoir, but I’m not sure how to incorporate that into my HtmlCommandButton. Essentially I want to do the following to my component:
<f:ajax execute="@this" render="component1 component2" />
Thanks!
You should familiarize yourself with the components of the new
javax.faces.component.behaviorpackage in the JSF 2.0 API.I don’t know if it is recommended to use a programmatic approach to set up ajax behavior directly in your backing bean instead of the more common idiom:
Here are a couple of links that should get you up and running with this.
<f:ajax>components is mapped to and from a backing bean).Hope this can help.
Regards.