Saturday, August 27, 2011

Re: To poll server when a event happens

public static void doWhatever(String id) { //doing

greetingService.greetServer(id,
new AsyncCallback<String>() {
public void onFailure(Throwable caught) {
// Show the RPC error message to the user
dialogBox
.setText("Remote Procedure Call - Failure");
serverResponseLabel
.addStyleName("serverResponseLabelError");
serverResponseLabel.setHTML(SERVER_ERROR);
dialogBox.center();
closeButton.setFocus(true);
}

public void onSuccess(String result) {
dialogBox.setText("Remote Procedure Call");
serverResponseLabel
.removeStyleName("serverResponseLabelError");
serverResponseLabel.setHTML(result);
dialogBox.center();
closeButton.setFocus(true);
}
});

}
public static native void defineBridgeMethod() /*-{
$wnd.doWhatever = function(id) {
$wnd.alert(id);
return @com.faceme.client.FaceMe::doWhatever(Ljava/lang/String;)
(id);
}
}-*/;


This is a code which i tried to do. But even the alert is not showing
when i call doWhatever from page


On Aug 27, 10:56 am, nishant mc <nishan...@gmail.com> wrote:
> Hi,
>
> My req is, I have a JS library which authenticates the user, After
> this event i have to load some data into the table. The table is a
> flextable.
> So what i was wondering is can i call a function in server via a
> javascript call which loads the data from database and fill values in
> the flextable.
>
> Please help me.
>
> Thanks and Regards,
>
> Nishant.M.C

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate