Hello,
I Have a store with extraParams who contain an ID. I would like to pass the ID at the end of the url store.
I have:
Code:
WPApp.stores.DirectoryCategoryListStore = new Ext.data.Store({
model: "WPApp.models.DirectoryCategoryListModel",
proxy: {
type: 'ajax',
url: "http://localhost:8888/WPapp/app/php/getCategoryList.php",
reader: {
type: 'json'
}
},
setId: function (id) {
this.itemId = id;
},
extraParams: {
id: this.itemId,
},
autoLoad: true
});
I would like to have if this.itemId = 2
HTML Code:
url: "http://localhost:8888/WPapp/app/php/getCategoryList.php?id=2"
when i put the url like that with raw values, it's working.
i tried to concat the variable to URL, and create a new extra param with the url, but don't work.
In my PHP file, the URL, i have:
Code:
$id = $_GET['id'];
$request = "SELECT * FROM CategoryList WHERE IDBASELIST = $id";
echo (getJsonString($request, $dbName));
I don't really understand how i can give this extra Params to my URL
Someone can help me please?