After upgrading primefaces from 6.1.17 to 6.2.5 (or 6.2.4) my application fails with the above error. No other errors, no other changes
What can be the problem?
Regards, Eduard
TypeError: PF(...) is undefined
1000% sure there is not a left-over older PrimeFaces jar in the runtime version of the project?
https://www.google.com/search?q=primefa ... +undefined
https://www.google.com/search?q=primefa ... +undefined
-
- Posts: 21
- Joined: 07 Mar 2018, 16:39
- Contact:
Yes, only primefaces-6.2.5.jar is in the war, also undeployed everything else....using ff 60 ubuntu 1604
-
- Posts: 21
- Joined: 07 Mar 2018, 16:39
- Contact:
chromium gives me a perhaps better error:
Uncaught TypeError: Cannot read property 'filter' of undefined. Points to the last breaking change in the migration guide?
Uncaught TypeError: Cannot read property 'filter' of undefined. Points to the last breaking change in the migration guide?
-
- Posts: 21
- Joined: 07 Mar 2018, 16:39
- Contact:
Added value="#{null}", does not help
log from chromium:
perhaps has to do with custom filtering, I do this:
log from chromium:
Code: Select all
(index):7 Uncaught TypeError: Cannot read property 'filter' of undefined
at Object.onco ((index):7)
at Object.<anonymous> (core.js?ln=primefaces&v=6.2.5:3)
at i (jquery.js?ln=primefaces&v=6.2.5:2)
at Object.fireWith [as resolveWith] (jquery.js?ln=primefaces&v=6.2.5:2)
at A (jquery.js?ln=primefaces&v=6.2.5:4)
at XMLHttpRequest.<anonymous> (jquery.js?ln=primefaces&v=6.2.5:4)
Code: Select all
<p:column sortBy="#{item.foarm}" filterBy="#{item.foarm}" filterValue="#{lazyLemma.filters['foarm']}">
<f:facet name="filter">
<p:keyboard showMode="button" layoutTemplate="#{lemmaController.diacriticsKeyBoard()}" onkeyup="PF('datalist').filter();"
value="#{lazyLemma.filters['foarm']}"/>
</f:facet>
Can you post a mcve (http://stackoverflow.com/help/mcve) hard for me to investigate without one.
-
- Posts: 21
- Joined: 07 Mar 2018, 16:39
- Contact:
I'll see what I can do, it'll take some time
-
- Posts: 21
- Joined: 07 Mar 2018, 16:39
- Contact:
The problem is solved when I give this remote command a delay of 200 (I know not realy nice):
the remote command is defined before the 'datalist' widget in the xhtml.
Code: Select all
<p:remoteCommand delay="200" autoRun="true" oncomplete="PF('datalist').filter();"/>
-
- Posts: 21
- Joined: 07 Mar 2018, 16:39
- Contact:
yes that works, I changed my whole approach and put this at the end of my template (chose this because remoteCommand must be in a form and all I want is run some js):
issue can be closed.
Code: Select all
<c:if test="#{param['state'] == 'filtering'}">
<script>
$(document).ready(function() {
PF('datalist').filter();
});
</script>
</c:if>
-
- Information
-
Who is online
Users browsing this forum: No registered users and 29 guests