Oops, the solution is so simple as I said above. It depends much on
your code.
If you need to some thing to test only, I modify my test code as
following - simply put other session requests inside the return of the
first one:
public class GetSession implements EntryPoint {
private final GetSessionServiceAsync myService = GWT.create
(GetSessionService.class);
public void onModuleLoad() {
final Label sessionLabel1 = new Label("Session1: ");
final Label sessionLabel2 = new Label("Session2: ");
final Label sessionLabel3 = new Label("Session3: ");
VerticalPanel vPanel = new VerticalPanel();
vPanel.add(sessionLabel1);
vPanel.add(sessionLabel2);
vPanel.add(sessionLabel3);
RootPanel.get().add(vPanel);
myService.getSessionId(new AsyncCallback<String>() {
@Override
public void onFailure(Throwable caught) { }
@Override
public void onSuccess(String result) {
sessionLabel1.setText("Session1: " + result);
myService.getSessionId(new
AsyncCallback<String>() {
@Override
public void onFailure(Throwable caught)
{ }
@Override
public void onSuccess(String result) {
sessionLabel1.setText("Session2: " + result);
}
});
myService.getSessionId(new
AsyncCallback<String>() {
@Override
public void onFailure(Throwable caught)
{ }
@Override
public void onSuccess(String result) {
sessionLabel2.setText("Session2: " + result);
}
});
myService.getSessionId(new
AsyncCallback<String>() {
@Override
public void onFailure(Throwable caught)
{ }
@Override
public void onSuccess(String result) {
sessionLabel3.setText("Session3: " + result);
}
});
}
});
}
}
On Nov 4, 8:58 pm, gwtfanb0y <[email protected]> wrote:
> Can you please provide your solution for the group?
>
> On 4 Nov., 04:05, XqSun <[email protected]> wrote:
>
>
>
> > Thank you a lot.
>
> > I modified my program so it will continue to ask sessions only after
> > the first call comes back already. Now it works as I want :)
>
> > Best regards,
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" 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/google-web-toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---