bug fixed for operation related to the get tables list.
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/databases-manager-portlet@98597 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
8b53e63c90
commit
fee11d2183
|
@ -456,6 +456,18 @@ public class GxtBorderLayoutPanel extends ContentPanel {
|
|||
private void loadTables() {
|
||||
|
||||
// System.out.println("Start RPC - loadTables");
|
||||
|
||||
|
||||
//clean variable
|
||||
selectedTable = null;
|
||||
|
||||
// disable table details and sampling buttons
|
||||
toolbar.disableButtonsOperationsOnTable();
|
||||
|
||||
|
||||
//clean the panel
|
||||
centerBottom.removeAll();
|
||||
centerBottom.layout(true);
|
||||
|
||||
rootLogger.log(Level.SEVERE, "Start RPC - loadTables");
|
||||
|
||||
|
@ -982,63 +994,128 @@ public class GxtBorderLayoutPanel extends ContentPanel {
|
|||
|
||||
// listener to manage the table selection in the grid
|
||||
|
||||
tablesLoaded.getButtonById(Dialog.OK).addSelectionListener(
|
||||
new SelectionListener<ButtonEvent>() {
|
||||
Button ok = (Button) tablesLoaded.getButtonBar().getWidget(0);
|
||||
rootLogger.log(Level.INFO, "button: " + ok.getText());
|
||||
|
||||
Button cancel = (Button) tablesLoaded.getButtonBar().getWidget(1);
|
||||
rootLogger.log(Level.INFO, "button: " + cancel.getText());
|
||||
|
||||
ok.addSelectionListener(new SelectionListener<ButtonEvent>() {
|
||||
|
||||
@Override
|
||||
public void componentSelected(ButtonEvent ce) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
Listener<MessageBoxEvent> l = new Listener<MessageBoxEvent>() {
|
||||
|
||||
@Override
|
||||
public void componentSelected(ButtonEvent ce) {
|
||||
public void handleEvent(MessageBoxEvent be) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
// selectedTable = be.getValue().toString();
|
||||
// rootLogger.log(Level.INFO, "button clicked");
|
||||
|
||||
Listener<MessageBoxEvent> l = new Listener<MessageBoxEvent>() {
|
||||
|
||||
@Override
|
||||
public void handleEvent(MessageBoxEvent be) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
rootLogger.log(Level.INFO, "button clicked");
|
||||
|
||||
eventBus.fireEvent(new SelectedTableEvent());
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
if (selectedTable != null) {
|
||||
|
||||
// MessageBox.alert("Information",
|
||||
// "The table "+selectedTable+ " was selected",
|
||||
// null);
|
||||
|
||||
MessageBox.info("Information", "The table "
|
||||
+ selectedTable + " was selected", l);
|
||||
|
||||
// eventBus.fireEvent(new SelectedTableEvent());
|
||||
|
||||
} else {
|
||||
|
||||
// MessageBox.alert("Warning",
|
||||
// "No table "+selectedTable+ " was selected",
|
||||
// null);
|
||||
|
||||
MessageBox.info("Information",
|
||||
"No table was selected", null);
|
||||
|
||||
}
|
||||
eventBus.fireEvent(new SelectedTableEvent());
|
||||
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
// tablesLoaded.getButtonById("CANCEL").addSelectionListener(
|
||||
// new SelectionListener<ButtonEvent>() {
|
||||
//
|
||||
// @Override
|
||||
// public void componentSelected(ButtonEvent ce) {
|
||||
// // TODO Auto-generated method stub
|
||||
//
|
||||
// tablesLoaded.hide();
|
||||
//
|
||||
// }
|
||||
// });
|
||||
if (selectedTable != null) {
|
||||
|
||||
// MessageBox.alert("Information",
|
||||
// "The table "+selectedTable+ " was selected",
|
||||
// null);
|
||||
|
||||
MessageBox.info("Information", "The table " + selectedTable
|
||||
+ " was selected", l);
|
||||
|
||||
// eventBus.fireEvent(new SelectedTableEvent());
|
||||
|
||||
} else {
|
||||
|
||||
// MessageBox.alert("Warning",
|
||||
// "No table "+selectedTable+ " was selected",
|
||||
// null);
|
||||
|
||||
MessageBox.info("Information", "No table was selected",
|
||||
null);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
cancel.addSelectionListener(new SelectionListener<ButtonEvent>() {
|
||||
|
||||
@Override
|
||||
public void componentSelected(ButtonEvent ce) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
// selectedTable = null;
|
||||
|
||||
tablesLoaded.hide();
|
||||
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
// tablesLoaded.getButtonById(Dialog.OK).addSelectionListener(
|
||||
// new SelectionListener<ButtonEvent>() {
|
||||
//
|
||||
// @Override
|
||||
// public void componentSelected(ButtonEvent ce) {
|
||||
//
|
||||
// // selectedTable = be.getValue().toString();
|
||||
//
|
||||
// Listener<MessageBoxEvent> l = new Listener<MessageBoxEvent>() {
|
||||
//
|
||||
// @Override
|
||||
// public void handleEvent(MessageBoxEvent be) {
|
||||
// // TODO Auto-generated method stub
|
||||
//
|
||||
// rootLogger.log(Level.INFO, "button clicked");
|
||||
//
|
||||
// eventBus.fireEvent(new SelectedTableEvent());
|
||||
//
|
||||
// }
|
||||
// };
|
||||
//
|
||||
// if (selectedTable != null) {
|
||||
//
|
||||
// // MessageBox.alert("Information",
|
||||
// // "The table "+selectedTable+ " was selected",
|
||||
// // null);
|
||||
//
|
||||
// MessageBox.info("Information", "The table "
|
||||
// + selectedTable + " was selected", l);
|
||||
//
|
||||
// // eventBus.fireEvent(new SelectedTableEvent());
|
||||
//
|
||||
// } else {
|
||||
//
|
||||
// // MessageBox.alert("Warning",
|
||||
// // "No table "+selectedTable+ " was selected",
|
||||
// // null);
|
||||
//
|
||||
// MessageBox.info("Information",
|
||||
// "No table was selected", null);
|
||||
//
|
||||
// }
|
||||
//
|
||||
// }
|
||||
// });
|
||||
|
||||
// tablesLoaded.getButtonById("CANCEL").addSelectionListener(
|
||||
// new SelectionListener<ButtonEvent>() {
|
||||
//
|
||||
// @Override
|
||||
// public void componentSelected(ButtonEvent ce) {
|
||||
// // TODO Auto-generated method stub
|
||||
//
|
||||
// tablesLoaded.hide();
|
||||
//
|
||||
// }
|
||||
// });
|
||||
|
||||
tablesLoaded.show();
|
||||
|
||||
|
|
Loading…
Reference in New Issue