Results 1 to 3 of 3

Thread: Building Tree using complex scenario

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Sencha User
    Join Date
    Aug 2012
    Posts
    42
    Vote Rating
    0
      0  

    Default Building Tree using complex scenario

    Client-A
    Doctors --
    Documents--
    Client-B
    Doctors --
    Documents--
    Documents--

    This simple is unable to build after I look at the request factory binding examples and experiment with simple tree example but no luck. I may be misunderstanding the concept of building the tree. Here is the exception after run the tree java.

    Caused by: com.google.gwt.event.shared.UmbrellaException: Exception caught: The given model is already in the TreeStore, and should not be assigned a new node
    at com.google.gwt.event.shared.EventBus.castFireEvent(EventBus.java:69)
    at com.google.gwt.event.shared.SimpleEventBus.fireEvent(SimpleEventBus.java:57)
    at com.sencha.gxt.data.shared.loader.Loader.fireEvent(Loader.java:207)
    at com.sencha.gxt.data.shared.loader.TreeLoader.onLoadSuccess(TreeLoader.java:85)
    at com.sencha.gxt.data.shared.loader.TreeLoader.onLoadSuccess(TreeLoader.java:1)
    at com.sencha.gxt.data.shared.loader.Loader$1.onSuccess(Loader.java:228)

    I noticed one thing that if invoke clients have children of Doctors and Doctors have children of Agreements and Agreements have children of Documents. Is that stating the error. Can I get some sample code snipet on this scenario.

  2. #2
    Sencha User
    Join Date
    Aug 2012
    Posts
    42
    Vote Rating
    0
      0  

    Default

    I got the solution now.

  3. #3
    Sencha - GXT Dev Team
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,737
    Vote Rating
    93
      0  

    Default

    The solution is that two nodes in a TreeStore must not share the same ID - doing so is telling the TreeStore that the hierarchy contains a single item in two different places, which doesn't really make sense - which are 'its' children, or is the entire subtree from there duplicated? And which is its parent, since it has two?

    In the future ramgovind, please consider elaborating on the solution, even when you find it yourself - it makes it easier for future users to find the answers to their own questions when they search

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •