HtmlCommandButton command = new HtmlCommandButton(); //BAD PART UISelectBoolean select = new UISelectBoolean(); select.setSelected(false); Application app = FacesContext.getCurrentInstance().getApplication(); command.setAction(app.createMethodBinding("#{ActionBean.scrivi}", null)); command.setValue("Ok" + i); group.getChildren().add(command); group.getChildren().add(select); HtmlOutputText requiredMarker = new HtmlOutputText(); group.getChildren().add(requiredMarker);