There are multiple options you could take. One would be to use something like spring and redirect to a separate url. Another might be to use code splitting and at the time of login, download the rest of the page. Finally, you could just download all the code in one module, whether the user is logged in or not.
On Monday, April 11, 2016 at 7:10:53 AM UTC-7, Olar Andrei wrote:
-- On Monday, April 11, 2016 at 7:10:53 AM UTC-7, Olar Andrei wrote:
Hello,I'm new to GWT and a I have a problem, which I don't understand quite well. I'm making a GWT application where a user is required to log in. So I do my stuff, by checking the username and password if they match and so on.But, on the onSuccess() method, what needs to be done in order to open the actual application ? I mean the current application is just the login screen with the DB connection. What needs to be done if they match, how do I open a new page, or a new application... ?I understood that GWT basically is just a one-page application. Then how should I do this ?Thanks in advance.
DBConnectionAsync rpcService = (DBConnectionAsync) GWT.create(DBConnection.class); ServiceDefTarget target = (ServiceDefTarget) rpcService;String moduleRelativeURL = GWT.getModuleBaseURL() + "DBConnectionImpl";target.setServiceEntryPoint(moduleRelativeURL); rpcService.authenticateUser("admin", "admin", new AsyncCallback<User>() { @Overridepublic void onSuccess(User result) {// What to do here ?}@Overridepublic void onFailure(Throwable caught) {// Failure}});
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment