The following text is what I got from GWT's RCP notes, <http://
code.google.com/webtoolkit/documentation/
com.google.gwt.doc.DeveloperGuide.RemoteProcedureCalls.html>
"For the same reason, asynchronous methods do not have return types;
they must always return void."
So, to use a method with an RPC, am I just doing the following?
in .../client/table.java
public void Request() /* Makes RPC */
{
table = (tableServiceAsync)GWT.create(tableService.class);
ServiceDefTarget endpoint = (table)threatBoard;
endpoint.setServiceEntryPoint(GWT.getModuleBaseURL() +
"table");
}
public void onModuleLoad() {
...
// call loadFromTable using RPC
threatBoard.loadFromSQL(new AsyncCallback()
{
public void onSuccess(Object result)
{
return;
}
public void onFailure(Throwable caught)
{
return;
}
});
// all business logic is in .../server/tableImpl
I'm lost, please guide me.
Thanks
On Sep 10, 4:46 pm, "Jeremiah Elliott" <[EMAIL PROTECTED]> wrote:
> Why make the rpc return void? Just have it return your collection.
>
>
>
> On Wed, Sep 10, 2008 at 3:17 PM, Kevin <[EMAIL PROTECTED]> wrote:
>
> > Hi,
>
> > I created a GWT FlexTable, "table", and a SQL database, "database".
> > The table adds a row of editable cells and removes a specified row. I
> > wrote two functions: loadFromSQL and loadFromTable. The first copies
> > what's in the database to the table. The latter copies what's in the
> > table to the database.
>
> > I tried to use SQL commands in my java driver under the "client"
> > directory, however no SQL support is available. After that I knew I'd
> > have to use RPC's. So, basically my question is, how to implement my
> > static database class from an RPC?
>
> > Assuming GWT supported SQL, I'd type v = D.loadFromSQL(); (assume
> > loadFromSQL outputs a vector). Then I'd parse v, filling up the
> > table.
>
> > With the RPC's, I don't know what should be returned when using a
> > "void" async method.
>
> > Please give me some guidance.
>
> > Thanks,
> > Kevin- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---