Ajax Framework - RemoteCommand

RemoteCommand provides a simple way to execute backing bean methods with javascript.

<h:form>
    <p:remoteCommand name="rc" update="msgs" action="#{remoteCommandView.execute}" />
    
    <p:growl id="msgs" showDetail="true" />
    <p:commandButton type="button" onclick="rc()" value="Execute" icon="pi pi-refresh" />
</h:form>