I have used PureMVC (pureMVC.org) which was *perfectly adapted* for my EXT / GWT / Hibernate application. I used Dozzer for mapping entity to pojo and @BEAN annotation (BeanModelMarker) to tell GXT to adapt with beanModel GXT.
I know that Seesmic (http://seesmic.com/) has also used this library. [1] My view with no logic, only getter and setter: *public class UserList extends LayoutContainer* * ....* * public void setGridContent(final List<BeanModel> stocks) {* * grid.getStore().add(stocks);* * }* * ...* * public BeanModel getSelectedRowObject() {* * return grid.getSelectionModel().getSelectedItem();* * }* [2] Mediator with generic UserList * public class UserListMediator extends Mediator<UserList>* * @Override* * public final String[] listNotificationInterests() {* * return new String[] {* * ApplicationFacadeConstants.NOTIFICATIONS.USERS_LOADED.name(),* * ApplicationFacadeConstants.NOTIFICATIONS.FAIL_LOADING_USERS.name()* * };* * }* *public void handleNotification(final INotification notification) {* * super.handleNotification(notification);* * final NOTIFICATIONS notificationEnum = ApplicationFacadeConstants.NOTIFICATIONS.valueOf(notification.getName());* * switch (notificationEnum) {* * case USERS_LOADED:* * public void handleEvent(final BaseEvent be) {* * * * final EVENTS event = ((Component) be.getSource()).getData(IConstants.EVENT);* * switch (event) {* * case ADD_USER_BUTTON_CLICKED:* * break;* * case ROW_USER_SELECTED:* * final BeanModel selectedItem = getViewComponent().getGrid()* * .getSelectionModel().getSelectedItem();* * logger.log(Level.INFO, "Row selected........." + selectedItem);* * break;* * * * * * public final void onRegister() {* * initView();* * super.onRegister();* * * * getViewComponent().getGrid().addListener(Events.RowClick, this);* * getViewComponent().getDeleteButton().addListener(Events.OnClick, this);* * getViewComponent().getNewButton().addListener(Events.OnClick, this);* [3] Proxy to manage list and selection *public class UserProxy extends Proxy * * * *// the row selection* *UserDTO getSelection()* *// all the rows* *List<UserDTO> getData()* ... Rodolphe -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
