Hi,
I am instantiating HtmlAjaxCommandButton in backing bean (for dynamic menu generation) like:
HtmlAjaxCommandButton cmdButton = new HtmlAjaxCommandButton();
FacesContext facesContext = FacesContext.getCurrentInstance();
ValueExpression ve = ...
cmdButton.setValueExpression("value", ve);
MethodExpression me = ...
cmdButton.setActionExpression(me);
cmdButton.setStyleClass("menuButton");
cmdButton.setReRender("aIncludeForm, selectMenu");
// Add components to view form
UIForm form1 = (UIForm)facesContext.getViewRoot().findComponent("selectMenu");
form1.getChildren().add(cmdButton);
}<a4j:commandButton action="#{...}" value="#{...}" reRender="aIncludeForm, selectMenu" styleClass="menuButton"/>
Anybody any idea?