Is there a recommended way to use the Observer pattern in MVP using GWT?

Program Structure This is how I did it. The Eventbus lets presenters (extending the abstract class Subscriber) subscribe to events belonging to different modules in my app. Each module corresponds to a component in my system, and each module has an event type, a presenter, a handler, a view and a model. A presenter subscribing … Read more

Multiple pages tutorial in Google Web Toolkit (GWT)

What I usually do in situations like this is design the webpage framework first. I’ll have a div for the header, side menu and footer. I’ll also have a div in my HTML for the main content. Example: <html xmlns=”http://www.w3.org/1999/xhtml”> <head> <meta name=”gwt:module” content=”org.project.package.Core=org.project.package.Core”> </head> <body> <!– Load the JavaScript code for GWT –> <script … Read more

Best GWT widget library? [closed]

Do not bind yourself to ANY of these libraries. Use Vanilla GWT to create the structure of your project. In particular, use the MVP pattern and an Event Bus. Please, see google article to know how to best design your client application with GWT: Building MVP apps After, you can use any widget of these … Read more

“Servlet” (server-side) initialization code in GWT

You can add like mentioned in a comment a ServletContextListener. public class ServerConfig implements ServletContextListener { public void contextInitialized(ServletContextEvent event) { // Do stuff on startup. } public void contextDestroyed(ServletContextEvent event) { // Do stuff on shutdown. } } Now put the new class on the server side, you also ave to register the Listener … Read more

ClassNotFoundException: org.slf4j.LoggerFactory

Better to always download as your first try, the most recent version from the developer’s site I had the same error message you had, and by downloading the jar from the above (slf4j-1.7.2.tar.gz most recent version as of 2012OCT13), untarring, uncompressing, adding 2 jars to build path in eclipse (or adding to classpath in comand … Read more

GWT module may need to be (re)compiled REDUX

Have you started the DevMode using your src/main/webapp as the “war folder”? or in other words, is there a *.nocache.js in your src/main/webapp? In that case, this file will overwrite the one produced by the GWT compiler as called by the gwt-maven-plugin. The *.nocache.js generated by the DevMode (when no one exists, generated by a … Read more

HTMLUnit doesn’t wait for Javascript

Thank you for responding. I actually should have reported this sooner that I have found the solution myself. Apparently when initialising WebClient with FF: WebClient webClient = new WebClient(BrowserVersion.FIREFOX_3_6); It seem to be working. When initialising WebClient with the default constructor it uses IE7 by default and I guess FF has better support for Ajax … Read more

GWT: Timer and Scheduler Classes

Use Scheduler when you need a browser to complete whatever it is currently doing before you tell it to do something else. For example: myDialogBox.show(); Scheduler.get().scheduleDeferred(new ScheduledCommand() { @Override public void execute() { myTextBox.setFocus(); } }); In this example, focus will not be set until the browser completes rendering of the dialog, so you tell … Read more

tech