private void buildMenuBar() {
this.menus = MenuFactory.newTopLevelMenu( AppConstants.INSTANCE.Upload() )
.respondsWith( new Command() {
@Override
public void execute() {
final UploadForm uploadForm = iocManager.lookupBean( UploadForm.class ).getInstance();
//When pop-up is closed destroy bean to avoid memory leak
uploadForm.addCloseHandler( new CloseHandler<PopupPanel>() {
@Override
public void onClose( CloseEvent<PopupPanel> event ) {
iocManager.destroyBean( uploadForm );
}
} );
uploadForm.show();
}
} )
.endMenu()
.newTopLevelMenu( AppConstants.INSTANCE.Refresh() )
.respondsWith( new Command() {