Opened 10 years ago

Closed 10 years ago

#10783 closed defect (invalid)

Node id not propagated properly to JsonRestStore?

Reported by: Jean-Rubin Leonard Owned by:
Priority: high Milestone: tbd
Component: Dijit Version: 1.4.0
Keywords: jsonreststore post response identifier update Cc:
Blocked By: Blocking:

Description

Hi, I've been having this problem for a long time but it was too complicated for me to create a test file. It still is as it involves server/client dealing and maybe delays. Because of that I pup up my test URL where you can witness the issue. In a nutshell the issue is that I create an item in my tree. The JRS that backs the tree sends the request to the server. The server creates the item then returns the data in the response object along with a response code 201. So far so In the data hta is returned is the node id which i later use to update the tree item or to add a new tree node into the treenode htat was just addded.

The Problem is that in some cases the node_id property (which is my identifier) that is returned to the server is sometimes updated in the JRS and sometimes not. To witness and to reproduce this issue, please do the following.

  1. go to http://poolfinance.homeunix.com:1023/ .
  2. This will bring up a borderContainer. On the right region select a 'cost center grouping' or 'project portfolio' item into the tree under a 'simulation' tree node. This should add what you just dragged to the system both server side and client side. You can see this by checking whats sent ot the server and the response on firebug. If this has worked how it should and you click on the just added node, it should console 'a tree node was selected ' and the attributes of the node. In those attributes you should see the node_id (or a $ref).

If you do not see the node id nor no $ref, you will have successfully reproduced the bug. Any attempt to add a new node into that node will not work as the node id is undefined.

Please note that in the response of the post, the node_id was returned so theoretically the JRS should have been updated with it. I do not know if this is a timing issue that causes it. Hopefully my test case should be able to help bring the issue to your attention and hopefully bring a resolution.

This is the first of two issues that have been causing me some problems with the JRS for a while which I haven't been able to fix or to pinpoint the cause of. My test URL should be available for the next few days. Thanks in advance, J-R Leonard

Change History (2)

comment:1 Changed 10 years ago by Jean-Rubin Leonard

After further investigation, the node id, which is my tree's identifier was not propagated properly as an attribute of the JRS because It was returned to the server in an array. {node_id:0, node_name:foo}. For it to be retrieved properly it needs to be returned as an object {node_id:0, node_name:foo}. This ticket can be closed.

comment:2 Changed 10 years ago by bill

Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.