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:
Loredana Liccardo 2014-07-14 12:59:12 +00:00
parent 8b53e63c90
commit fee11d2183
1 changed files with 127 additions and 50 deletions

View File

@ -457,6 +457,18 @@ public class GxtBorderLayoutPanel extends ContentPanel {
// System.out.println("Start RPC - 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"); rootLogger.log(Level.SEVERE, "Start RPC - loadTables");
// to mask the entire content panel // to mask the entire content panel
@ -982,13 +994,17 @@ public class GxtBorderLayoutPanel extends ContentPanel {
// listener to manage the table selection in the grid // listener to manage the table selection in the grid
tablesLoaded.getButtonById(Dialog.OK).addSelectionListener( Button ok = (Button) tablesLoaded.getButtonBar().getWidget(0);
new SelectionListener<ButtonEvent>() { 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 @Override
public void componentSelected(ButtonEvent ce) { public void componentSelected(ButtonEvent ce) {
// TODO Auto-generated method stub
// selectedTable = be.getValue().toString();
Listener<MessageBoxEvent> l = new Listener<MessageBoxEvent>() { Listener<MessageBoxEvent> l = new Listener<MessageBoxEvent>() {
@ -996,7 +1012,7 @@ public class GxtBorderLayoutPanel extends ContentPanel {
public void handleEvent(MessageBoxEvent be) { public void handleEvent(MessageBoxEvent be) {
// TODO Auto-generated method stub // TODO Auto-generated method stub
rootLogger.log(Level.INFO, "button clicked"); // rootLogger.log(Level.INFO, "button clicked");
eventBus.fireEvent(new SelectedTableEvent()); eventBus.fireEvent(new SelectedTableEvent());
@ -1009,8 +1025,8 @@ public class GxtBorderLayoutPanel extends ContentPanel {
// "The table "+selectedTable+ " was selected", // "The table "+selectedTable+ " was selected",
// null); // null);
MessageBox.info("Information", "The table " MessageBox.info("Information", "The table " + selectedTable
+ selectedTable + " was selected", l); + " was selected", l);
// eventBus.fireEvent(new SelectedTableEvent()); // eventBus.fireEvent(new SelectedTableEvent());
@ -1020,14 +1036,75 @@ public class GxtBorderLayoutPanel extends ContentPanel {
// "No table "+selectedTable+ " was selected", // "No table "+selectedTable+ " was selected",
// null); // null);
MessageBox.info("Information", MessageBox.info("Information", "No table was selected",
"No table was selected", null); 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( // tablesLoaded.getButtonById("CANCEL").addSelectionListener(
// new SelectionListener<ButtonEvent>() { // new SelectionListener<ButtonEvent>() {
// //