Datasouce custom operations (methods0?

I saw datasource has 4 type of operation fetch ,add,remove,update.
Is possible to add some custom method to a datasource by extending it ?
I want to avoid creating a classic RPC call with asynch etc…
How can i do that using smartgwtee ?

i am interested in this also.
Is there a way to add other method then those 4 (add,remove,update,fetch)
to a datasource and to use that instead of creating a clasic RPC call. ?

What’s the use case for this - what gets simplified?

Hi,

Of course you can extend data source and add as many methods as you want. As far as I’ve understood - these 4 operation types (fetch, add, remove, update) are used by data bound components (ListGrid, DynamicForm and etc.) to manipulate data.
Are you going to use these (custom) methods manually (or in your created components)? Then it is OK.

If I missed your point - please elaborate on your idea.

Alius.

For example with regular GWT RPC i have to create Service,ServiceImpl,ServiceAsync,map in web.xml.

So for example a custome method that i woud implement in a ServiceImpl to implement in a DataSource class.

public List<SomeSerializableObject> getMeSomeData(Params…)

I plan to use the manaully…

But this is my choice i do not know ytreewsm what had in mind…

So i want to add a method on a spring object that is called by the datasource on client side or so…

Is it a problem? Service and ServiceAsync - simple interfaces … ServiceImpl - real implementation. BTW: instead of mapping in web.xml you can use @RemoteServiceRelativePath.

So - add this method to already existing Service,ServiceImpl,ServiceAsync classes.

In your ServiceImpl (server side) you can use any spring object.

Alius

well i kind of did such thing but i do not know if method i used is recommended one ??

http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/a783a1fffa1e965e

I injected beans via

ApplicationContext appContext =
WebApplicationContextUtils.getRequiredWebApplicationContext
(getServletContext());
someSpringBean = (SomeSpringBean) appContext.getBean
(“someSpringBean”);
}

About the original enhancement request - GWT-RPC does require a lot of work to get simple things done. But this is a reason to upgrade to SmartGWT Pro, which does a lot more with a lot less code, not a reason for Isomorphic to hack an already correct architecture.

SO how ?

Isomorphic

How that can be done without RPC using Pro edition ?

I saw there only 4 methods that are used by widgets …

how can i call a custom method manually from client that has it’s implementation on server side using PRO edition ?

Thank you !

The SmartClient RPCManager allows you to either write a servlet or specify what method you want called in an XML file (RPC DMI). No Impls vs Interfaces to write. No special rules for what classes can be sent as data to the browser.

Can you elaborate plz with a little little example.(or point a link to a ee sample if it si already done)

I saw that there is on DataSource some OP_CUSTOM is this related to that ?

THx a lot !

“The SmartClient RPCManager allows you to either write a servlet or specify what method you want called in an XML file (RPC DMI)”

Can you give me a sample of this ?

Thx

How could you pass arguments to the custom method?
Smart gwt ee server datasources are servlets, that take requests and return response, but if we to use non trivial (custom methods) we must create new datasource which is almost the same if we use rpc. We just want things that are impossible :).

isomorphic ?