added a listener in order to not change a table name. Class GxtBorderLayoutPanel changed.

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/databases-manager-portlet@99891 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Loredana Liccardo 2014-09-15 13:59:05 +00:00
parent a460e30453
commit d4165113b8
1 changed files with 17 additions and 5 deletions

View File

@ -1826,7 +1826,10 @@ public class GxtBorderLayoutPanel extends ContentPanel {
private void displayTableName(String tableName) {
rootLogger.log(Level.INFO, "displaying table name " + tableName
+ " in the panel");
Result table = new Result("Selected table", tableName);
final Result table = new Result("Selected table", tableName);
final ListStore<Result> store = new ListStore<Result>();
store.add(table);
// create column configuration
List<ColumnConfig> configs = new ArrayList<ColumnConfig>();
ColumnConfig column = new ColumnConfig();
@ -1842,13 +1845,22 @@ public class GxtBorderLayoutPanel extends ContentPanel {
TextField<String> textValue = new TextField<String>();
// text.setAllowBlank(false);
column.setEditor(new CellEditor(textValue));
// column.setEditor(new CellEditor(textValue));
column.setEditor(new CellEditor(textValue){
// public Object preProcessValue(Object value) {
// System.out.println("value 1: " + store.getModels().get(0).getValue());
// return store.getModels().get(0).getValue();
// }
public Object postProcessValue(Object value) {
// System.out.println("value: " + store.findModel(table).getValue());
return store.findModel(table).getValue();
}
});
configs.add(column);
ColumnModel cm = new ColumnModel(configs);
ListStore<Result> store = new ListStore<Result>();
store.add(table);
// grid
EditorGrid<Result> grid = new EditorGrid<Result>(store, cm);
// display information in the panel