Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    TreeGrid skin issue

    I attempt to set the icon of a node to the following value:
    Code:
    "[SKIN]/actions/find.png"
    However, when the tree is rendering I get a 404 for the following fetch:
    Code:
    /gsui/skin/fleet/images/TreeGrid/actions/find.png
    If I use an icon not borrowed from the skin, then it correctly uses our images directory.

    SmartClient Version: v8.2p_2012-08-23/PowerEdition Deployment (built 2012-08-23)
    Browser: Firefox 14.0.1

    #2
    The prefix "[SKIN]" is relative to the widget's image directory. Use "[SKINIMG]" to be relative to {skinbase}/images and ignore any widget-specific settings.

    Comment


      #3
      Thank you for the expedient response.

      I am having another issue with this TreeGrid.

      When I had it setup such that the root contained parent nodes that only had leaf nodes, everything worked well. However, when I changed it such that parents contained a leaf node, and one or more child nodes that contained children I started getting the following errors:
      Code:
      unnamed(isc_Selection_setSelecte) @ gsui/sc/modules/ISC_Grids.js:272
          unnamed(anonymou) @ gsui/sc/modules/ISC_Core.js:64
          unnamed(isc_Selection_setSelecte) @ gsui/sc/modules/ISC_Grids.js:284
          unnamed(anonymou) @ gsui/sc/modules/ISC_Core.js:64
          unnamed(isc_Selection_cacheSelectio) @ gsui/sc/modules/ISC_Grids.js:268
          unnamed(isc_Selection_isSelecte) @ gsui/sc/modules/ISC_Grids.js:258
          unnamed(isc_TreeGrid_getRowAriaStat) @ gsui/sc/modules/ISC_DataBinding.js:3587
          unnamed(anonymou) @ gsui/sc/modules/ISC_Grids.js:1056
          unnamed(isc_GridRenderer_getTableHTM) @ gsui/sc/modules/ISC_Grids.js:530
          unnamed(isc_GridRenderer_getInnerHTM) @ gsui/sc/modules/ISC_Grids.js:418
          unnamed(isc_c_Class_invokeSupe) @ gsui/sc/modules/ISC_Core.js:316
          unnamed(isc_c_Class_Supe) @ gsui/sc/modules/ISC_Core.js:308
          unnamed(isc_GridBody_getInnerHTM) @ gsui/sc/modules/ISC_Grids.js:931
          unnamed(isc_Canvas__getInnerHTM) @ gsui/sc/modules/ISC_Core.js:2125
          unnamed(isc_Canvas__updateInnerHTM) @ gsui/sc/modules/ISC_Core.js:2263
          unnamed(isc_c_Class_invokeSupe) @ gsui/sc/modules/ISC_Core.js:316
          unnamed(isc_GridRenderer__updateInnerHTM) @ gsui/sc/modules/ISC_Grids.js:457
          unnamed(isc_Canvas__updateHTM) @ gsui/sc/modules/ISC_Core.js:2250
          unnamed(isc_Canvas_redra) @ gsui/sc/modules/ISC_Core.js:2244
          unnamed(isc_c_Class_invokeSupe) @ gsui/sc/modules/ISC_Core.js:316
          unnamed(isc_GridRenderer_redra) @ gsui/sc/modules/ISC_Grids.js:881
          unnamed(isc_c_Class_invokeSupe) @ gsui/sc/modules/ISC_Core.js:316
          unnamed(isc_GridBody_redra) @ gsui/sc/modules/ISC_Grids.js:980
          unnamed(isc_c_Canvas_clearRedrawQueu) @ gsui/sc/modules/ISC_Core.js:3425
          unnamed(isc_c_Class_fireCallbac) @ gsui/sc/modules/ISC_Core.js:333
          unnamed(isc_c_Timer__fireTimeou) @ gsui/sc/modules/ISC_Core.js:1350
          unnamed() @ gsui/sc/modules/ISC_Core.js:1345
          unnamed() @
      The code for my tree:

      Everything works fine when there is only one parent under the root(see attached image). But when I try to add a second parent folder I get the errors above.

      Again, I had this tree working where I was able to have multiple parents with just leaf nodes, but adding child nodes that had parents exposed this issue. Any help you can provide would be greatly appreciated.
      Attached Files
      Last edited by jpappalardo; 24 Sep 2014, 09:21.

      Comment


        #4
        You've shown a stack trace for an error, but not the actual error. What was the error?

        Comment


          #5
          Sorry I missed the first line

          Code:
          15:49:45.655:RDQ2:WARN:Log:TypeError: _14 is undefined
              unnamed(isc_Selection_setSelecte) @ gsui/sc/modules/ISC_Grids.js:272
              unnamed(anonymou) @ gsui/sc/modules/ISC_Core.js:64
              unnamed(isc_Selection_setSelecte) @ gsui/sc/modules/ISC_Grids.js:284
              unnamed(anonymou) @ gsui/sc/modules/ISC_Core.js:64
              unnamed(isc_Selection_cacheSelectio) @ gsui/sc/modules/ISC_Grids.js:268
              unnamed(isc_Selection_isSelecte) @ gsui/sc/modules/ISC_Grids.js:258
              unnamed(isc_TreeGrid_getRowAriaStat) @ gsui/sc/modules/ISC_DataBinding.js:3587
              unnamed(anonymou) @ gsui/sc/modules/ISC_Grids.js:1056
              unnamed(isc_GridRenderer_getTableHTM) @ gsui/sc/modules/ISC_Grids.js:530
              unnamed(isc_GridRenderer_getInnerHTM) @ gsui/sc/modules/ISC_Grids.js:418
              unnamed(isc_c_Class_invokeSupe) @ gsui/sc/modules/ISC_Core.js:316
              unnamed(isc_c_Class_Supe) @ gsui/sc/modules/ISC_Core.js:308
              unnamed(isc_GridBody_getInnerHTM) @ gsui/sc/modules/ISC_Grids.js:931
              unnamed(isc_Canvas__getInnerHTM) @ gsui/sc/modules/ISC_Core.js:2125
              unnamed(isc_Canvas__updateInnerHTM) @ gsui/sc/modules/ISC_Core.js:2263
              unnamed(isc_c_Class_invokeSupe) @ gsui/sc/modules/ISC_Core.js:316
              unnamed(isc_GridRenderer__updateInnerHTM) @ gsui/sc/modules/ISC_Grids.js:457
              unnamed(isc_Canvas__updateHTM) @ gsui/sc/modules/ISC_Core.js:2250
              unnamed(isc_Canvas_redra) @ gsui/sc/modules/ISC_Core.js:2244
              unnamed(isc_c_Class_invokeSupe) @ gsui/sc/modules/ISC_Core.js:316
              unnamed(isc_GridRenderer_redra) @ gsui/sc/modules/ISC_Grids.js:881
              unnamed(isc_c_Class_invokeSupe) @ gsui/sc/modules/ISC_Core.js:316
              unnamed(isc_GridBody_redra) @ gsui/sc/modules/ISC_Grids.js:980
              unnamed(isc_c_Canvas_clearRedrawQueu) @ gsui/sc/modules/ISC_Core.js:3425
              unnamed(isc_c_Class_fireCallbac) @ gsui/sc/modules/ISC_Core.js:333
              unnamed(isc_c_Timer__fireTimeou) @ gsui/sc/modules/ISC_Core.js:1350
              unnamed() @ gsui/sc/modules/ISC_Core.js:1345
              unnamed() @

          Comment


            #6
            More Interestingly, I can keep adding nodes until I add one that has child nodes see attached image
            Attached Files

            Comment


              #7
              We can't see how this condition could arise..

              How are you adding nodes, Tree.add()?

              Are you adding nodes that already have children of their own, or adding each node one at a time?

              What's the exact situation where this happens? Adding a node to root that already has children of it's own?

              Comment


                #8
                This code is called everytime the underlying data structure for the tree is updated



                This listener then calls


                Which ultimately is this
                Last edited by jpappalardo; 24 Sep 2014, 09:22.

                Comment


                  #9
                  Missed one small detail in the above code
                  Last edited by jpappalardo; 24 Sep 2014, 09:22.

                  Comment


                    #10
                    It's not clear from looking at these code snippets and the source for the method in question exactly what's happening here.
                    At a guess this looks like somehow the data is invalid (for example the children property of a node being set to an array that contains null entries) - though of course your code snippet that creates the tree doesn't obviously indicate where this might be occurring.

                    Could you show us a test case we can run on our end that demonstrates the problem so we can actually see it in action and debug it?

                    Thanks
                    Isomorphic Software

                    Comment


                      #11
                      It was due to using an array based on the number of folders returned, and then filtering some of the folders out. Switching to a List fixed the issue.

                      For another question:





                      The records are removed from the tree without my override ever getting called? How can I catch a remove event?
                      Last edited by jpappalardo; 24 Sep 2014, 09:22.

                      Comment


                        #12
                        See the docs for canRemoveRecords for the correct way to do this.

                        Comment


                          #13
                          Reading that documentation was what led me to believe I could override removeRecordClick, can you help elaborate I must be missing something.

                          Comment


                            #14
                            If you want a confirmation dialog, you just set warnOnRemoval.

                            Otherwise if you want to do something more elaborate, you need to add your own field that calls removeRecordClick - it's not designed as an override point.

                            Comment

                            Working...
                            X