I am new in Primefaces, and I encountered this problem. The action can not be performed unless I move onclick tag.
<p:commandButton value="Détail " action="#{Allcar.gethistorique}" onclick="detail();suppcar.disable();modifscar.disable();comptecar.disable();detcar.disable()"
id="deta" widgetVar="detcar" disabled="true">
</p:commandButton>