ICEfaces
  1. ICEfaces
  2. ICE-7325

ACE components using direct references to $

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.1-Beta
    • Fix Version/s: 2.1-Beta2, 3.0
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      -
    • Assignee Priority:
      P1
    • Affects:
      Compatibility/Configuration
    • Workaround Exists:
      Yes
    • Workaround Description:
      Hide
      <script type="text/javascript">
      $ = jQuery;
      </script>
      Show
      <script type="text/javascript"> $ = jQuery; </script>

      Description

      A user is receiving the following JS error when using the ACE components, specifically the ace:dataTable:

      $(this.jqId + " th.ui-sortable-column .ui-sortable-control") is null.

      This can be reproduce in the ACE component suite showcase found in 2.1 Beta. He has found that the $ object is not referencing the jQuery object and that the solution is to add "$ = jQuery" to the page like so:

      <script type="text/javascript">
      $ = jQuery;
      </script>

      However he fears that this may break more complex pages. JQuery should ideally be used in no-conflict mode and the component JS should not be directly accessing the global $ object but instead should I either use jQuery" or re-assign to a member variable.
      1. simpleDatatableTest_output.html
        14 kB
        Pierre Asselin
      2. simpleDatatableTest.xhtml
        3 kB
        Tyler Johnson
      1. screenshot-01.png
        197 kB
      2. screenshot-02.png
        163 kB

        Activity

        Tyler Johnson created issue -
        Tyler Johnson made changes -
        Field Original Value New Value
        Attachment simpleDatatableTest.xhtml [ 13638 ]
        Tyler Johnson made changes -
        Salesforce Case [5007000000JL99C]
        Ken Fyten made changes -
        Fix Version/s 2.1 [ 10241 ]
        Affects [Compatibility/Configuration]
        Assignee Priority P2
        Assignee Mark Collette [ mark.collette ]
        Tyler Johnson made changes -
        Comment [ The ace:dataTable in component showcase throws the following:

        $(this.jqId + " th.ui-sortable-column .ui-sortable-control") is null
        [Break On This Error] $(this.jqId + ' th.ui-sortable-column .ui-sortable-control') ]
        Ken Fyten made changes -
        Assignee Mark Collette [ mark.collette ] yip.ng [ yip.ng ]
        yip.ng made changes -
        Attachment screenshot-01.png [ 13670 ]
        Pierre Asselin made changes -
        Attachment simpleDatatableTest_output.html [ 13672 ]
        Ken Fyten made changes -
        Assignee Priority P2 P1
        yip.ng made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        yip.ng made changes -
        Attachment screenshot-02.png [ 13691 ]
        Ken Fyten made changes -
        Fix Version/s 2.1-Beta2 [ 10294 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            yip.ng
            Reporter:
            Tyler Johnson
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: