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,
|
||||
EventBus eventBus) {
|
||||
super();
|
||||
Log.debug("CreateDefColumnDialog [id: "+id+", tableType: "+tableType+"]");
|
||||
this.eventBus = eventBus;
|
||||
this.tableType = tableType;
|
||||
initWindow();
|
||||
|
|
|
@ -87,6 +87,7 @@ public class CreateDefColumnPanel extends FramedPanel {
|
|||
public CreateDefColumnPanel(CreateDefColumnDialog parent, String id,
|
||||
TableType tableType, EventBus eventBus) {
|
||||
super();
|
||||
Log.debug("CreateDefColumnPanel[parent: "+parent+", id: "+id+", tableType: "+tableType);
|
||||
this.parent = parent;
|
||||
this.eventBus = eventBus;
|
||||
this.tableType = tableType;
|
||||
|
@ -95,18 +96,18 @@ public class CreateDefColumnPanel extends FramedPanel {
|
|||
init();
|
||||
create();
|
||||
}
|
||||
|
||||
|
||||
protected void init() {
|
||||
setWidth(WIDTH);
|
||||
setHeight(HEIGHT);
|
||||
setHeaderVisible(false);
|
||||
setBodyBorder(false);
|
||||
}
|
||||
|
||||
protected void initListeners(){
|
||||
listeners=new ArrayList<CreateDefColumnListener>();
|
||||
|
||||
protected void initListeners() {
|
||||
listeners = new ArrayList<CreateDefColumnListener>();
|
||||
}
|
||||
|
||||
|
||||
protected void create() {
|
||||
// Label
|
||||
label = new TextField();
|
||||
|
@ -240,7 +241,7 @@ public class CreateDefColumnPanel extends FramedPanel {
|
|||
vPanel.add(form, new VerticalLayoutData(1, -1));
|
||||
vPanel.add(flowButton, new VerticalLayoutData(1, -1, new Margins(1)));
|
||||
add(vPanel);
|
||||
|
||||
|
||||
comboLocaleTypeLabel.setVisible(false);
|
||||
|
||||
}
|
||||
|
@ -255,6 +256,8 @@ public class CreateDefColumnPanel extends FramedPanel {
|
|||
LocaleTypeElement localeElement = comboLocaleType.getCurrentValue();
|
||||
String valueDefault = defaultValue.getCurrentValue();
|
||||
|
||||
Log.debug("CheckValue: label: " + lab + ", type: " + typeElement
|
||||
+ ", locale: " + localeElement + ", default: " + valueDefault);
|
||||
if (lab == null || lab.isEmpty()) {
|
||||
UtilsGXT3.alert("Attention", "Add a label");
|
||||
return;
|
||||
|
@ -286,10 +289,11 @@ public class CreateDefColumnPanel extends FramedPanel {
|
|||
}
|
||||
}
|
||||
|
||||
DefNewColumn defNewColumn = new DefNewColumn(id, lab,
|
||||
currentType, localeName, valueDefault);
|
||||
DefNewColumn defNewColumn = new DefNewColumn(id, lab, currentType,
|
||||
localeName, valueDefault);
|
||||
Log.debug("DefNewColumn:" + defNewColumn);
|
||||
fireCompleted(defNewColumn);
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void close() {
|
||||
|
@ -395,12 +399,12 @@ public class CreateDefColumnPanel extends FramedPanel {
|
|||
}
|
||||
|
||||
public void addListener(CreateDefColumnListener listener) {
|
||||
Log.debug("Add Listener:"+listener);
|
||||
Log.debug("Add Listener:" + listener);
|
||||
listeners.add(listener);
|
||||
}
|
||||
|
||||
public void removeListener(CreateDefColumnListener listener) {
|
||||
Log.debug("Remove Listener:"+listener);
|
||||
Log.debug("Remove Listener:" + listener);
|
||||
listeners.remove(listener);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue