CommandButton

CommandButton extends the standard h:commandButton with ajax, partial processing and skinning features.

<h:form> 
    <p:growl id="growl" life="2000" />
    
    <p:commandButton value="Ajax Submit" id="ajax" update="growl" action="#{buttonView.buttonAction}" style="margin-right:20px;" styleClass="ui-priority-primary" />

    <p:commandButton value="Non-Ajax Submit" id="nonAjax" action="#{buttonView.buttonAction}" style="margin-right:20px;" ajax="false" />

    <p:commandButton value="With Icon" id="withIcon" action="#{buttonView.buttonAction}" update="growl" style="margin-right:20px;" icon="pi pi-save" />

    <p:commandButton action="#{buttonView.buttonAction}" id="iconOnly" update="growl" style="margin-right:20px;" icon="pi pi-save" title="Icon Only" />

    <p:commandButton value="Disabled" id="disabled" style="margin-right:20px;" disabled="true" />   
</h:form>