Fixed DefNewColumnPanel
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-column-widget@96305 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
06619fc550
commit
6f0fab052d
|
@ -24,6 +24,8 @@ public class CreateDefColumnDialog extends Window {
|
||||||
|
|
||||||
public CreateDefColumnDialog(String id, TableType tableType,
|
public CreateDefColumnDialog(String id, TableType tableType,
|
||||||
EventBus eventBus) {
|
EventBus eventBus) {
|
||||||
|
super();
|
||||||
|
Log.debug("CreateDefColumnDialog [id: "+id+", tableType: "+tableType+"]");
|
||||||
this.eventBus = eventBus;
|
this.eventBus = eventBus;
|
||||||
this.tableType = tableType;
|
this.tableType = tableType;
|
||||||
initWindow();
|
initWindow();
|
||||||
|
|
|
@ -87,6 +87,7 @@ public class CreateDefColumnPanel extends FramedPanel {
|
||||||
public CreateDefColumnPanel(CreateDefColumnDialog parent, String id,
|
public CreateDefColumnPanel(CreateDefColumnDialog parent, String id,
|
||||||
TableType tableType, EventBus eventBus) {
|
TableType tableType, EventBus eventBus) {
|
||||||
super();
|
super();
|
||||||
|
Log.debug("CreateDefColumnPanel[parent: "+parent+", id: "+id+", tableType: "+tableType);
|
||||||
this.parent = parent;
|
this.parent = parent;
|
||||||
this.eventBus = eventBus;
|
this.eventBus = eventBus;
|
||||||
this.tableType = tableType;
|
this.tableType = tableType;
|
||||||
|
@ -95,18 +96,18 @@ public class CreateDefColumnPanel extends FramedPanel {
|
||||||
init();
|
init();
|
||||||
create();
|
create();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void init() {
|
protected void init() {
|
||||||
setWidth(WIDTH);
|
setWidth(WIDTH);
|
||||||
setHeight(HEIGHT);
|
setHeight(HEIGHT);
|
||||||
setHeaderVisible(false);
|
setHeaderVisible(false);
|
||||||
setBodyBorder(false);
|
setBodyBorder(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void initListeners(){
|
protected void initListeners() {
|
||||||
listeners=new ArrayList<CreateDefColumnListener>();
|
listeners = new ArrayList<CreateDefColumnListener>();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void create() {
|
protected void create() {
|
||||||
// Label
|
// Label
|
||||||
label = new TextField();
|
label = new TextField();
|
||||||
|
@ -240,7 +241,7 @@ public class CreateDefColumnPanel extends FramedPanel {
|
||||||
vPanel.add(form, new VerticalLayoutData(1, -1));
|
vPanel.add(form, new VerticalLayoutData(1, -1));
|
||||||
vPanel.add(flowButton, new VerticalLayoutData(1, -1, new Margins(1)));
|
vPanel.add(flowButton, new VerticalLayoutData(1, -1, new Margins(1)));
|
||||||
add(vPanel);
|
add(vPanel);
|
||||||
|
|
||||||
comboLocaleTypeLabel.setVisible(false);
|
comboLocaleTypeLabel.setVisible(false);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -255,6 +256,8 @@ public class CreateDefColumnPanel extends FramedPanel {
|
||||||
LocaleTypeElement localeElement = comboLocaleType.getCurrentValue();
|
LocaleTypeElement localeElement = comboLocaleType.getCurrentValue();
|
||||||
String valueDefault = defaultValue.getCurrentValue();
|
String valueDefault = defaultValue.getCurrentValue();
|
||||||
|
|
||||||
|
Log.debug("CheckValue: label: " + lab + ", type: " + typeElement
|
||||||
|
+ ", locale: " + localeElement + ", default: " + valueDefault);
|
||||||
if (lab == null || lab.isEmpty()) {
|
if (lab == null || lab.isEmpty()) {
|
||||||
UtilsGXT3.alert("Attention", "Add a label");
|
UtilsGXT3.alert("Attention", "Add a label");
|
||||||
return;
|
return;
|
||||||
|
@ -286,10 +289,11 @@ public class CreateDefColumnPanel extends FramedPanel {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DefNewColumn defNewColumn = new DefNewColumn(id, lab,
|
DefNewColumn defNewColumn = new DefNewColumn(id, lab, currentType,
|
||||||
currentType, localeName, valueDefault);
|
localeName, valueDefault);
|
||||||
|
Log.debug("DefNewColumn:" + defNewColumn);
|
||||||
fireCompleted(defNewColumn);
|
fireCompleted(defNewColumn);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void close() {
|
public void close() {
|
||||||
|
@ -395,12 +399,12 @@ public class CreateDefColumnPanel extends FramedPanel {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addListener(CreateDefColumnListener listener) {
|
public void addListener(CreateDefColumnListener listener) {
|
||||||
Log.debug("Add Listener:"+listener);
|
Log.debug("Add Listener:" + listener);
|
||||||
listeners.add(listener);
|
listeners.add(listener);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void removeListener(CreateDefColumnListener listener) {
|
public void removeListener(CreateDefColumnListener listener) {
|
||||||
Log.debug("Remove Listener:"+listener);
|
Log.debug("Remove Listener:" + listener);
|
||||||
listeners.remove(listener);
|
listeners.remove(listener);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue