(I posted this message yesterday and it wasn't accepted. If there is a reason
why this message is not appropriate for this forum can someone let me know why)
Hi there,
I've tried the following code on both Windows and OSX using Restlet M4 and the
GWT distribution. Both work fine in hosted mode, but once I click
Compile/Browse and check it in IE or Firefox it stops working. In the browsers
it simply says "Getting..." and never receives a response.
Not sure if I'm doing something wrong, but I would imagine if it works in
hosted mode it *should* work in compiled mode. Perhaps Restlet GWT is using
some language construct or class that cannot be translated into javascript?
getButton.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
label.setText("Getting...");
final Client client = new Client(Protocol.HTTP);
client.get("/items", new Uniform() {
@Override
public void handle(Request request, Response response, Uniform callback) {
try {
label.setText(response.getEntity().getText());
} catch (IOException e) {
e.printStackTrace();
}
}
});
}
});
------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2382832