passing index parameter to RPCDataSource

Hello all,

It seems to be a trivial question, but I am new in smartgwt:)

I need an index setting for a gridlist in my form, which passing the new index value to server side. It works good on server side and client side (when I wired fix setting), but I cannot pass index value to executeFetch().

In form I try to call

grid.getDataSource().setProperty(“index”, index);

and in executeFetch() how can I get it, or what is the correct method to pass parameters to executeFetch ?

Unfortunately DSRequest is a Javascript object, so I cannot get any information from java debugger.

thx a lot
Zamek

Use Criteria and filterData

Hi Zamek!

I’m new too, then don’t see my answer authoritatively… But we need to try help each other, right? Hehehe!

First of all, what is a RPCDataSource? A new one, in the SmartClient 7.0 RC? I don’t have one here, and i’m using the smartgwt 1.0b3. Well, I’m using the RestDataSource, and to send data to server, I’m using the method grid.setFilterData(Criteria c). Very effective, and is solving my problems… A code example:

final Criteria criteria = new Criteria();
criteria.addCriteria("name", "John");
grid.filterData(criteria);

Good luck!

hi,

absolutely:)

This is a rpc based datasource, no need json, xml, and so on, only simple POJO-s coming from server.
here is a link to see:
http://www.google.com/codesearch/p?hl=en#GZ-Q1JarSMw/trunk/src/main/java/com/smartgwt/extensions/client/gwtrpcds/GwtRpcDataSource.java&q=lang:java%20datasource%20smartgwt

Oh yes, it’s good really.
thx a lot
Zamek