Ajax Framework - RemoteCommand

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

<h:form>
    <p:remoteCommand name="rc" update="msgs" actionListener="#{remoteCommandView.execute}" />

    <p:growl id="msgs" showDetail="true" />
    <p:commandButton type="button" onclick="rc()" value="Execute" icon="ui-icon-refresh" />
</h:form>