Jul 31, 2017

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

RemoteCommand provides a way to execute JSF backing bean methods directly from javascript.

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

You can call javascript function rc() from other place on the page.