-
7 Mar 2013 1:04 PM #1
[4.1.1a] Ext.data.TreeStore with Ext.data.proxy.Rest still does not pass ids right
[4.1.1a] Ext.data.TreeStore with Ext.data.proxy.Rest still does not pass ids right
I know this has been reported previously and has been reported as fixed (EXTJSIV-6005 in 4.1), however I'm still seeing the same issue:
On 4.1.1a, a TreeStore using a REST proxy should pass record ids (as well as the nodeParam) as part of the URL, like this: /path/to/ressource/<id>.
Instead, it passes the id as a query string parameter, like this: /path/to/ressource?node=<node>&id=<id>
Test Case:
"JSON" Data file to autoload:Code:<!doctype html> <!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en"> <![endif]--> <!--[if IE 7]> <html class="no-js ie7 oldie" lang="en"> <![endif]--> <!--[if IE 8]> <html class="no-js ie8 oldie" lang="en"> <![endif]--> <!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]--> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <title></title> <meta name="description" content=""> <meta name="author" content=""> <meta name="viewport" content="width=device-width,initial-scale=1"> <link rel="stylesheet" type="text/css" href="css/style.css"> <link rel="stylesheet" type="text/css" href="/libs/extjs-4.1.1/resources/css/ext-all.css"> <script src="/libs/modernizr-2.6.2.min.js"></script> <script src="/libs/respond.min.js"></script> </head> <body> <div id="tree-div"></div> <script src="/libs/jquery-1.8.3.min.js"></script> <script src="/libs/ext-4.1.1a/ext-all-debug-w-comments.js"></script> <script> Ext.require([ 'Ext.tree.*', 'Ext.data.*', 'Ext.tip.*' ]); Ext.onReady(function() { Ext.QuickTips.init(); var store = Ext.create('Ext.data.TreeStore', { proxy: { type: 'rest', url: 'JSON', pageParam: false, //to remove param "page" startParam: false, //to remove param "start" limitParam: false, //to remove param "limit" noCache: false, //to remove param "_dc" }, // idParam : "id", // nodeParam : "id", root: { text: 'Ext JS', expanded: true } }); var tree = Ext.create('Ext.tree.Panel', { store: store, renderTo: 'tree-div', height: 300, width: 250, useArrows: true }); }); </script> </body> </html>
Am I missing something in my configuration or has this been broken again?Code:[ { "text":"ExtJS","id":"RootNode","cls":"folder" }, { "text":"sencha-touch","id":"./SomeData","leaf":true,"cls":"file" }, { "text":"SenchaCmd","id":"./SomeMoreData","leaf":true,"cls":"file" }, { "text":"SenchaExtJS","id":"./And More Data","leaf":true,"cls":"file" }, { "text":"Touch","id":"root/Touch","cls":"folder" } ]
Thanks
MikeB
-
8 Mar 2013 6:32 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,624
- Vote Rating
- 435
No, it's sending the id correctly and also as a url parameter. It sends it like:
/path/to/resource/[id]?node=[id]&id=[id]
In 4.1.3+ it removed the id param
/path/to/resource/[id]?node=[id]Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
8 Mar 2013 8:19 AM #3
Thanks Mitchell, I thought the fix was put into 4.1.1 didn't realize it was in 4.1.3.
MikeB
Thank you for reporting this bug. We will make it our priority to review this report.


Reply With Quote