arya-blue
luna-amber
luna-blue
luna-green
luna-pink
nova-dark
nova-light
saga-blue
vela-blue
MethodParam
Task: Call a remote Java method with any parameters from JavaScript. It can be done with pe:remoteCommand and pe:methodParam, pe:methodSignature. MethodParam specifies a name of the parameter and MethodSignature specifies a comma separated list with full qualified class names. Class names should match passed parameters in the same order as they were defined.
Source

<p:growl id="growl" showDetail="true"/>

    <pe:remoteCommand id="applyDataCommand" name="applyData" process="@this" update="growl" actionListener="#{remoteCommandController.printMethodParams}">
        <pe:methodSignature parameters="java.lang.String, java.util.Date, org.primefaces.extensions.showcase.model.Circle"/>
        <pe:methodParam name="subject"/>
        <pe:methodParam name="date">
            <f:convertDateTime type="both" pattern="MM/dd/yyyy HH:mm:ss"/>
        </pe:methodParam>
        <pe:methodParam name="circle">
            <pe:convertJson/>
        </pe:methodParam>
    </pe:remoteCommand>

    <script type="text/javascript">
        circle = {
            radius: 50,
            backgroundColor: "#FF0000",
            borderColor: "#DDDDDD",
            scaleFactor: 1.2
        };
        circle2 = {
            radius: 32,
            backgroundColor: "#FF0320",
            borderColor: "#DDFFFD",
            scaleFactor: 1.6
        };
    </script>

    <p:commandButton value="Apply Data" type="button" onclick="applyData('hello world', '05/14/2007 12:55:42', JSON.stringify(circle))"/>
    <p:commandButton value="Apply Second Data" type="button" onclick="applyData('hello user', '07/11/2001 11:55:42', JSON.stringify(circle2))"/>
            
Components and more
Documentation
Attributes (move mouse over the names to see data types)
Name Description
No attributes available for this component.
PrimeFaces Extensions Showcase - © 2011-2025,PrimeFaces: 15.0.13,PrimeFaces Extensions: 15.0.14-SNAPSHOT,JSF: Apache MyFaces JSF-2.3 Core Impl 2.3.10,Server: Apache Tomcat (TomEE)/9.0.82 (8.0.16),Build time: 2026-02-23 00:32