Announcement

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

    Set value on PickTreeItem whith custom datasource

    SmartClient Version: v8.3p_2013-03-26/Pro Deployment (built 2013-03-26)
    developer mode, firefox 13.0

    When using a PickTree with a custom datasource I noticed that I can't set the value of the item.
    When I set the value while the tree is busy fetching the root nodes the rpc.send(dsRequest, dsResponse); call results in a nullpointer exception.
    When I add a button and set the value later it works fine.

    I can see in my log that the root nodes are requested and that the specific node is requested and both calls are executed at the same time. The node is returned but the tree will be empty.

    Is there a way to know when the tree has fetched the root node (and delay the setValue())?

    #2
    Can you show how you can reproduce this NullPointerException with a valid DataSource? If it's a framework issue, you should be able to just modify a sample to show it.

    Comment


      #3
      I was hoping that it's a known problem

      I was hoping that it's a known problem, don't have the time at the moment to change the custom datasource sample to a tree view form item.
      I will do it in my free time if I can get some sort of confirmation that it will be looked at?
      The simple patch would be a way to prevent the form item/data source executing two fetch methods at the same time. Is there a way to do that?
      For now I changed the form item to a menu item and I change the title of the menu item to show the current record.

      Comment


        #4
        In general, when people provide clear bug reports with all required information, we look at them. We look at them based on how severe they are (and users with Support come first).

        This is not a known problem.

        We can't suggest a way to patch this, since it's not even clear it's a real issue yet.

        Comment


          #5
          Ok let me rephrase

          Ok, let me rephrase the question; is there a handler I can use what is executed when the fetch is finished for the parent nodes of a treeitem?

          Comment


            #6
            No, there isn't such a notification at the moment (and it shouldn't be needed for this use case). It would be possibly to detect that at the DataSource level (eg transformResponse) but the better approach is to isolate the problem.

            Comment

            Working...
            X