ref 6078:TDM - Create a new widget to support operations's invocation on DataMiner
https://support.d4science.org/issues/6078 Updated to support DataMiner git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/widgets/data-miner-manager-widget@146465 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
99602386b2
commit
da00f0e4e3
|
@ -9,7 +9,7 @@ import com.google.gwt.event.shared.HandlerRegistration;
|
||||||
import com.google.gwt.event.shared.HasHandlers;
|
import com.google.gwt.event.shared.HasHandlers;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Start Computation Event
|
* TabularFldChangeEvent
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* @author "Giancarlo Panichi" <a
|
* @author "Giancarlo Panichi" <a
|
||||||
|
|
|
@ -45,6 +45,7 @@ public class ColumnFld extends AbstractFld implements
|
||||||
|
|
||||||
private SimpleContainer fieldContainer;
|
private SimpleContainer fieldContainer;
|
||||||
private SimpleContainer vContainer;
|
private SimpleContainer vContainer;
|
||||||
|
private TableItemSimple tableItemSimple;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param parameter
|
* @param parameter
|
||||||
|
@ -77,13 +78,15 @@ public class ColumnFld extends AbstractFld implements
|
||||||
HtmlLayoutContainer descr;
|
HtmlLayoutContainer descr;
|
||||||
|
|
||||||
if (columnParameter.getDescription() == null) {
|
if (columnParameter.getDescription() == null) {
|
||||||
descr = new HtmlLayoutContainer("<p style='margin-left:5px !important;'></p>");
|
descr = new HtmlLayoutContainer(
|
||||||
|
"<p style='margin-left:5px !important;'></p>");
|
||||||
descr.addStyleName("workflow-fieldDescription");
|
descr.addStyleName("workflow-fieldDescription");
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
//comboBox.setToolTip(columnParameter.getDescription());
|
// comboBox.setToolTip(columnParameter.getDescription());
|
||||||
descr = new HtmlLayoutContainer("<p style='margin-left:5px !important;'>"
|
descr = new HtmlLayoutContainer(
|
||||||
+ columnParameter.getDescription() + "</p>");
|
"<p style='margin-left:5px !important;'>"
|
||||||
|
+ columnParameter.getDescription() + "</p>");
|
||||||
descr.addStyleName("workflow-fieldDescription");
|
descr.addStyleName("workflow-fieldDescription");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -130,8 +133,20 @@ public class ColumnFld extends AbstractFld implements
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String getValue() {
|
public String getValue() {
|
||||||
ColumnItem columnItem = comboBox.getCurrentValue();
|
if (tableItemSimple == null) {
|
||||||
return columnItem != null ? columnItem.getName() : null;
|
return null;
|
||||||
|
} else {
|
||||||
|
ColumnItem columnItem = comboBox.getCurrentValue();
|
||||||
|
if (columnItem == null) {
|
||||||
|
return null;
|
||||||
|
} else {
|
||||||
|
if (tableItemSimple.isTabularResource()) {
|
||||||
|
return columnItem.getId();
|
||||||
|
} else {
|
||||||
|
return columnItem.getName();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -149,7 +164,7 @@ public class ColumnFld extends AbstractFld implements
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onChange(TabularFldChangeEvent event) {
|
public void onChange(TabularFldChangeEvent event) {
|
||||||
TableItemSimple tableItemSimple = event.getTableItemSimple();
|
tableItemSimple = event.getTableItemSimple();
|
||||||
if (tableItemSimple == null) {
|
if (tableItemSimple == null) {
|
||||||
store.clear();
|
store.clear();
|
||||||
store.commitChanges();
|
store.commitChanges();
|
||||||
|
@ -164,16 +179,15 @@ public class ColumnFld extends AbstractFld implements
|
||||||
if (columns != null) {
|
if (columns != null) {
|
||||||
store.addAll(columns);
|
store.addAll(columns);
|
||||||
store.commitChanges();
|
store.commitChanges();
|
||||||
Log.debug("DefaultColumn: "+defaultColumn);
|
Log.debug("DefaultColumn: " + defaultColumn);
|
||||||
for (ColumnItem columnItem : columns) {
|
for (ColumnItem columnItem : columns) {
|
||||||
Log.debug("ColumnItem: "+ columnItem);
|
Log.debug("ColumnItem: " + columnItem);
|
||||||
if (columnItem.getName().compareToIgnoreCase(defaultColumn) == 0) {
|
if (columnItem.getName().compareToIgnoreCase(defaultColumn) == 0) {
|
||||||
comboBox.setValue(columnItem);
|
comboBox.setValue(columnItem);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
comboBox.setEnabled(true);
|
comboBox.setEnabled(true);
|
||||||
showFieldWithSelection(tableItemSimple);
|
showFieldWithSelection(tableItemSimple);
|
||||||
|
|
|
@ -50,7 +50,7 @@ public class ColumnListFld extends AbstractFld implements
|
||||||
@XTemplate("<span title=\"{value}\">{value}</span>")
|
@XTemplate("<span title=\"{value}\">{value}</span>")
|
||||||
SafeHtml format(String value);
|
SafeHtml format(String value);
|
||||||
}
|
}
|
||||||
|
|
||||||
// private VerticalLayoutContainer vp;
|
// private VerticalLayoutContainer vp;
|
||||||
private ColumnListParameter columnListParameter;
|
private ColumnListParameter columnListParameter;
|
||||||
private ListStore<ColumnItem> store;
|
private ListStore<ColumnItem> store;
|
||||||
|
@ -58,6 +58,7 @@ public class ColumnListFld extends AbstractFld implements
|
||||||
private CheckBoxSelectionModel<ColumnItem> sm;
|
private CheckBoxSelectionModel<ColumnItem> sm;
|
||||||
private SimpleContainer fieldContainer;
|
private SimpleContainer fieldContainer;
|
||||||
private SimpleContainer vContainer;
|
private SimpleContainer vContainer;
|
||||||
|
private TableItemSimple tableItemSimple;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -79,13 +80,15 @@ public class ColumnListFld extends AbstractFld implements
|
||||||
HtmlLayoutContainer descr;
|
HtmlLayoutContainer descr;
|
||||||
|
|
||||||
if (columnListParameter.getDescription() == null) {
|
if (columnListParameter.getDescription() == null) {
|
||||||
descr = new HtmlLayoutContainer("<p style='margin-left:5px !important;'></p>");
|
descr = new HtmlLayoutContainer(
|
||||||
|
"<p style='margin-left:5px !important;'></p>");
|
||||||
descr.addStyleName("workflow-fieldDescription");
|
descr.addStyleName("workflow-fieldDescription");
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
//grid.setToolTip(columnListParameter.getDescription());
|
// grid.setToolTip(columnListParameter.getDescription());
|
||||||
descr = new HtmlLayoutContainer("<p style='margin-left:5px !important;'>"
|
descr = new HtmlLayoutContainer(
|
||||||
+ columnListParameter.getDescription() + "</p>");
|
"<p style='margin-left:5px !important;'>"
|
||||||
|
+ columnListParameter.getDescription() + "</p>");
|
||||||
descr.addStyleName("workflow-fieldDescription");
|
descr.addStyleName("workflow-fieldDescription");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -104,7 +107,7 @@ public class ColumnListFld extends AbstractFld implements
|
||||||
|
|
||||||
ColumnConfig<ColumnItem, String> labelCol = new ColumnConfig<ColumnItem, String>(
|
ColumnConfig<ColumnItem, String> labelCol = new ColumnConfig<ColumnItem, String>(
|
||||||
props.label());
|
props.label());
|
||||||
|
|
||||||
labelCol.setCell(new AbstractCell<String>() {
|
labelCol.setCell(new AbstractCell<String>() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -114,7 +117,6 @@ public class ColumnListFld extends AbstractFld implements
|
||||||
sb.append(labelTemplates.format(value));
|
sb.append(labelTemplates.format(value));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
IdentityValueProvider<ColumnItem> identity = new IdentityValueProvider<ColumnItem>();
|
IdentityValueProvider<ColumnItem> identity = new IdentityValueProvider<ColumnItem>();
|
||||||
sm = new CheckBoxSelectionModel<ColumnItem>(identity);
|
sm = new CheckBoxSelectionModel<ColumnItem>(identity);
|
||||||
|
@ -181,12 +183,22 @@ public class ColumnListFld extends AbstractFld implements
|
||||||
String value = "";
|
String value = "";
|
||||||
boolean first = true;
|
boolean first = true;
|
||||||
|
|
||||||
for (ColumnItem columnItem : sm.getSelection()) {
|
if (tableItemSimple == null) {
|
||||||
String columnName = columnItem.getName();
|
return value;
|
||||||
value += (first ? "" : separator) + columnName;
|
} else {
|
||||||
first = false;
|
for (ColumnItem columnItem : sm.getSelection()) {
|
||||||
|
String columnName;
|
||||||
|
if (tableItemSimple.isTabularResource()) {
|
||||||
|
columnName = columnItem.getId();
|
||||||
|
} else {
|
||||||
|
columnName = columnItem.getName();
|
||||||
|
}
|
||||||
|
value += (first ? "" : separator) + columnName;
|
||||||
|
first = false;
|
||||||
|
}
|
||||||
|
return value;
|
||||||
}
|
}
|
||||||
return value;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -207,7 +219,7 @@ public class ColumnListFld extends AbstractFld implements
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onChange(TabularFldChangeEvent event) {
|
public void onChange(TabularFldChangeEvent event) {
|
||||||
TableItemSimple tableItemSimple = event.getTableItemSimple();
|
tableItemSimple = event.getTableItemSimple();
|
||||||
if (tableItemSimple == null) {
|
if (tableItemSimple == null) {
|
||||||
store.clear();
|
store.clear();
|
||||||
store.commitChanges();
|
store.commitChanges();
|
||||||
|
|
|
@ -12,7 +12,10 @@ import org.gcube.data.analysis.dataminermanagercl.shared.parameters.Parameter;
|
||||||
import org.gcube.portlets.widgets.dataminermanagerwidget.client.DataMinerManagerPanel;
|
import org.gcube.portlets.widgets.dataminermanagerwidget.client.DataMinerManagerPanel;
|
||||||
import org.gcube.portlets.widgets.dataminermanagerwidget.client.common.EventBusProvider;
|
import org.gcube.portlets.widgets.dataminermanagerwidget.client.common.EventBusProvider;
|
||||||
import org.gcube.portlets.widgets.dataminermanagerwidget.client.events.SessionExpiredEvent;
|
import org.gcube.portlets.widgets.dataminermanagerwidget.client.events.SessionExpiredEvent;
|
||||||
|
import org.gcube.portlets.widgets.dataminermanagerwidget.client.events.TabularResourceInfoEvent;
|
||||||
|
import org.gcube.portlets.widgets.dataminermanagerwidget.client.events.TabularResourceInfoRequestEvent;
|
||||||
import org.gcube.portlets.widgets.dataminermanagerwidget.client.rpc.DataMinerPortletServiceAsync;
|
import org.gcube.portlets.widgets.dataminermanagerwidget.client.rpc.DataMinerPortletServiceAsync;
|
||||||
|
import org.gcube.portlets.widgets.dataminermanagerwidget.client.tr.TabularResourceData;
|
||||||
import org.gcube.portlets.widgets.dataminermanagerwidget.client.util.UtilsGXT3;
|
import org.gcube.portlets.widgets.dataminermanagerwidget.client.util.UtilsGXT3;
|
||||||
import org.gcube.portlets.widgets.dataminermanagerwidget.shared.exception.SessionExpiredServiceException;
|
import org.gcube.portlets.widgets.dataminermanagerwidget.shared.exception.SessionExpiredServiceException;
|
||||||
import org.gcube.portlets.widgets.dataminermanagerwidget.shared.workspace.ItemDescription;
|
import org.gcube.portlets.widgets.dataminermanagerwidget.shared.workspace.ItemDescription;
|
||||||
|
@ -47,27 +50,65 @@ import com.sencha.gxt.widget.core.client.form.TextField;
|
||||||
public class FileFld extends AbstractFld {
|
public class FileFld extends AbstractFld {
|
||||||
|
|
||||||
private VerticalLayoutContainer vp;
|
private VerticalLayoutContainer vp;
|
||||||
|
private SimpleContainer fieldContainer;
|
||||||
|
private HBoxLayoutContainer horiz;
|
||||||
|
|
||||||
// FileSelector fileSelector;
|
// FileSelector fileSelector;
|
||||||
private WorkspaceExplorerSelectDialog wselectDialog;
|
private WorkspaceExplorerSelectDialog wselectDialog;
|
||||||
private TextButton selectButton, selectButton2, cancelButton;
|
private TextButton selectButton;
|
||||||
private ItemDescription selectedFileItem = null;
|
private TextButton selectButton2;
|
||||||
|
private TextButton selectTRButton;
|
||||||
private FileParameter fileParameter;
|
private TextButton selectTRButton2;
|
||||||
|
private TextButton cancelButton;
|
||||||
private SimpleContainer fieldContainer;
|
|
||||||
|
|
||||||
private HBoxLayoutContainer horiz;
|
|
||||||
|
|
||||||
private TextButton downloadButton;
|
private TextButton downloadButton;
|
||||||
|
|
||||||
|
private ItemDescription selectedFileItem = null;
|
||||||
|
private TabularResourceData tabularResourceData;
|
||||||
|
private FileParameter fileParameter;
|
||||||
|
private boolean created = false;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param parameter
|
* @param parameter
|
||||||
*/
|
*/
|
||||||
public FileFld(Parameter parameter) {
|
public FileFld(Parameter parameter) {
|
||||||
super(parameter);
|
super(parameter);
|
||||||
fileParameter = (FileParameter) parameter;
|
fileParameter = (FileParameter) parameter;
|
||||||
|
Log.debug("FileField");
|
||||||
|
retrieveInfo();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void retrieveInfo() {
|
||||||
|
bind();
|
||||||
|
retrieveTabularResourceInfo();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void bind() {
|
||||||
|
EventBusProvider.INSTANCE.addHandler(TabularResourceInfoEvent.TYPE,
|
||||||
|
new TabularResourceInfoEvent.TabularResourceInfoEventHandler() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onInfoReceived(TabularResourceInfoEvent event) {
|
||||||
|
Log.debug("Catch TabularResourceInfoEvent");
|
||||||
|
tabularResourceData = event.getTabularResourceData();
|
||||||
|
if (!created) {
|
||||||
|
created = true;
|
||||||
|
create();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void retrieveTabularResourceInfo() {
|
||||||
|
TabularResourceInfoRequestEvent event = new TabularResourceInfoRequestEvent();
|
||||||
|
EventBusProvider.INSTANCE.fireEvent(event);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void create(){
|
||||||
SimpleContainer tabContainer = new SimpleContainer();
|
SimpleContainer tabContainer = new SimpleContainer();
|
||||||
vp = new VerticalLayoutContainer();
|
vp = new VerticalLayoutContainer();
|
||||||
init();
|
init();
|
||||||
|
@ -144,6 +185,34 @@ public class FileFld extends AbstractFld {
|
||||||
wselectDialog.addWorkspaceExplorerSelectNotificationListener(handler);
|
wselectDialog.addWorkspaceExplorerSelectNotificationListener(handler);
|
||||||
wselectDialog.setZIndex(XDOM.getTopZIndex());
|
wselectDialog.setZIndex(XDOM.getTopZIndex());
|
||||||
|
|
||||||
|
|
||||||
|
selectTRButton = new TextButton("Use Tabular Resource");
|
||||||
|
selectTRButton.addSelectHandler(new SelectEvent.SelectHandler() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSelect(SelectEvent event) {
|
||||||
|
useTabularResource();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
selectTRButton.setIcon(DataMinerManagerPanel.resources
|
||||||
|
.tabularResource());
|
||||||
|
selectTRButton.setToolTip("Use Tabular Resource");
|
||||||
|
|
||||||
|
selectTRButton2 = new TextButton("");
|
||||||
|
selectTRButton2.addSelectHandler(new SelectEvent.SelectHandler() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSelect(SelectEvent event) {
|
||||||
|
useTabularResource();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
selectTRButton2.setIcon(DataMinerManagerPanel.resources
|
||||||
|
.tabularResource());
|
||||||
|
selectTRButton2.setToolTip("Use Tabular Resource");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
selectButton = new TextButton("Select File");
|
selectButton = new TextButton("Select File");
|
||||||
selectButton.setIcon(DataMinerManagerPanel.resources.folderExplore());
|
selectButton.setIcon(DataMinerManagerPanel.resources.folderExplore());
|
||||||
selectButton.addSelectHandler(new SelectEvent.SelectHandler() {
|
selectButton.addSelectHandler(new SelectEvent.SelectHandler() {
|
||||||
|
@ -177,6 +246,7 @@ public class FileFld extends AbstractFld {
|
||||||
showNoSelectionField();
|
showNoSelectionField();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
cancelButton.setToolTip("Cancel");
|
||||||
|
|
||||||
downloadButton = new TextButton("");
|
downloadButton = new TextButton("");
|
||||||
downloadButton.setIcon(DataMinerManagerPanel.resources.download());
|
downloadButton.setIcon(DataMinerManagerPanel.resources.download());
|
||||||
|
@ -187,8 +257,21 @@ public class FileFld extends AbstractFld {
|
||||||
downloadFile();
|
downloadFile();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
downloadButton.setToolTip("Download File");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void useTabularResource() {
|
||||||
|
Log.debug("TabularResourceData: " + tabularResourceData);
|
||||||
|
selectedFileItem = new ItemDescription(
|
||||||
|
tabularResourceData.getTabularResourceId(),
|
||||||
|
tabularResourceData.getName(),
|
||||||
|
"","",
|
||||||
|
tabularResourceData.getType());
|
||||||
|
selectedFileItem.setPublicLink(tabularResourceData.getTabularResourceId());
|
||||||
|
showFieldWithTRSelection();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private void retrieveFileInformation(final Item item) {
|
private void retrieveFileInformation(final Item item) {
|
||||||
Log.debug("Retrieved: " + item);
|
Log.debug("Retrieved: " + item);
|
||||||
|
@ -219,7 +302,7 @@ public class FileFld extends AbstractFld {
|
||||||
itemDescription.setPublicLink(result);
|
itemDescription.setPublicLink(result);
|
||||||
selectedFileItem = itemDescription;
|
selectedFileItem = itemDescription;
|
||||||
Log.debug("SelectedFileItem: " + selectedFileItem);
|
Log.debug("SelectedFileItem: " + selectedFileItem);
|
||||||
showFieldWithSelection();
|
showFieldWithFileSelection();
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -260,14 +343,17 @@ public class FileFld extends AbstractFld {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void showNoSelectionField() {
|
private void showNoSelectionField() {
|
||||||
vp.clear();
|
vp.clear();
|
||||||
|
vp.add(selectTRButton);
|
||||||
vp.add(selectButton);
|
vp.add(selectButton);
|
||||||
vp.forceLayout();
|
vp.forceLayout();
|
||||||
fieldContainer.forceLayout();
|
fieldContainer.forceLayout();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void showFieldWithSelection() {
|
|
||||||
|
private void showFieldWithFileSelection() {
|
||||||
String fileName = selectedFileItem.getName();
|
String fileName = selectedFileItem.getName();
|
||||||
|
|
||||||
if (fileName == null || fileName.isEmpty()) {
|
if (fileName == null || fileName.isEmpty()) {
|
||||||
|
@ -280,6 +366,7 @@ public class FileFld extends AbstractFld {
|
||||||
|
|
||||||
HBoxLayoutContainer h = new HBoxLayoutContainer();
|
HBoxLayoutContainer h = new HBoxLayoutContainer();
|
||||||
h.add(tableDescription, new BoxLayoutData(new Margins()));
|
h.add(tableDescription, new BoxLayoutData(new Margins()));
|
||||||
|
h.add(selectTRButton2, new BoxLayoutData(new Margins()));
|
||||||
h.add(selectButton2, new BoxLayoutData(new Margins()));
|
h.add(selectButton2, new BoxLayoutData(new Margins()));
|
||||||
h.add(downloadButton, new BoxLayoutData(new Margins()));
|
h.add(downloadButton, new BoxLayoutData(new Margins()));
|
||||||
h.add(cancelButton, new BoxLayoutData(new Margins()));
|
h.add(cancelButton, new BoxLayoutData(new Margins()));
|
||||||
|
@ -289,6 +376,31 @@ public class FileFld extends AbstractFld {
|
||||||
fieldContainer.forceLayout();
|
fieldContainer.forceLayout();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void showFieldWithTRSelection() {
|
||||||
|
String fileName = selectedFileItem.getName();
|
||||||
|
|
||||||
|
if (fileName == null || fileName.isEmpty()) {
|
||||||
|
fileName = "NoName";
|
||||||
|
}
|
||||||
|
|
||||||
|
TextField tableDescription = new TextField();
|
||||||
|
tableDescription.setValue(fileName);
|
||||||
|
tableDescription.setReadOnly(true);
|
||||||
|
|
||||||
|
HBoxLayoutContainer h = new HBoxLayoutContainer();
|
||||||
|
h.add(tableDescription, new BoxLayoutData(new Margins()));
|
||||||
|
h.add(selectTRButton2, new BoxLayoutData(new Margins()));
|
||||||
|
h.add(selectButton2, new BoxLayoutData(new Margins()));
|
||||||
|
h.add(downloadButton, new BoxLayoutData(new Margins()));
|
||||||
|
h.add(cancelButton, new BoxLayoutData(new Margins()));
|
||||||
|
vp.clear();
|
||||||
|
vp.add(h);
|
||||||
|
vp.forceLayout();
|
||||||
|
fieldContainer.forceLayout();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|
|
@ -85,6 +85,12 @@ public class TabularFld extends AbstractFld implements
|
||||||
retrieveInfo();
|
retrieveInfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void retrieveInfo() {
|
||||||
|
bind();
|
||||||
|
retrieveTabularResourceInfo();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
private void bind() {
|
private void bind() {
|
||||||
EventBusProvider.INSTANCE.addHandler(TabularResourceInfoEvent.TYPE,
|
EventBusProvider.INSTANCE.addHandler(TabularResourceInfoEvent.TYPE,
|
||||||
new TabularResourceInfoEvent.TabularResourceInfoEventHandler() {
|
new TabularResourceInfoEvent.TabularResourceInfoEventHandler() {
|
||||||
|
@ -114,7 +120,7 @@ public class TabularFld extends AbstractFld implements
|
||||||
|
|
||||||
SimpleContainer tabContainer = new SimpleContainer();
|
SimpleContainer tabContainer = new SimpleContainer();
|
||||||
vp = new VerticalLayoutContainer();
|
vp = new VerticalLayoutContainer();
|
||||||
retrieveInfo();
|
//retrieveInfo();
|
||||||
init();
|
init();
|
||||||
|
|
||||||
createField(tabContainer);
|
createField(tabContainer);
|
||||||
|
@ -127,11 +133,7 @@ public class TabularFld extends AbstractFld implements
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void retrieveInfo() {
|
|
||||||
bind();
|
|
||||||
retrieveTabularResourceInfo();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private void createField(SimpleContainer tabContainer) {
|
private void createField(SimpleContainer tabContainer) {
|
||||||
List<String> templates = tabularParameter.getTemplates();
|
List<String> templates = tabularParameter.getTemplates();
|
||||||
|
@ -349,6 +351,7 @@ public class TabularFld extends AbstractFld implements
|
||||||
tabularResourceData.getDescription(),
|
tabularResourceData.getDescription(),
|
||||||
tabularResourceData.getType());
|
tabularResourceData.getType());
|
||||||
selectedTableItem.setColumns(tabularResourceData.getColumns());
|
selectedTableItem.setColumns(tabularResourceData.getColumns());
|
||||||
|
selectedTableItem.setTabularResource(true);
|
||||||
showFieldWithTRSelection();
|
showFieldWithTRSelection();
|
||||||
updateListeners(selectedTableItem);
|
updateListeners(selectedTableItem);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue