Uploaded image for project: 'Keikai'
  1. Keikai
  2. KEIKAI-220

prime faces components can't work with keikai jsf in the same page

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • 5.3.0
    • 5.1.1
    • None
    • Security Level: Jimmy
    • None
    • None

      Steps to Reproduce

      1. include prime faces 7.0

      		<dependency>
      			<groupId>org.primefaces</groupId>
      			<artifactId>primefaces</artifactId>
      			<version>7.0</version>
      		</dependency>
      

      2. run the attached xhtml page with keikai-jsf
      open developer tool/console

      Current Result

      click a prime faces component and it doesn't respond.

      components.js.xhtml?ln=primefaces&v=7.0:19 Uncaught TypeError: $.escapeSelector is not a function
          at c.setLabel (components.js.xhtml?ln=primefaces&v=7.0:19)
          at c.highlightItem (components.js.xhtml?ln=primefaces&v=7.0:19)
          at c.initContents (components.js.xhtml?ln=primefaces&v=7.0:19)
          at c.init (components.js.xhtml?ln=primefaces&v=7.0:19)
          at c.e.<computed> [as init] (core.js.xhtml?ln=primefaces&v=7.0:6)
          at new c (core.js.xhtml?ln=primefaces&v=7.0:6)
          at Object.createWidget (core.js.xhtml?ln=primefaces&v=7.0:1)
          at Object.cw (core.js.xhtml?ln=primefaces&v=7.0:1)
          at HTMLDocument.<anonymous> (prime2.xhtml:14)
          at fire (zk.wpd:3416)
      

      Expected Result

      no error.

      Debug Information

      • one user saw another error
        Uncaught TypeError: this.jq.draggable is not a function
            at c.setupDraggable (components.js.jsf?ln=primefaces&v=7.0.1:13)
            at c.init (components.js.jsf?ln=primefaces&v=7.0.1:13)
            at c.e.<computed> [as init] (core.js.jsf?ln=primefaces&v=7.0.1:6)
            at new c (core.js.jsf?ln=primefaces&v=7.0.1:6)
            at Object.createWidget (core.js.jsf?ln=primefaces&v=7.0.1:1)
            at Object.cw (core.js.jsf?ln=primefaces&v=7.0.1:1)
            at HTMLDocument.<anonymous> (liquidaCambioPrecio.jsf:255)
            at k (zk.wpd:117)
            at Object.fireWith [as resolveWith] (zk.wpd:118)
            at Function.ready (zk.wpd:122)
        
      • can't set noGlobal flag to avoid override, it's just in internal parameter.
      • need to upgrade dependant ZK version that fixes ZK-4531.
      • modify jQuery related code upon the spec change for ZK-4531. Some 3rd party library like bootstrap.js add functions on jQuery instead of jq

      Root cause

      prime faces loads jquery prior to Keikai. ZK jquery (1.12) overrides prime faces's jquery (3.3), so $ references to zk jquery 1.12. Hence, there is no such function $.escapeSelector available in zk jquery.

      Debug info

      • ZK 9.0.1.2 already fixed ZK-4531. Please upgrade default included ZK dependencies to 9.0.1.2

            wenninghsu wenninghsu
            hawk hawk
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: