<p:remoteCommand> throws Exception

UI Components for JSF
Post Reply
MacNord
Posts: 4
Joined: 21 Oct 2021, 10:02

21 Oct 2021, 10:17

Hello

I am upgrading from Primefaces 7.0.x to 8.0.18 and face a problem with the <p:remoteCommand> hat did not occur in version 7.0.
Even when using the examples from the showcase (https://www.primefaces.org/showcase-v8/ ... mand.xhtml) I geht the following error in the browser console:

core.js?ln=primefaces&v=8.0:18 Uncaught TypeError: $.escapeSelector is not a function
at Object.send (core.js?ln=primefaces&v=8.0:18)
at Object.offer (core.js?ln=primefaces&v=8.0:18)
at Object.handle (core.js?ln=primefaces&v=8.0:18)
at Object.PrimeFaces.ab (core.js?ln=primefaces&v=8.0:18)
at rc (my-page:262)
at HTMLButtonElement.onclick (my-page:264)

Code: Select all

			<h:form id="remoteCommand" class="form-horizontal" role="form">
				<p:remoteCommand name="rc" update="msgs" action="#{mybean.init}" />
				<p:growl id="msgs" showDetail="true" skipDetailIfEqualsSummary="true" />
				<p:commandButton type="button" onclick="rc()" value="Execute" icon="pi pi-refresh" />
			</h:form>
No AJAX request is sent anymore but a whole page reload occus..
Did anybody experience the same issue? What is the cause and how to solve it ? Thanks!

Melloware
Posts: 3716
Joined: 22 Apr 2013, 15:48

21 Oct 2021, 20:26

That looks like a JQuery version mismatch.
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1

MacNord
Posts: 4
Joined: 21 Oct 2021, 10:02

26 Oct 2021, 13:17

Melloware wrote:
21 Oct 2021, 20:26
That looks like a JQuery version mismatch.
Thank you for the hint. The cause was in fact another (self assembled) script called scripts.min.js that was included in the template and that I had to replace with the current version of bootstrap.min.js that I got from https://getbootstrap.com/docs/4.3/getti ... /download/

<script src="/xxx/js/bootstrap.min.js"></script>

I am still not quite sure how the <p:remoteCommand feature was depending on scripts.min.js but it works now as well as the bootstrap features...

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 40 guests