Hi,
I written two business method inside service class.
When I call these two methods inside client class, I have to write two
seperate block containing onSuccess, onFailure methods for each of the
business method in service class.
For Example see my service class below
------------------------------------------------------------------------------------------------------
public interface AccountsService extends RemoteService {
Vector getAvailbleAccounts();
Vector getSelectedAccounts();
}
------------------------------------------------------------------------------------------------------
Please find below my implementation (client) class for above two
methods
-----------------------------------------------------------------------------------------------------------------------------
AsyncCallback<Vector> callback = new AsyncCallback<Vector>() {
public void onFailure(Throwable caught) {
System.out.println("Inside getAvailbleAccounts Error ");
}
public void onSuccess(Vector result) {
System.out.println("Inside getAvailbleAccounts On Success ");
};
accountServiceSvc.getAvailbleAccounts(callback);
AsyncCallback<Vector> callback1 = new AsyncCallback<Vector>() {
public void onFailure(Throwable caught) {
System.out.println("Inside getSelectedAccounts Error ");
}
public void onSuccess(Vector result) {
System.out.println("Inside getSelectedAccounts On Success
");
}
};
accountServiceSvc.getSelectedAccounts(callback1);
-----------------------------------------------------------------------------------------------------------------------------
Is this the way of writting blocks for every business method in GWT
RPC?
Thanks
Arul
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---