More Benefits of gwt-dispatch
Posted by David Chandler on September 25, 2009
When you use gwt-dispatch, a single dispatch servlet handles all service requests, so you no longer need to configure individual servlets in web.xml. Furthermore, action handlers are configured in Java code, like this:
bindHandler(FindPrayerListsAction.class, FindListsHandler.class); bindHandler(AddPrayerListAction.class, AddPrayerListHandler.class); bindHandler(DeletePrayerListsAction.class, DeletePrayerListsHandler.class);
Because all configuration is done in Java, you can rename any handler, Action, Result, etc., and the Eclipse refactoring tools automatically rename it everywhere.
And speaking of Eclipse, did you know you can type only the capital letters of a class name and hit Ctrl+Space to let Eclipse automatically expand it? For example, to type “FindPrayerListsAction” above, I could simply type “FPLA” and hit Ctrl+Space. This also works in the Open Type (Ctrl+Shift+T) and Open Resource (Ctrl+Shift+R) dialogs.
Leave a Reply