Guys, Looks like the discussion for GWT to support this kind of Web 2.0/REST interaction is already being had but isn't available in 1.5. Gabriel as you say they are pointing people towards using Jetty continuations.
Thanks for your comments. Cheers. On Apr 7, 10:33 am, "[email protected]" <[email protected]> wrote: > On 7 Apr, 00:57, asif11 <[email protected]> wrote: > > > Thanks for the feedback Gabriel but this is GWT code and further is > > making multiple calls to the server. For each of your GWT calls you > > get a single callback. I am looking for a single call from the GWT > > client to result in several calls back. E.g. The server remembers some > > state and calls back with further data. > > > Maybe you can think of an easier way to do this ? > > Due to the way HTTP works, this is hard to do - HTTP is stateless, and > your backend is not geared to "remember" where to put data, after the > first request/response is done. Also, you might run into other issues > with closed ports, firewalls, and so on. What you seem to be needing > is either a stateful protocol (telnet?) or a solution as Garbriel > pointed out above. Remember, you dont really need to use much traffic > to poll for changes on the server. Also, it's a bit easier to manage > state, when only the client needs to keep track of it. > > > Cheers. > > > On Apr 6, 9:04 pm, Gabriel Ernesto Gutierrez Añez > > > <[email protected]> wrote: > > > well it shouldn't be that hard. > > > > i've made it using somehing like this > > > > private int i = 0; > > > > private AsyncCallback call = new AsynCallback(){ > > > public void onFailre(Throwable){...} > > > public void onSuccess(Object o){ > > > if(++i < 4){ > > > processResult(o); > > > init(); > > > } > > > } > > > > } > > > > public void init(){ > > > myservice.doOperation(call); > > > > } > > > > in this case the init() method gets called at the constructor, so when the > > > operation ends at server it came back at the onSuccess part and then I add > > > one to the variable, and then call it again if required. > > > > you might want to return some boolean value witch will tell you wheather > > > you > > > run the process again or not. > > > > If you could post some of the client-side code to check what are u doing > > > would be nice. > > > > Hope it helps, > > > > _____________________ > > > Ing. Gabriel Gutiérrez > > > Celular: +52 1 81 1071 7213 > > > Oficina: +52 81 8153 2415 > > > Monterrey, México > > > > On Mon, Apr 6, 2009 at 11:44 AM, asif11 <[email protected]> wrote: > > > > > Hi, > > > > > I am trying to get my server code to call my GWT code multiple times. > > > > e.g. > > > > > 1. GWT GUI Code calls GWTAsynInterface. > > > > 2. GWTAsynInterface calls JavaServerCode. > > > > 3. GWTAsynInterface completes call and returns to GWT GUI Code. > > > > 4. JavaServerCode calls GWT GUI Code again. > > > > > Step 1 to 3 are standard and work fine. But step 4 is what I need to > > > > do. > > > > > My scenario is to do with Paginated Data. e.g. GUI calls db for 100 > > > > rows. Server returns 25 rows at a time. I am fine with the server > > > > class being somewhat stateful. > > > > > Any suggestions ? > > > > > Cheers. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "GWT-Ext Developer Forum" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/gwt-ext?hl=en -~----------~----~----~----~------~----~------~--~---
