private static final Logger LOG = LoggerFactory.getLogger(ButtonRenderer.class);
@Override
public void prepareRender(FacesContext facesContext, UIComponent component) throws IOException {
final SupportsMarkup button = (SupportsMarkup) component;
final boolean defaultCommand = ComponentUtils.getBooleanAttribute(component, Attributes.DEFAULT_COMMAND);
super.prepareRender(facesContext, component);
if (defaultCommand) {
button.setCurrentMarkup(Markup.DEFAULT.add(button.getCurrentMarkup()));
}
}