refs 2521: Explore the possibility to port the StatMan interface onto Dataminer

https://support.d4science.org/issues/2521

Fixed default value selected for columns field

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/data-miner-manager@129052 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2016-06-10 13:06:52 +00:00
parent 5ac6e03356
commit 87fc6763bd
2 changed files with 11 additions and 8 deletions

View File

@ -13,6 +13,7 @@ import org.gcube.portlets.user.dataminermanager.shared.data.TableItemSimple;
import org.gcube.portlets.user.dataminermanager.shared.parameters.ColumnParameter; import org.gcube.portlets.user.dataminermanager.shared.parameters.ColumnParameter;
import org.gcube.portlets.user.dataminermanager.shared.parameters.Parameter; import org.gcube.portlets.user.dataminermanager.shared.parameters.Parameter;
import com.allen_sauer.gwt.log.client.Log;
import com.google.gwt.core.client.GWT; import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.ui.Widget; import com.google.gwt.user.client.ui.Widget;
import com.sencha.gxt.cell.core.client.form.ComboBoxCell.TriggerAction; import com.sencha.gxt.cell.core.client.form.ComboBoxCell.TriggerAction;
@ -73,7 +74,6 @@ public class ColumnFld extends AbstractFld implements
comboBox.setEditable(false); comboBox.setEditable(false);
comboBox.setTriggerAction(TriggerAction.ALL); comboBox.setTriggerAction(TriggerAction.ALL);
comboBox.setEnabled(false); comboBox.setEnabled(false);
HtmlLayoutContainer descr; HtmlLayoutContainer descr;
if (columnParameter.getDescription() == null) { if (columnParameter.getDescription() == null) {
@ -159,18 +159,22 @@ public class ColumnFld extends AbstractFld implements
} else { } else {
store.clear(); store.clear();
store.commitChanges(); store.commitChanges();
comboBox.clear();
ArrayList<ColumnItem> columns = tableItemSimple.getColumns(); ArrayList<ColumnItem> columns = tableItemSimple.getColumns();
if (columns != null) { if (columns != null) {
store.addAll(columns); store.addAll(columns);
store.commitChanges();
Log.debug("DefaultColumn: "+defaultColumn);
for (ColumnItem columnItem : columns) { for (ColumnItem columnItem : columns) {
if (columnItem.getName().compareTo(defaultColumn) == 0) { Log.debug("ColumnItem: "+ columnItem);
if (columnItem.getName().compareToIgnoreCase(defaultColumn) == 0) {
comboBox.setValue(columnItem); comboBox.setValue(columnItem);
break; break;
} }
} }
store.commitChanges();
} }
comboBox.clear();
comboBox.setEnabled(true); comboBox.setEnabled(true);
showFieldWithSelection(tableItemSimple); showFieldWithSelection(tableItemSimple);
} }

View File

@ -40,15 +40,14 @@
<entry-point <entry-point
class='org.gcube.portlets.user.dataminermanager.client.DataMinerManager' /> class='org.gcube.portlets.user.dataminermanager.client.DataMinerManager' />
<!-- <!-- <set-property name="log_ConsoleLogger" value="ENABLED" /> <set-property
<set-property name="log_ConsoleLogger" value="ENABLED" /> <set-property
name="log_DivLogger" value="ENABLED" /> <set-property name="log_GWTLogger" name="log_DivLogger" value="ENABLED" /> <set-property name="log_GWTLogger"
value="ENABLED" /> <set-property name="log_SystemLogger" value="ENABLED" value="ENABLED" /> <set-property name="log_SystemLogger" value="ENABLED"
/> --> /> -->
<!-- Not in GWT 2.6 <set-property name="log_FirebugLogger" value="ENABLED" <!-- Not in GWT 2.6 <set-property name="log_FirebugLogger" value="ENABLED"
/> --> /> -->
<set-property name="log_ConsoleLogger" value="DISABLED" /> <set-property name="log_ConsoleLogger" value="DISABLED" />
<set-property name="log_DivLogger" value="DISABLED" /> <set-property name="log_DivLogger" value="DISABLED" />
<set-property name="log_GWTLogger" value="DISABLED" /> <set-property name="log_GWTLogger" value="DISABLED" />