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.
[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[] {
};
}
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