Announcement
Collapse
No announcement yet.
X
-
We are forced to implement a client-side data integration with a RESTFul backend that is external to SmartGWT server. That’s why we can’t use RestDataSource directly, but implemented a subclass that is basically configures the operation bindings to support the RESTFul style with different HTTP commands. Everything works if we create the DataSource programmatically. The goal is to be able to feed the custom RESTFul DataSource definitions from the server to the client in the same way SmartGWT DataSourceLoader does. Is it possible to use a class, that is a subclass of RestDataSource, without creating it in GWT (java), but use SmartClient API like isc.DataSource.create() that we can incorporate into a custom DataSourceLoader implementation?
-
Could you elaborate on your purpose here? Because you seem to be trying to achieve something which is already the default behavior:
1. UI components are already unaware of whether they are using a .ds.xml-based DataSource, RestDataSource, clientOnly DataSource or other type
2. All .ds.xml DataSources are already available via the RestDataSource protocol, via the built-in RestHandler servlet (see the QuickStart Guide entry on this)
If you have something further in mind, could you be more specific about what it is, and especially what benefits you are hoping for with your approach?
Leave a comment:
-
mixing builtin SmartGWT Server backed DataSources with subclass of RestDataSource
Hello,
We’re trying to design an approach that would allow us to seamlessly mix the standard SmartGWT DataSources with a custom subclass of RestDataSource within the same application. The idea is to be able to use SmartGWT server plus client-side data integration pattern in a way where the client is not aware which DataSource is a standard and which is a custom one. We were able to mimic the behavior of the DataSourceLoader by implementing a custom servlet that produces the DataSource config, but how should we call create() on the custom subclass instead of DataSource class? Would that RestDataSource subclass be accessible through the regular DataSource.get() call or we would have to implement a parallel API for REST DataSources?Tags: None
Leave a comment: