Opened 7 years ago

Closed 6 years ago

Last modified 6 years ago

#15145 closed defect (fixed)

[patch][cla] allowNoTrailingSlash & onSet event in JsonRestStore

Reported by: adros Owned by: Kris Zyp
Priority: high Milestone: 1.9
Component: DojoX Data Version: 1.7.2
Keywords: Cc:
Blocked By: Blocking:

Description

If I create a JsonRestStore? with allowNoTrailingSlash set to true, the "onSet" event is not called after calling setValue method. I think it is because of _getStoreForItem, which creates new instance of the store.

I have attached a sample and also a json file, which can simulate the service.

Attachments (3)

sample.html (876 bytes) - added by adros 7 years ago.
service.json (42 bytes) - added by adros 7 years ago.
patch.txt (586 bytes) - added by juk 7 years ago.

Download all attachments as: .zip

Change History (7)

Changed 7 years ago by adros

Attachment: sample.html added

Changed 7 years ago by adros

Attachment: service.json added

comment:1 Changed 7 years ago by juk

The problem is caused by handling of URLs without trailing slash. At the time of constructing items from raw data (in dojox/rpc/JsonRest.resolveJson), allowNoTrailingSlash setting is disregarded when resolving idPrefix.

I think that store with target "/abc/def" (and allowNoTrailingSlash == true) should produce items with __id attribute "/abc/def/id" i.e. the same as when using "/abc/def/".
See proposed patch.

Changed 7 years ago by juk

Attachment: patch.txt added

comment:2 Changed 6 years ago by dylan

Summary: allowNoTrailingSlash & onSet event in JsonRestStore[patch][cla] allowNoTrailingSlash & onSet event in JsonRestStore

comment:3 Changed 6 years ago by Kris Zyp

Resolution: fixed
Status: newclosed

In [30764]:

Properly handle trailing slashes, fixes #15145 !strict

comment:4 Changed 6 years ago by dylan

Milestone: tbd1.9
Priority: undecidedhigh
Note: See TracTickets for help on using tickets.