Hi
If i directly call setLogoutURL and close() in the init nothing happens.
But if i call the setLogoutURL and close() using a button that i manually click on the redirect works.
Can’t i call the close when the application is started?
don’t work:
public void init() {
setMainWindow(new Window());
this.setLogoutURL("http://www.test.se");
this.close();
works:
w.addComponent(new Button("+",
new Button.ClickListener() {
public void buttonClick(ClickEvent event) {
w.getApplication().setLogoutURL("http://www.test.se");
w.getApplication().close();
}
}));
Yeah, that doesn’t work. You could put a timer in your app if you really want redirection after loading, but I don’t quite see the purpose.
If you want redirection, configure it in your web server or have a static HTML page that does redirecting. There’s no point in loading a Vaadin application to do that.
Ok, instead of having a timer could i have listen to some event.
What i’m trying to is integrate a Vaadin application with the facebook oauth and for that i need to redirect the user to https://graph.facebook.com/oauth/authorize?client_id=FACEBOOK_APP_ID &redirect_uri=" + redirect;
a setlogoutURL close() would be perfect but I think a executeJavaScript("window.location = …) also could work.
If you have any suggestions for a alternative solutions is appreciated