Hi,
How to pass a array having more than 100 values to server .
when i am passing an array of 150 values the i am getting bad request from server side.
how i will avoid that one in an efficient way.
i have something like that,
scond = [];//contains 150 value
store.load({
url : xyz.view,
params :{
sc : scond
}
});
I don't think this is really an ExtJS question. You need to devise the interface between you client and server and then implement accordingly.
At a guess you may be hitting a length limit for a GET request. You might have more luck switching to a POST but that's just dodging the more important problem that you're trying to pass huge quantities of data as part of a load request.
POST should handle it fine assuming he doesn't have a novel for each index. GET in IE is limited to ~2000 characters. Not sure about ie9 though. POST is a server setting usually in the meg range. I do agree that the amount of data should be limited if possible, but I can see there being a use-case for a 150 element array. Also, I would probably Ext.encode it. Passing arrays like that is ugly IMO.
POST should handle it fine assuming he doesn't have a novel for each index. GET in IE is limited to ~2000 characters. Not sure about ie9 though. POST is a server setting usually in the meg range. I do agree that the amount of data should be limited if possible, but I can see there being a use-case for a 150 element array. Also, I would probably Ext.encode it. Passing arrays like that is ugly IMO.
Hi Tim,
As I am passing an array
lets say myArray = [],
and My array contains [xyz,pqr,abc] like that
bt when i am encoding it lik,Ext.encode(myArray) it seems like ["xyz","pqr","abc"]
so i am getting an server side exception for encoding case
My mentioning encode wasn't really related to the issue you were having. Just a personal preference in the way to send it. You would then have to decode it on the server. To switch your store to post on read, you would use the following