Okay. Here is my code:
>From the client side:
The proxy inerface:
// SelectionSearchService
package org.bcs.client.gui;
import com.google.gwt.user.client.rpc.RemoteService;
public interface SelectionSearchService extends RemoteService {
public String[][] findAllLikeThis(String[] serviceProviderRecord);
}
The Async interface:
// SelectionSearchServiceAsync
package org.bcs.client.gui;
import com.google.gwt.user.client.rpc.AsyncCallback;
public interface SelectionSearchServiceAsync {
public void findAllLikeThis(String[] serviceProviderRecord,
AsyncCallback callBack);
}
>From the server side:
The Async interface implementation:
package org.bcs.server;
import com.google.gwt.user.server.rpc.RemoteServiceServlet;
import org.bcs.client.gui.SelectionSearchService;
public class SelectionSearchServiceImpl extends RemoteServiceServlet
implements SelectionSearchService {
public String[][] findAllLikeThis ( String[] serviceProviderRecord )
{
String[] resultsList = new String[3][];
String[] strAry1 = {"Mary ", "had ", "a ", "little ", "lamb."};
resultsList[0] = strAry1;
String[] strAry2 = {"Its ", "fleece ", "was ", "white ", "as ",
"snow."};
resultsList[1] = strAry2;
String[] strAry3 = {"It ", "followed ", "her ", "everywhere."};
resultsList[2] = strAry3;
return resultsList;
}
} //End SelectionSearchServiceImpl
And again from the client side:
The creation of the proxy:
selectionSearchService = (SelectionSearchServiceAsync) GWT.create
(SelectionSearchService.class);
((ServiceDefTarget) selectionSearchService).setServiceEntryPoint
(GWT.getModuleBaseURL() +
"/selectionSearchService");
And the implementation of the callback (as an anonymous inner class):
selectionSearchCallBack = new AsyncCallback() {
public void onSuccess(Object result) {
selectionSearchMatches = (String[][]) result;
setMessage("Search succeeded.");
}
public void onFailure(Throwable caught) {
setMessage("Selection search failed. ");
}
};
I think that is all of the pieces. I look forward to your counsel.
Thanks.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---