0

Is it possible to call GQL query inside a gwt application in the server's implementation something like:

SELECT * FROM User order by score desc

To be able to retrieve a sorted list ???I tested the query in databaseviewer and it returned the sorted list I was wondering if I can sort the entities automatically after updating the entities so I can include the query in the application.

1 Answers1

0

In your server part you can execute whatever you want. Of course that is true also for any server service provided in the GWT kit: RPC and RF.

But GWT is almost client side, hence the only way to call a remote procedure in your server, is using Ajax. So create a service method in your server side using RPC, RF, AutoBeans or any other JSON, XML, etc apprach. Then call that method from the client using Ajax (RPC, RF, RequestBuilder, etc).

The data transfered must be in a format understandable in client side, if you use RPC, RF or AutoBeans, that is almost out-of-the-box, for any other mechanism you are the responsible for the data-binding.

Said that, as you can see GWT uses the same architecture than any other JavaScript application. Except that in the case you use Java in server side you have some utilities for transfering data and calling remote methods.

Manolo Carrasco Moñino
  • 9,723
  • 1
  • 22
  • 27