Announcement

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

    bug? while switching navigationPane with SplitPane.setNavigationPane

    SmartClient Version: v10.1p_2015-12-16/Enterprise Development Only (built 2015-12-16)

    I'm using the SplitPane.setNavigationPane method to switch a TreeGrid from a SplitPane to another SplitPane, as a navigationPane.
    First call to splitPane1.setNavigationPane(treeGrid) succeed, the treeGrid is shown.
    Second call to splitPane2.setNavigationPane(treeGrid) succeed, the treeGrid is shown in the 2nd splitPane.
    Third call to splitPane1.setNavigationPane(treeGrid) has no effect, the treeGrid is not shown in the 1st splitPane.

    As a test case, I can obtain a similar effect in the #responsiveDesignMobileSample sample:
    1. click on the handset tab
    2. run the following code:
    Code:
    isc_SplitPane_0.setNavigationPane(isc_TreeGrid_2)
    the treeGrid disappear
    3. run:
    Code:
    isc_SplitPane_2.setNavigationPane(isc_TreeGrid_2)
    the treeGrid is not shown again

    #2
    Your description above is a bit odd - you claim a second call to setNavigationPane() puts the TreeGrid in a second pane. This would not be expected.

    Did you have a thinko in that sentence somewhere?

    Can you confirm that what you want is just to replace the navigationPane widget, and not to populate 2 (or more) panes?

    Comment


      #3
      Actually I'm trying to use the same treeGrid as a navigationPane for two different SplitPanes.
      Maybe it's not a brilliant idea. Better to use two treeGrids, which, in my use case, will contain the same data.

      But I can confirm that I can 'move' the treeGrid from the first SplitPane to the second SplitPane, but, after that, not the other way round.

      Are you saying that usage of setNavigationPane is actually not legal?

      Comment


        #4
        The same component cannot appear in two different containers at the same time. This is true throughout the framework (and also in UI frameworks in general, pretty much, including HTML). It's not specific to SplitPane.

        If you have two SplitPanes where you want the same navigation options, this is already kind of odd (why not one splitPane where the other panes change?), but the right approach would be two TreeGrids that use the same DataSource (or same Tree).

        Comment


          #5
          Originally posted by Isomorphic View Post
          The same component cannot appear in two different containers at the same time. This is true throughout the framework (and also in UI frameworks in general, pretty much, including HTML). It's not specific to SplitPane.
          Yes sorry, I mean alternatively in one of the two splitPanes, not at the same time. So I was expecting that setNavigationPane assigned the treeGrid to one of the two splitPanes, alternatively.

          Comment


            #6
            When you provide the TreeGrid as the navigationPane for the second SplitPane, it basically gets yanked out of the first SplitPane (a clear() occurs). Technically, the first SplitPane should react to this properly, clean up and be ready for a new call to setNavigationPane() - it look like it doesn't. We'll take a note to fix this, but as this pattern is odd and rare (it looks like you've realized two TreeGrids are better anyway) it's going to be behind a number of other needed changes.

            Comment

            Working...
            X