|
|||||||
![]() |
|
|
Thread Tools |
|
#1
|
||||
|
||||
|
This is for Ext 2.x. Please see http://www.extjs.com/forum/showthread.php?p=343185 for the Ext 3.x compatible release.
DwrProxy is now part of a larger ExtJsWithDwr project on GitHub (see form post). What does this mean?
Where can I find the code? http://github.com/BigLep/ExtJsWithDw...ta/DwrProxy.js Why was this class created? I found Axel's DWRProxy class in this thread a great starting point for enabling me to have a combobox load data through DWR. There were a couple of issues though that I experienced and saw in the original thread and others. Those issues were:
There were the additional minor issues that:
Updates:
Last edited by loeppky; 10-22-2009 at 01:27 PM.. Reason: Announced GitHub ExtJsWithDwrProject |
|
#2
|
||||
|
||||
|
Here
|
|
#3
|
|||
|
|||
|
done like you wrote and got exception
Ext.ux.data has no properties proxy: new Ext.ux.data.DWRProxy({ can you help ? |
|
#4
|
|||
|
|||
|
I have a DWR remote method that returns a List of Person [name, surname].
I'd like to show them in a GridPanel. If I load the data thru a Store like this: var myReader = new Ext.data.ArrayReader({}, [
{name: 'name'},
{name: 'surname'}
]);
var myStore = new Ext.data.Store({
data: myPeople,
reader: myReader
});
But if I use a proxy like this: var dwrproxy = new Ext.ux.data.DWRProxy({
dwrFunction: MyDwrService.getPersone,
listeners: {
'beforeload': function(dataProxy, params){}
}
});
It does not work, that is, the grid gets rendered, but without any data. I see the people data list coming from the server passing thru my firfox firebug, and actually the the server gets called. What is wrong? I tried to use both this version of DwrProxy and the previous posted one, but none of them seems to work properly. Where am I wrong at ? thank you |
|
#5
|
||||
|
||||
|
Artem, the fact that "Ext.ux.data has no properties" suggests that you didn't create the namespace. Did you copy the first line of the DWRProxy class post: "Ext.namespace("Ext.ux.data");"?
|
|
#6
|
||||
|
||||
|
Timido,
What is the method signature of MyDwrService.getPersone? What parameters does it take, and what does it return? Also, note that your "beforeload" listener in the DWRProxy isn't doing anything, and thus is unnecessary. |
|
#7
|
|||
|
|||
|
Great job!
but i have some troubles could you tell me how to pass param by queryParam how to use the property of queryParam thanks |
|
#8
|
|||
|
|||
|
fix my exception, was in wrong path to dwrproxy.js.
cound you also say can i put data in GridPanel? with proxy |
|
#9
|
|||
|
|||
|
Quote:
public List getPersone() {
List persone = new ArrayList();
Persona p1 = new Persona("john", "smith");
Persona p2 = new Persona("andy", "garcia");
Persona p3 = new Persona("ricky", "martin");
Persona p4 = new Persona("ricky", "martin");
persone.add(p1);
persone.add(p2);
persone.add(p3);
persone.add(p4);
log.info("GET PERSONE");
return persone;
}
![]() Thank you for any hints ![]() |
|
#10
|
||||
|
||||
|
Quote:
'beforeload': function(dataProxy, params){
// setting the args that will get passed to the DWR function
params[dataProxy.loadArgsKey] = ['loeppkyIsMyUserId', params.differentQueryParam];
}
|
![]() |
| Thread Tools | |
|
|