Announcement

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

    Reset PickTree resultree?

    Is there a way to do this? We have a tree that loadsdata on demand from a DMI. I want to be able to refresh a PickTree's resultTree onchange of another element in the same form. And thus, restarting the loaddataondemand feature again.

    In other words,

    1. Drill down on PickTree. LoadDataOnDemand allows for incremental fetches of data.
    2. Select a value on different form select item.
    3. Selection from #2 should destroy PickTree's ResultTree and allow for LoadDataOnDemand fetches to occur again and create a new ResultTree.

    Thanks

    #2
    I simply removed and readded the underlying canvas. Not sure if there's a better approach to this.

    Thanks

    Comment


      #3
      Very creative :) That is probably the best approach until we add some more APIs to this component.

      Comment


        #4
        Some more details welcome

        Could you please explain, how to remove and readd the underlying canvas? Calling destroy() and addAutoChild() maybe? But how without duplicating the private code from _createCanvas()?
        Or am I just too blind to see some other way?

        I also found another (old) forum post suggesting to call
        Code:
        pickTreeItem.canvas.getTree().invalidateCache()
        But this renders the pick tree non-functional afterwards - seems like this is not applicable anymore.

        Comment


          #5
          I had exactly this same issue and I am still struggling on how to refresh the tree associated to a IPickTreeItem. The examples provided do not cover this use case and from all I have read on the forums, the API is not prepared to do this. Any update on whether this will be supported or not ? Otherwise, this widget is somewhat useful but not as much as if you could dynamically refresh its content.
          Thanks !

          Eduardo.

          Comment


            #6
            We've now added support for this via a new API PickTreeItem.fetchData()
            The change will be present in nightly builds going forward

            Comment

            Working...
            X