915: TDM - Support the Spanish language
Task-Url: https://support.d4science.org/issues/915 Updated Spanish Support git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-unionwizard-widget@120136 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
085a025949
commit
c85e0b1c52
|
@ -4,29 +4,43 @@ import java.util.ArrayList;
|
||||||
|
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.union.UnionColumnsMapping;
|
import org.gcube.portlets.user.td.gwtservice.shared.tr.union.UnionColumnsMapping;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.union.UnionSession;
|
import org.gcube.portlets.user.td.gwtservice.shared.tr.union.UnionSession;
|
||||||
|
import org.gcube.portlets.user.td.widgetcommonevent.client.CommonMessages;
|
||||||
import org.gcube.portlets.user.td.wizardwidget.client.WizardCard;
|
import org.gcube.portlets.user.td.wizardwidget.client.WizardCard;
|
||||||
import org.gcube.portlets.user.td.wizardwidget.client.util.UtilsGXT3;
|
import org.gcube.portlets.user.td.wizardwidget.client.util.UtilsGXT3;
|
||||||
|
|
||||||
import com.allen_sauer.gwt.log.client.Log;
|
import com.allen_sauer.gwt.log.client.Log;
|
||||||
|
import com.google.gwt.core.client.GWT;
|
||||||
import com.google.gwt.user.client.Command;
|
import com.google.gwt.user.client.Command;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author giancarlo
|
||||||
|
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||||
|
*
|
||||||
|
*/
|
||||||
public class ColumnMappingCard extends WizardCard {
|
public class ColumnMappingCard extends WizardCard {
|
||||||
protected UnionSession unionSession;
|
private static UnionWizardMessages msgs= GWT.create(UnionWizardMessages.class);
|
||||||
protected ColumnMappingCard thisCard;
|
private UnionSession unionSession;
|
||||||
protected ColumnMappingPanel columnMappingPanel;
|
private ColumnMappingCard thisCard;
|
||||||
|
private ColumnMappingPanel columnMappingPanel;
|
||||||
|
private CommonMessages msgsCommon;
|
||||||
|
|
||||||
public ColumnMappingCard(final UnionSession unionSession) {
|
public ColumnMappingCard(final UnionSession unionSession) {
|
||||||
super("Mapping beetween Tabular Resources", "");
|
super(msgs.columnMappingCardHead(), "");
|
||||||
Log.debug("ColumnMappingCard");
|
Log.debug("ColumnMappingCard");
|
||||||
this.unionSession = unionSession;
|
this.unionSession = unionSession;
|
||||||
thisCard = this;
|
thisCard = this;
|
||||||
|
initMessages();
|
||||||
|
|
||||||
columnMappingPanel = new ColumnMappingPanel(thisCard,res);
|
columnMappingPanel = new ColumnMappingPanel(thisCard,res);
|
||||||
|
|
||||||
setContent(columnMappingPanel);
|
setContent(columnMappingPanel);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void initMessages(){
|
||||||
|
msgsCommon= GWT.create(CommonMessages.class);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setup() {
|
public void setup() {
|
||||||
Log.debug("ColumnMappingCard Call Setup ");
|
Log.debug("ColumnMappingCard Call Setup ");
|
||||||
|
@ -57,6 +71,8 @@ public class ColumnMappingCard extends WizardCard {
|
||||||
getWizardWindow().setPreviousButtonCommand(sayPreviousCard);
|
getWizardWindow().setPreviousButtonCommand(sayPreviousCard);
|
||||||
getWizardWindow().setEnableNextButton(true);
|
getWizardWindow().setEnableNextButton(true);
|
||||||
getWizardWindow().setEnableBackButton(true);
|
getWizardWindow().setEnableBackButton(true);
|
||||||
|
setBackButtonVisible(true);
|
||||||
|
setNextButtonVisible(true);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -69,8 +85,8 @@ public class ColumnMappingCard extends WizardCard {
|
||||||
Log.debug("No columns match created: "
|
Log.debug("No columns match created: "
|
||||||
+columnsMatch);
|
+columnsMatch);
|
||||||
UtilsGXT3
|
UtilsGXT3
|
||||||
.info("Attentions",
|
.info(msgsCommon.attention(),
|
||||||
"Creates a valid column map");
|
msgs.attentionCreatesAValidColumnMap());
|
||||||
getWizardWindow().setEnableNextButton(true);
|
getWizardWindow().setEnableNextButton(true);
|
||||||
getWizardWindow().setEnableBackButton(true);
|
getWizardWindow().setEnableBackButton(true);
|
||||||
|
|
||||||
|
@ -97,4 +113,9 @@ public class ColumnMappingCard extends WizardCard {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public UnionSession getUnionSession(){
|
||||||
|
return unionSession;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package org.gcube.portlets.user.td.unionwizardwidget.client;
|
package org.gcube.portlets.user.td.unionwizardwidget.client;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
|
||||||
|
|
||||||
import org.gcube.portlets.user.td.gwtservice.client.rpc.TDGWTServiceAsync;
|
import org.gcube.portlets.user.td.gwtservice.client.rpc.TDGWTServiceAsync;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTIsLockedException;
|
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTIsLockedException;
|
||||||
|
@ -10,6 +9,7 @@ import org.gcube.portlets.user.td.gwtservice.shared.tr.union.UnionColumnsMapping
|
||||||
import org.gcube.portlets.user.td.unionwizardwidget.client.custom.IconButton;
|
import org.gcube.portlets.user.td.unionwizardwidget.client.custom.IconButton;
|
||||||
import org.gcube.portlets.user.td.unionwizardwidget.client.properties.ColumnDataProperties;
|
import org.gcube.portlets.user.td.unionwizardwidget.client.properties.ColumnDataProperties;
|
||||||
import org.gcube.portlets.user.td.unionwizardwidget.client.resources.UnionResourceBundle;
|
import org.gcube.portlets.user.td.unionwizardwidget.client.resources.UnionResourceBundle;
|
||||||
|
import org.gcube.portlets.user.td.widgetcommonevent.client.CommonMessages;
|
||||||
import org.gcube.portlets.user.td.widgetcommonevent.client.event.SessionExpiredEvent;
|
import org.gcube.portlets.user.td.widgetcommonevent.client.event.SessionExpiredEvent;
|
||||||
import org.gcube.portlets.user.td.widgetcommonevent.client.type.SessionExpiredType;
|
import org.gcube.portlets.user.td.widgetcommonevent.client.type.SessionExpiredType;
|
||||||
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
|
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
|
||||||
|
@ -52,22 +52,21 @@ import com.sencha.gxt.widget.core.client.form.FieldLabel;
|
||||||
public class ColumnMappingPanel extends ContentPanel {
|
public class ColumnMappingPanel extends ContentPanel {
|
||||||
|
|
||||||
private static final String COMBOWIDTH = "200px";
|
private static final String COMBOWIDTH = "200px";
|
||||||
// private static final String COLUMNLABELWIDTH = "120px";
|
private UnionWizardMessages msgs;
|
||||||
protected ResourceBundle res;
|
private CommonMessages msgsCommon;
|
||||||
protected ColumnMappingCard parent;
|
|
||||||
protected VerticalLayoutContainer vert;
|
|
||||||
protected ArrayList<ColumnData> sourceColumns;
|
|
||||||
protected ArrayList<ColumnData> unionColumns;
|
|
||||||
protected ResizeContainer thisPanel;
|
|
||||||
|
|
||||||
protected HashMap<ColumnData, ColumnData> columnMap;
|
private ColumnMappingCard parent;
|
||||||
protected ArrayList<UnionColumnsMapping> listUnionColumnsMapping;
|
private VerticalLayoutContainer vert;
|
||||||
|
private ArrayList<ColumnData> sourceColumns;
|
||||||
|
private ArrayList<ColumnData> unionColumns;
|
||||||
|
private ResizeContainer thisPanel;
|
||||||
|
|
||||||
protected String itemIdSourceColumn = "itemIdSourceColumn";
|
private ArrayList<UnionColumnsMapping> listUnionColumnsMapping;
|
||||||
protected String itemIdUnionColumn = "itemIdUnionColumn";
|
|
||||||
protected String itemIdLabelColumn = "itemIdLabelColumn";
|
private String itemIdSourceColumn = "itemIdSourceColumn";
|
||||||
protected String itemIdBtnAdd = "itemIdBtnAdd";
|
private String itemIdUnionColumn = "itemIdUnionColumn";
|
||||||
protected String itemIdBtnDel = "itemIdBtnDel";
|
private String itemIdBtnAdd = "itemIdBtnAdd";
|
||||||
|
private String itemIdBtnDel = "itemIdBtnDel";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -76,21 +75,23 @@ public class ColumnMappingPanel extends ContentPanel {
|
||||||
*/
|
*/
|
||||||
public ColumnMappingPanel(ColumnMappingCard parent, ResourceBundle res) {
|
public ColumnMappingPanel(ColumnMappingCard parent, ResourceBundle res) {
|
||||||
super();
|
super();
|
||||||
this.res = res;
|
|
||||||
this.parent = parent;
|
this.parent = parent;
|
||||||
thisPanel = this;
|
thisPanel = this;
|
||||||
|
initMessages();
|
||||||
|
|
||||||
Log.debug("ColumnMappingPanel");
|
Log.debug("ColumnMappingPanel");
|
||||||
init();
|
init();
|
||||||
retrieveSourceColumns();
|
retrieveSourceColumns();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void initMessages() {
|
||||||
|
msgs = GWT.create(UnionWizardMessages.class);
|
||||||
|
msgsCommon = GWT.create(CommonMessages.class);
|
||||||
|
}
|
||||||
|
|
||||||
protected void init() {
|
protected void init() {
|
||||||
setHeaderVisible(false);
|
setHeaderVisible(false);
|
||||||
// setBodyBorder(false);
|
|
||||||
setBodyStyle("backgroundColor:#DFE8F6;");
|
setBodyStyle("backgroundColor:#DFE8F6;");
|
||||||
// new Resizable(this, Dir.E, Dir.SE, Dir.S);
|
|
||||||
// Important: fixed rendering of widgets
|
|
||||||
forceLayoutOnResize = true;
|
forceLayoutOnResize = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -105,22 +106,15 @@ public class ColumnMappingPanel extends ContentPanel {
|
||||||
|
|
||||||
setColumnMap();
|
setColumnMap();
|
||||||
|
|
||||||
/*
|
String currentTRLabel = parent.getUnionSession()
|
||||||
* FieldLabel columnLabel = new FieldLabel(null, "Column Label");
|
.getCurrentTabularResource().getName();
|
||||||
* columnLabel.getElement().applyStyles("font-weight:bold");
|
|
||||||
* columnLabel.setWidth(COLUMNLABELWIDTH);
|
|
||||||
* columnLabel.setLabelSeparator("");
|
|
||||||
*/
|
|
||||||
|
|
||||||
String currentTRLabel = parent.unionSession.getCurrentTabularResource()
|
|
||||||
.getName();
|
|
||||||
FieldLabel sourceColumnLabel = new FieldLabel(null, currentTRLabel);
|
FieldLabel sourceColumnLabel = new FieldLabel(null, currentTRLabel);
|
||||||
sourceColumnLabel.getElement().applyStyles("font-weight:bold");
|
sourceColumnLabel.getElement().applyStyles("font-weight:bold");
|
||||||
sourceColumnLabel.setWidth(COMBOWIDTH);
|
sourceColumnLabel.setWidth(COMBOWIDTH);
|
||||||
sourceColumnLabel.setLabelSeparator("");
|
sourceColumnLabel.setLabelSeparator("");
|
||||||
|
|
||||||
String unionTRLabel = parent.unionSession.getUnionTabularResource()
|
String unionTRLabel = parent.getUnionSession()
|
||||||
.getName();
|
.getUnionTabularResource().getName();
|
||||||
FieldLabel unionColumnLabel = new FieldLabel(null, unionTRLabel);
|
FieldLabel unionColumnLabel = new FieldLabel(null, unionTRLabel);
|
||||||
unionColumnLabel.getElement().applyStyles("font-weight:bold");
|
unionColumnLabel.getElement().applyStyles("font-weight:bold");
|
||||||
unionColumnLabel.setWidth(COMBOWIDTH);
|
unionColumnLabel.setWidth(COMBOWIDTH);
|
||||||
|
@ -130,7 +124,6 @@ public class ColumnMappingPanel extends ContentPanel {
|
||||||
horiz.setHBoxLayoutAlign(HBoxLayoutAlign.MIDDLE);
|
horiz.setHBoxLayoutAlign(HBoxLayoutAlign.MIDDLE);
|
||||||
horiz.setPack(BoxLayoutPack.START);
|
horiz.setPack(BoxLayoutPack.START);
|
||||||
|
|
||||||
// horiz.add(columnLabel, new BoxLayoutData(new Margins(2, 1, 2, 1)));
|
|
||||||
horiz.add(sourceColumnLabel, new BoxLayoutData(new Margins(2, 1, 2, 1)));
|
horiz.add(sourceColumnLabel, new BoxLayoutData(new Margins(2, 1, 2, 1)));
|
||||||
horiz.add(unionColumnLabel, new BoxLayoutData(new Margins(2, 1, 2, 1)));
|
horiz.add(unionColumnLabel, new BoxLayoutData(new Margins(2, 1, 2, 1)));
|
||||||
|
|
||||||
|
@ -149,7 +142,7 @@ public class ColumnMappingPanel extends ContentPanel {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void retrieveSourceColumns() {
|
private void retrieveSourceColumns() {
|
||||||
TRId trId = parent.unionSession.getTrId();
|
TRId trId = parent.getUnionSession().getTrId();
|
||||||
TDGWTServiceAsync.INSTANCE.getColumns(trId,
|
TDGWTServiceAsync.INSTANCE.getColumns(trId,
|
||||||
new AsyncCallback<ArrayList<ColumnData>>() {
|
new AsyncCallback<ArrayList<ColumnData>>() {
|
||||||
|
|
||||||
|
@ -163,15 +156,14 @@ public class ColumnMappingPanel extends ContentPanel {
|
||||||
} else {
|
} else {
|
||||||
if (caught instanceof TDGWTIsLockedException) {
|
if (caught instanceof TDGWTIsLockedException) {
|
||||||
Log.error(caught.getLocalizedMessage());
|
Log.error(caught.getLocalizedMessage());
|
||||||
UtilsGXT3.alert("Error Locked",
|
UtilsGXT3.alert(msgsCommon.errorLocked(),
|
||||||
caught.getLocalizedMessage());
|
caught.getLocalizedMessage());
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
Log.debug("Error retrieving source columns: "
|
Log.debug("Error retrieving source columns: "
|
||||||
+ caught.getLocalizedMessage());
|
+ caught.getLocalizedMessage());
|
||||||
UtilsGXT3
|
UtilsGXT3.alert(msgsCommon.error(),
|
||||||
.alert("Error retrieving source columns",
|
msgs.errorRetrievingSourceColumns());
|
||||||
"Error retrieving source columns on server!");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -187,7 +179,8 @@ public class ColumnMappingPanel extends ContentPanel {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void retrieveUnionColumns() {
|
private void retrieveUnionColumns() {
|
||||||
TRId trId = parent.unionSession.getUnionTabularResource().getTrId();
|
TRId trId = parent.getUnionSession().getUnionTabularResource()
|
||||||
|
.getTrId();
|
||||||
TDGWTServiceAsync.INSTANCE.getColumns(trId,
|
TDGWTServiceAsync.INSTANCE.getColumns(trId,
|
||||||
new AsyncCallback<ArrayList<ColumnData>>() {
|
new AsyncCallback<ArrayList<ColumnData>>() {
|
||||||
|
|
||||||
|
@ -201,15 +194,14 @@ public class ColumnMappingPanel extends ContentPanel {
|
||||||
} else {
|
} else {
|
||||||
if (caught instanceof TDGWTIsLockedException) {
|
if (caught instanceof TDGWTIsLockedException) {
|
||||||
Log.error(caught.getLocalizedMessage());
|
Log.error(caught.getLocalizedMessage());
|
||||||
UtilsGXT3.alert("Error Locked",
|
UtilsGXT3.alert(msgsCommon.errorLocked(),
|
||||||
caught.getLocalizedMessage());
|
caught.getLocalizedMessage());
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
Log.debug("Error retrieving union columns: "
|
Log.debug("Error retrieving union columns: "
|
||||||
+ caught.getLocalizedMessage());
|
+ caught.getLocalizedMessage());
|
||||||
UtilsGXT3
|
UtilsGXT3.alert(msgsCommon.error(),
|
||||||
.alert("Error retrieving union columns",
|
msgs.errorRetrievingUnionColumns());
|
||||||
"Error retrieving union columns on server!");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -228,14 +220,6 @@ public class ColumnMappingPanel extends ContentPanel {
|
||||||
|
|
||||||
final HBoxLayoutContainer horiz = new HBoxLayoutContainer();
|
final HBoxLayoutContainer horiz = new HBoxLayoutContainer();
|
||||||
|
|
||||||
// Column Label
|
|
||||||
/*
|
|
||||||
* TextField columnLabel = new TextField();
|
|
||||||
* columnLabel.setItemId(itemIdLabelColumn);
|
|
||||||
* columnLabel.setAllowBlank(false);
|
|
||||||
* columnLabel.setWidth(COLUMNLABELWIDTH);
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Source Combo
|
// Source Combo
|
||||||
ColumnDataProperties propsSourceColumn = GWT
|
ColumnDataProperties propsSourceColumn = GWT
|
||||||
.create(ColumnDataProperties.class);
|
.create(ColumnDataProperties.class);
|
||||||
|
@ -249,7 +233,7 @@ public class ColumnMappingPanel extends ContentPanel {
|
||||||
|
|
||||||
Log.debug("ComboSourceColumn created");
|
Log.debug("ComboSourceColumn created");
|
||||||
|
|
||||||
comboSourceColumn.setEmptyText("Select a column...");
|
comboSourceColumn.setEmptyText(msgs.comboSourceColumnEmptyText());
|
||||||
comboSourceColumn.setWidth(COMBOWIDTH);
|
comboSourceColumn.setWidth(COMBOWIDTH);
|
||||||
comboSourceColumn.setEditable(false);
|
comboSourceColumn.setEditable(false);
|
||||||
comboSourceColumn.setTriggerAction(TriggerAction.ALL);
|
comboSourceColumn.setTriggerAction(TriggerAction.ALL);
|
||||||
|
@ -267,7 +251,7 @@ public class ColumnMappingPanel extends ContentPanel {
|
||||||
Log.debug("ComboUnionColumn created");
|
Log.debug("ComboUnionColumn created");
|
||||||
|
|
||||||
comboUnionColumn.disable();
|
comboUnionColumn.disable();
|
||||||
comboUnionColumn.setEmptyText("Select a column...");
|
comboUnionColumn.setEmptyText(msgs.comboUnionEmptyText());
|
||||||
comboUnionColumn.setWidth(COMBOWIDTH);
|
comboUnionColumn.setWidth(COMBOWIDTH);
|
||||||
comboUnionColumn.setEditable(false);
|
comboUnionColumn.setEditable(false);
|
||||||
comboUnionColumn.setTriggerAction(TriggerAction.ALL);
|
comboUnionColumn.setTriggerAction(TriggerAction.ALL);
|
||||||
|
@ -332,7 +316,6 @@ public class ColumnMappingPanel extends ContentPanel {
|
||||||
horiz.setHBoxLayoutAlign(HBoxLayoutAlign.MIDDLE);
|
horiz.setHBoxLayoutAlign(HBoxLayoutAlign.MIDDLE);
|
||||||
horiz.setPack(BoxLayoutPack.START);
|
horiz.setPack(BoxLayoutPack.START);
|
||||||
|
|
||||||
// horiz.add(columnLabel, new BoxLayoutData(new Margins(2, 1, 2, 1)));
|
|
||||||
horiz.add(comboSourceColumn, new BoxLayoutData(new Margins(2, 1, 2, 1)));
|
horiz.add(comboSourceColumn, new BoxLayoutData(new Margins(2, 1, 2, 1)));
|
||||||
horiz.add(comboUnionColumn, new BoxLayoutData(new Margins(2, 1, 2, 1)));
|
horiz.add(comboUnionColumn, new BoxLayoutData(new Margins(2, 1, 2, 1)));
|
||||||
horiz.add(btnAdd, new BoxLayoutData(new Margins(2, 1, 2, 1)));
|
horiz.add(btnAdd, new BoxLayoutData(new Margins(2, 1, 2, 1)));
|
||||||
|
@ -345,14 +328,6 @@ public class ColumnMappingPanel extends ContentPanel {
|
||||||
|
|
||||||
final HBoxLayoutContainer horiz = new HBoxLayoutContainer();
|
final HBoxLayoutContainer horiz = new HBoxLayoutContainer();
|
||||||
|
|
||||||
// Column Label
|
|
||||||
/*
|
|
||||||
* TextField columnLabel = new TextField();
|
|
||||||
* columnLabel.setItemId(itemIdLabelColumn);
|
|
||||||
* columnLabel.setAllowBlank(false);
|
|
||||||
* columnLabel.setWidth(COLUMNLABELWIDTH);
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Source Combo
|
// Source Combo
|
||||||
ColumnDataProperties propsSourceColumn = GWT
|
ColumnDataProperties propsSourceColumn = GWT
|
||||||
.create(ColumnDataProperties.class);
|
.create(ColumnDataProperties.class);
|
||||||
|
@ -366,7 +341,7 @@ public class ColumnMappingPanel extends ContentPanel {
|
||||||
|
|
||||||
Log.debug("ComboSourceColumn created");
|
Log.debug("ComboSourceColumn created");
|
||||||
|
|
||||||
comboSourceColumn.setEmptyText("Select a column...");
|
comboSourceColumn.setEmptyText(msgs.comboSourceColumnEmptyText());
|
||||||
comboSourceColumn.setWidth(COMBOWIDTH);
|
comboSourceColumn.setWidth(COMBOWIDTH);
|
||||||
comboSourceColumn.setEditable(false);
|
comboSourceColumn.setEditable(false);
|
||||||
comboSourceColumn.setTriggerAction(TriggerAction.ALL);
|
comboSourceColumn.setTriggerAction(TriggerAction.ALL);
|
||||||
|
@ -384,7 +359,7 @@ public class ColumnMappingPanel extends ContentPanel {
|
||||||
Log.debug("ComboUnionColumn created");
|
Log.debug("ComboUnionColumn created");
|
||||||
|
|
||||||
comboUnionColumn.disable();
|
comboUnionColumn.disable();
|
||||||
comboUnionColumn.setEmptyText("Select a column...");
|
comboUnionColumn.setEmptyText(msgs.comboUnionEmptyText());
|
||||||
comboUnionColumn.setWidth(COMBOWIDTH);
|
comboUnionColumn.setWidth(COMBOWIDTH);
|
||||||
comboUnionColumn.setEditable(false);
|
comboUnionColumn.setEditable(false);
|
||||||
comboUnionColumn.setTriggerAction(TriggerAction.ALL);
|
comboUnionColumn.setTriggerAction(TriggerAction.ALL);
|
||||||
|
@ -449,7 +424,6 @@ public class ColumnMappingPanel extends ContentPanel {
|
||||||
horiz.setHBoxLayoutAlign(HBoxLayoutAlign.MIDDLE);
|
horiz.setHBoxLayoutAlign(HBoxLayoutAlign.MIDDLE);
|
||||||
horiz.setPack(BoxLayoutPack.START);
|
horiz.setPack(BoxLayoutPack.START);
|
||||||
|
|
||||||
// horiz.add(columnLabel, new BoxLayoutData(new Margins(2, 1, 2, 1)));
|
|
||||||
horiz.add(comboSourceColumn, new BoxLayoutData(new Margins(2, 1, 2, 1)));
|
horiz.add(comboSourceColumn, new BoxLayoutData(new Margins(2, 1, 2, 1)));
|
||||||
horiz.add(comboUnionColumn, new BoxLayoutData(new Margins(2, 1, 2, 1)));
|
horiz.add(comboUnionColumn, new BoxLayoutData(new Margins(2, 1, 2, 1)));
|
||||||
horiz.add(btnAdd, new BoxLayoutData(new Margins(2, 1, 2, 1)));
|
horiz.add(btnAdd, new BoxLayoutData(new Margins(2, 1, 2, 1)));
|
||||||
|
@ -531,8 +505,6 @@ public class ColumnMappingPanel extends ContentPanel {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
|
@ -545,13 +517,6 @@ public class ColumnMappingPanel extends ContentPanel {
|
||||||
for (; i < lenght; i++) {
|
for (; i < lenght; i++) {
|
||||||
HBoxLayoutContainer h = (HBoxLayoutContainer) vert.getWidget(i);
|
HBoxLayoutContainer h = (HBoxLayoutContainer) vert.getWidget(i);
|
||||||
if (h != null) {
|
if (h != null) {
|
||||||
/*
|
|
||||||
* TextField columnLabelField = (TextField) h
|
|
||||||
* .getItemByItemId(itemIdLabelColumn); if (columnLabelField !=
|
|
||||||
* null) { String columnLabel =
|
|
||||||
* columnLabelField.getCurrentValue(); if (columnLabel != null
|
|
||||||
* && !columnLabel.isEmpty()) {
|
|
||||||
*/
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
ComboBox<ColumnData> comboSourceColumn = (ComboBox<ColumnData>) h
|
ComboBox<ColumnData> comboSourceColumn = (ComboBox<ColumnData>) h
|
||||||
.getItemByItemId(itemIdSourceColumn);
|
.getItemByItemId(itemIdSourceColumn);
|
||||||
|
@ -571,10 +536,6 @@ public class ColumnMappingPanel extends ContentPanel {
|
||||||
} else {
|
} else {
|
||||||
Log.debug("Source Column is null");
|
Log.debug("Source Column is null");
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
* } else { Log.debug("Column Label is null"); } } else {
|
|
||||||
* Log.debug("Column Label Field is null"); }
|
|
||||||
*/
|
|
||||||
} else {
|
} else {
|
||||||
Log.debug("HorizontalContainer is null");
|
Log.debug("HorizontalContainer is null");
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,12 +6,14 @@ import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTSessionExpire
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.TabResource;
|
import org.gcube.portlets.user.td.gwtservice.shared.tr.TabResource;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.TableData;
|
import org.gcube.portlets.user.td.gwtservice.shared.tr.TableData;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.union.UnionSession;
|
import org.gcube.portlets.user.td.gwtservice.shared.tr.union.UnionSession;
|
||||||
|
import org.gcube.portlets.user.td.widgetcommonevent.client.CommonMessages;
|
||||||
import org.gcube.portlets.user.td.widgetcommonevent.client.event.SessionExpiredEvent;
|
import org.gcube.portlets.user.td.widgetcommonevent.client.event.SessionExpiredEvent;
|
||||||
import org.gcube.portlets.user.td.widgetcommonevent.client.type.SessionExpiredType;
|
import org.gcube.portlets.user.td.widgetcommonevent.client.type.SessionExpiredType;
|
||||||
import org.gcube.portlets.user.td.wizardwidget.client.WizardCard;
|
import org.gcube.portlets.user.td.wizardwidget.client.WizardCard;
|
||||||
import org.gcube.portlets.user.td.wizardwidget.client.util.UtilsGXT3;
|
import org.gcube.portlets.user.td.wizardwidget.client.util.UtilsGXT3;
|
||||||
|
|
||||||
import com.allen_sauer.gwt.log.client.Log;
|
import com.allen_sauer.gwt.log.client.Log;
|
||||||
|
import com.google.gwt.core.client.GWT;
|
||||||
import com.google.gwt.event.logical.shared.SelectionEvent;
|
import com.google.gwt.event.logical.shared.SelectionEvent;
|
||||||
import com.google.gwt.event.logical.shared.SelectionHandler;
|
import com.google.gwt.event.logical.shared.SelectionHandler;
|
||||||
import com.google.gwt.user.client.Command;
|
import com.google.gwt.user.client.Command;
|
||||||
|
@ -24,16 +26,20 @@ import com.sencha.gxt.widget.core.client.event.HideEvent;
|
||||||
import com.sencha.gxt.widget.core.client.event.HideEvent.HideHandler;
|
import com.sencha.gxt.widget.core.client.event.HideEvent.HideHandler;
|
||||||
|
|
||||||
public class TabResourcesSelectionCard extends WizardCard {
|
public class TabResourcesSelectionCard extends WizardCard {
|
||||||
protected UnionSession unionSession;
|
private static UnionWizardMessages msgs= GWT.create(UnionWizardMessages.class);
|
||||||
protected TabResourcesSelectionCard thisCard;
|
private CommonMessages msgsCommon;
|
||||||
protected TabResourcesSelectionPanel tabResourcesSelectionPanel;
|
private UnionSession unionSession;
|
||||||
protected TabResource selectedTabResource = null;
|
private TabResourcesSelectionCard thisCard;
|
||||||
|
private TabResourcesSelectionPanel tabResourcesSelectionPanel;
|
||||||
|
//private TabResource selectedTabResource = null;
|
||||||
|
|
||||||
|
|
||||||
public TabResourcesSelectionCard(final UnionSession unionSession) {
|
public TabResourcesSelectionCard(final UnionSession unionSession) {
|
||||||
super("Select Tabular Resource for Union", "");
|
super(msgs.tabResourcesSelectionCardHead(), "");
|
||||||
Log.debug("TabResourcesSelectionCard");
|
Log.debug("TabResourcesSelectionCard");
|
||||||
this.unionSession = unionSession;
|
this.unionSession = unionSession;
|
||||||
thisCard = this;
|
thisCard = this;
|
||||||
|
initMessages();
|
||||||
|
|
||||||
tabResourcesSelectionPanel = new TabResourcesSelectionPanel(thisCard,
|
tabResourcesSelectionPanel = new TabResourcesSelectionPanel(thisCard,
|
||||||
res);
|
res);
|
||||||
|
@ -54,6 +60,10 @@ public class TabResourcesSelectionCard extends WizardCard {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void initMessages(){
|
||||||
|
msgsCommon= GWT.create(CommonMessages.class);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setup() {
|
public void setup() {
|
||||||
Log.debug("TabResourcesSelectionCard Call Setup ");
|
Log.debug("TabResourcesSelectionCard Call Setup ");
|
||||||
|
@ -82,14 +92,19 @@ public class TabResourcesSelectionCard extends WizardCard {
|
||||||
};
|
};
|
||||||
|
|
||||||
getWizardWindow().setPreviousButtonCommand(sayPreviousCard);
|
getWizardWindow().setPreviousButtonCommand(sayPreviousCard);
|
||||||
getWizardWindow().setEnableNextButton(false);
|
|
||||||
getWizardWindow().setEnableBackButton(false);
|
setEnableNextButton(false);
|
||||||
|
setBackButtonVisible(false);
|
||||||
|
setEnableBackButton(false);
|
||||||
|
setNextButtonVisible(true);
|
||||||
|
|
||||||
|
tabResourcesSelectionPanel.gridDeselectAll();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void retrieveLastTable() {
|
protected void retrieveLastTable() {
|
||||||
getWizardWindow().setEnableNextButton(false);
|
setEnableNextButton(false);
|
||||||
getWizardWindow().setEnableBackButton(false);
|
setEnableBackButton(false);
|
||||||
|
|
||||||
TDGWTServiceAsync.INSTANCE.getLastTable(unionSession
|
TDGWTServiceAsync.INSTANCE.getLastTable(unionSession
|
||||||
.getUnionTabularResource().getTrId(),
|
.getUnionTabularResource().getTrId(),
|
||||||
|
@ -99,8 +114,8 @@ public class TabResourcesSelectionCard extends WizardCard {
|
||||||
public void onFailure(Throwable caught) {
|
public void onFailure(Throwable caught) {
|
||||||
Log.debug("Attention",
|
Log.debug("Attention",
|
||||||
"This tabular resource does not have a valid table");
|
"This tabular resource does not have a valid table");
|
||||||
AlertMessageBox d = new AlertMessageBox("Attention",
|
AlertMessageBox d = new AlertMessageBox(msgsCommon.attention(),
|
||||||
"This tabular resource does not have a valid table");
|
msgs.attentionThisTabularResourceDoesNotHaveAValidTable());
|
||||||
d.addHideHandler(new HideHandler() {
|
d.addHideHandler(new HideHandler() {
|
||||||
|
|
||||||
public void onHide(HideEvent event) {
|
public void onHide(HideEvent event) {
|
||||||
|
@ -123,8 +138,8 @@ public class TabResourcesSelectionCard extends WizardCard {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void deleteTRWithLastTableNull() {
|
protected void deleteTRWithLastTableNull() {
|
||||||
final ConfirmMessageBox mb = new ConfirmMessageBox("Delete",
|
final ConfirmMessageBox mb = new ConfirmMessageBox(msgs.delete(),
|
||||||
"Would you like to delete this tabular resource without table?");
|
msgs.woultYouLikeToDeleteThisTabularResourceWithoutTable());
|
||||||
/*Next in GXT 3.1.1 */
|
/*Next in GXT 3.1.1 */
|
||||||
|
|
||||||
mb.addDialogHideHandler(new DialogHideHandler() {
|
mb.addDialogHideHandler(new DialogHideHandler() {
|
||||||
|
@ -133,8 +148,8 @@ public class TabResourcesSelectionCard extends WizardCard {
|
||||||
public void onDialogHide(DialogHideEvent event) {
|
public void onDialogHide(DialogHideEvent event) {
|
||||||
switch (event.getHideButton()) {
|
switch (event.getHideButton()) {
|
||||||
case NO:
|
case NO:
|
||||||
getWizardWindow().setEnableNextButton(false);
|
setEnableNextButton(false);
|
||||||
getWizardWindow().setEnableBackButton(false);
|
setEnableBackButton(false);
|
||||||
break;
|
break;
|
||||||
case YES:
|
case YES:
|
||||||
callDeleteLastTable();
|
callDeleteLastTable();
|
||||||
|
@ -188,22 +203,22 @@ public class TabResourcesSelectionCard extends WizardCard {
|
||||||
} else {
|
} else {
|
||||||
if (caught instanceof TDGWTIsLockedException) {
|
if (caught instanceof TDGWTIsLockedException) {
|
||||||
Log.error(caught.getLocalizedMessage());
|
Log.error(caught.getLocalizedMessage());
|
||||||
UtilsGXT3.alert("Error Locked",
|
UtilsGXT3.alert(msgsCommon.errorLocked(),
|
||||||
caught.getLocalizedMessage());
|
caught.getLocalizedMessage());
|
||||||
getWizardWindow().setEnableNextButton(false);
|
setEnableNextButton(false);
|
||||||
getWizardWindow().setEnableBackButton(false);
|
setEnableBackButton(false);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
AlertMessageBox d = new AlertMessageBox(
|
AlertMessageBox d = new AlertMessageBox(
|
||||||
"Error",
|
msgsCommon.error(),
|
||||||
"Error on delete TabResource: "
|
msgs.errorOnDeleteTabularResourceFixed()
|
||||||
+ caught.getLocalizedMessage());
|
+ caught.getLocalizedMessage());
|
||||||
d.addHideHandler(new HideHandler() {
|
d.addHideHandler(new HideHandler() {
|
||||||
|
|
||||||
public void onHide(HideEvent event) {
|
public void onHide(HideEvent event) {
|
||||||
getWizardWindow().setEnableNextButton(
|
setEnableNextButton(
|
||||||
true);
|
true);
|
||||||
getWizardWindow().setEnableBackButton(
|
setEnableBackButton(
|
||||||
true);
|
true);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -211,6 +226,7 @@ public class TabResourcesSelectionCard extends WizardCard {
|
||||||
});
|
});
|
||||||
d.show();
|
d.show();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -218,8 +234,8 @@ public class TabResourcesSelectionCard extends WizardCard {
|
||||||
|
|
||||||
public void onSuccess(Void result) {
|
public void onSuccess(Void result) {
|
||||||
tabResourcesSelectionPanel.gridReload();
|
tabResourcesSelectionPanel.gridReload();
|
||||||
getWizardWindow().setEnableNextButton(false);
|
setEnableNextButton(false);
|
||||||
getWizardWindow().setEnableBackButton(false);
|
setEnableBackButton(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
@ -252,16 +268,16 @@ public class TabResourcesSelectionCard extends WizardCard {
|
||||||
} else {
|
} else {
|
||||||
if (caught instanceof TDGWTIsLockedException) {
|
if (caught instanceof TDGWTIsLockedException) {
|
||||||
Log.error(caught.getLocalizedMessage());
|
Log.error(caught.getLocalizedMessage());
|
||||||
UtilsGXT3.alert("Error Locked",
|
UtilsGXT3.alert(msgsCommon.errorLocked(),
|
||||||
caught.getLocalizedMessage());
|
caught.getLocalizedMessage());
|
||||||
getWizardWindow().setEnableNextButton(false);
|
setEnableNextButton(false);
|
||||||
getWizardWindow().setEnableBackButton(false);
|
setEnableBackButton(false);
|
||||||
} else {
|
} else {
|
||||||
UtilsGXT3
|
UtilsGXT3
|
||||||
.alert("Error",
|
.alert(msgsCommon.error(),
|
||||||
"Error retrienving information on current tabular resource: ");
|
msgs.errorRetrievingInfomationOnTRFixed());
|
||||||
getWizardWindow().setEnableNextButton(false);
|
setEnableNextButton(false);
|
||||||
getWizardWindow().setEnableBackButton(false);
|
setEnableBackButton(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,6 +8,7 @@ import org.gcube.portlets.user.td.gwtservice.client.rpc.TDGWTServiceAsync;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTIsLockedException;
|
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTIsLockedException;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTSessionExpiredException;
|
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTSessionExpiredException;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.TabResource;
|
import org.gcube.portlets.user.td.gwtservice.shared.tr.TabResource;
|
||||||
|
import org.gcube.portlets.user.td.widgetcommonevent.client.CommonMessages;
|
||||||
import org.gcube.portlets.user.td.widgetcommonevent.client.event.SessionExpiredEvent;
|
import org.gcube.portlets.user.td.widgetcommonevent.client.event.SessionExpiredEvent;
|
||||||
import org.gcube.portlets.user.td.widgetcommonevent.client.type.SessionExpiredType;
|
import org.gcube.portlets.user.td.widgetcommonevent.client.type.SessionExpiredType;
|
||||||
import org.gcube.portlets.user.td.wizardwidget.client.WizardCard;
|
import org.gcube.portlets.user.td.wizardwidget.client.WizardCard;
|
||||||
|
@ -59,10 +60,18 @@ import com.sencha.gxt.widget.core.client.menu.MenuItem;
|
||||||
import com.sencha.gxt.widget.core.client.toolbar.LabelToolItem;
|
import com.sencha.gxt.widget.core.client.toolbar.LabelToolItem;
|
||||||
import com.sencha.gxt.widget.core.client.toolbar.ToolBar;
|
import com.sencha.gxt.widget.core.client.toolbar.ToolBar;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author giancarlo
|
||||||
|
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||||
|
*
|
||||||
|
*/
|
||||||
public class TabResourcesSelectionPanel extends ContentPanel implements
|
public class TabResourcesSelectionPanel extends ContentPanel implements
|
||||||
HasSelectionHandlers<TabResource> {
|
HasSelectionHandlers<TabResource> {
|
||||||
private static final DateTimeFormat sdf = DateTimeFormat
|
private static final DateTimeFormat sdf = DateTimeFormat
|
||||||
.getFormat("yyyy-MM-dd HH:mm");
|
.getFormat("yyyy-MM-dd HH:mm");
|
||||||
|
private CommonMessages msgsCommon;
|
||||||
|
private UnionWizardMessages msgs;
|
||||||
private Grid<TabResource> grid;
|
private Grid<TabResource> grid;
|
||||||
private ResourceBundle res;
|
private ResourceBundle res;
|
||||||
private Menu contextMenu;
|
private Menu contextMenu;
|
||||||
|
@ -71,11 +80,13 @@ public class TabResourcesSelectionPanel extends ContentPanel implements
|
||||||
|
|
||||||
private WizardCard parent;
|
private WizardCard parent;
|
||||||
|
|
||||||
|
|
||||||
public TabResourcesSelectionPanel(WizardCard parent, ResourceBundle res) {
|
public TabResourcesSelectionPanel(WizardCard parent, ResourceBundle res) {
|
||||||
this.res = res;
|
this.res = res;
|
||||||
this.parent = parent;
|
this.parent = parent;
|
||||||
Log.debug("TabResourcesSelectionPanel");
|
Log.debug("TabResourcesSelectionPanel");
|
||||||
init();
|
initMessages();
|
||||||
|
initPanel();
|
||||||
try {
|
try {
|
||||||
createContextMenu();
|
createContextMenu();
|
||||||
buildPanel();
|
buildPanel();
|
||||||
|
@ -86,7 +97,12 @@ public class TabResourcesSelectionPanel extends ContentPanel implements
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void init() {
|
protected void initMessages() {
|
||||||
|
msgsCommon = GWT.create(CommonMessages.class);
|
||||||
|
msgs = GWT.create(UnionWizardMessages.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void initPanel() {
|
||||||
setHeaderVisible(false);
|
setHeaderVisible(false);
|
||||||
// new Resizable(this, Dir.E, Dir.SE, Dir.S);
|
// new Resizable(this, Dir.E, Dir.SE, Dir.S);
|
||||||
|
|
||||||
|
@ -95,14 +111,14 @@ public class TabResourcesSelectionPanel extends ContentPanel implements
|
||||||
protected void buildPanel() {
|
protected void buildPanel() {
|
||||||
|
|
||||||
ToolBar toolBar = new ToolBar();
|
ToolBar toolBar = new ToolBar();
|
||||||
toolBar.add(new LabelToolItem("Search: "));
|
toolBar.add(new LabelToolItem(msgsCommon.toolItemSearchLabel()));
|
||||||
final TextField searchField = new TextField();
|
final TextField searchField = new TextField();
|
||||||
toolBar.add(searchField);
|
toolBar.add(searchField);
|
||||||
|
|
||||||
TextButton btnReload = new TextButton();
|
TextButton btnReload = new TextButton();
|
||||||
// btnReload.setText("Reload");
|
// btnReload.setText("Reload");
|
||||||
btnReload.setIcon(res.refresh16());
|
btnReload.setIcon(res.refresh16());
|
||||||
btnReload.setToolTip("Reload");
|
btnReload.setToolTip(msgsCommon.toolItemReloadLabel());
|
||||||
toolBar.add(btnReload);
|
toolBar.add(btnReload);
|
||||||
|
|
||||||
IdentityValueProvider<TabResource> identity = new IdentityValueProvider<TabResource>();
|
IdentityValueProvider<TabResource> identity = new IdentityValueProvider<TabResource>();
|
||||||
|
@ -112,17 +128,17 @@ public class TabResourcesSelectionPanel extends ContentPanel implements
|
||||||
.create(TabResourceProperties.class);
|
.create(TabResourceProperties.class);
|
||||||
|
|
||||||
ColumnConfig<TabResource, String> nameColumn = new ColumnConfig<TabResource, String>(
|
ColumnConfig<TabResource, String> nameColumn = new ColumnConfig<TabResource, String>(
|
||||||
properties.name(), 90, "Name");
|
properties.name(), 90, msgs.nameColumn());
|
||||||
ColumnConfig<TabResource, String> typeColumn = new ColumnConfig<TabResource, String>(
|
ColumnConfig<TabResource, String> typeColumn = new ColumnConfig<TabResource, String>(
|
||||||
properties.tabResourceType(), 30, "Type");
|
properties.tabResourceType(), 30, msgs.typeColumn());
|
||||||
ColumnConfig<TabResource, String> tableTypeNameColumn = new ColumnConfig<TabResource, String>(
|
ColumnConfig<TabResource, String> tableTypeNameColumn = new ColumnConfig<TabResource, String>(
|
||||||
properties.tableTypeName(), 30, "Table Type");
|
properties.tableTypeName(), 30, msgs.tableTypeColumn());
|
||||||
ColumnConfig<TabResource, String> agencyColumn = new ColumnConfig<TabResource, String>(
|
ColumnConfig<TabResource, String> agencyColumn = new ColumnConfig<TabResource, String>(
|
||||||
properties.agency(), 60, "Agency");
|
properties.agency(), 60, msgs.agencyColumn());
|
||||||
ColumnConfig<TabResource, String> ownerColumn = new ColumnConfig<TabResource, String>(
|
ColumnConfig<TabResource, String> ownerColumn = new ColumnConfig<TabResource, String>(
|
||||||
properties.ownerLogin(), 70, "Owner");
|
properties.ownerLogin(), 70, msgs.ownerColumn());
|
||||||
ColumnConfig<TabResource, Date> dateColumn = new ColumnConfig<TabResource, Date>(
|
ColumnConfig<TabResource, Date> dateColumn = new ColumnConfig<TabResource, Date>(
|
||||||
properties.date(), 50, "Creation Date");
|
properties.date(), 50, msgs.creationDateColumn());
|
||||||
|
|
||||||
dateColumn.setCell(new DateCell(sdf));
|
dateColumn.setCell(new DateCell(sdf));
|
||||||
|
|
||||||
|
@ -218,7 +234,7 @@ public class TabResourcesSelectionPanel extends ContentPanel implements
|
||||||
|
|
||||||
protected void createContextMenu() {
|
protected void createContextMenu() {
|
||||||
contextMenu = new Menu();
|
contextMenu = new Menu();
|
||||||
MenuItem deleteTRItem = new MenuItem("Delete");
|
MenuItem deleteTRItem = new MenuItem(msgs.itemDelete());
|
||||||
deleteTRItem.setId("DeleteTR");
|
deleteTRItem.setId("DeleteTR");
|
||||||
deleteTRItem
|
deleteTRItem
|
||||||
.setIcon(org.gcube.portlets.user.td.unionwizardwidget.client.resources.UnionResourceBundle.INSTANCE
|
.setIcon(org.gcube.portlets.user.td.unionwizardwidget.client.resources.UnionResourceBundle.INSTANCE
|
||||||
|
@ -273,8 +289,9 @@ public class TabResourcesSelectionPanel extends ContentPanel implements
|
||||||
Log.debug("Error retrieving tabular resource: "
|
Log.debug("Error retrieving tabular resource: "
|
||||||
+ caught.getLocalizedMessage());
|
+ caught.getLocalizedMessage());
|
||||||
UtilsGXT3
|
UtilsGXT3
|
||||||
.alert("Error!",
|
.alert(msgsCommon.error(),
|
||||||
"Error retrieving tabular resources on server!");
|
msgs.errorRetrievingTabularResources()
|
||||||
|
);
|
||||||
}
|
}
|
||||||
callback.onFailure(caught);
|
callback.onFailure(caught);
|
||||||
}
|
}
|
||||||
|
@ -313,10 +330,14 @@ public class TabResourcesSelectionPanel extends ContentPanel implements
|
||||||
grid.getLoader().load();
|
grid.getLoader().load();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void gridDeselectAll(){
|
||||||
|
grid.getSelectionModel().deselectAll();
|
||||||
|
}
|
||||||
|
|
||||||
protected void deleteTR(TabResource tabResource) {
|
protected void deleteTR(TabResource tabResource) {
|
||||||
removableTR = tabResource;
|
removableTR = tabResource;
|
||||||
final ConfirmMessageBox mb = new ConfirmMessageBox("Delete",
|
final ConfirmMessageBox mb = new ConfirmMessageBox(msgs.delete(),
|
||||||
"Would you like to delete this tabular resource?");
|
msgs.woultYouLikeToDeleteThisTabularResource());
|
||||||
|
|
||||||
/* Next in GXT 3.1.1 */
|
/* Next in GXT 3.1.1 */
|
||||||
|
|
||||||
|
@ -369,13 +390,13 @@ public class TabResourcesSelectionPanel extends ContentPanel implements
|
||||||
} else {
|
} else {
|
||||||
if (caught instanceof TDGWTIsLockedException) {
|
if (caught instanceof TDGWTIsLockedException) {
|
||||||
Log.error(caught.getLocalizedMessage());
|
Log.error(caught.getLocalizedMessage());
|
||||||
UtilsGXT3.alert("Error Locked",
|
UtilsGXT3.alert(msgsCommon.errorLocked(),
|
||||||
caught.getLocalizedMessage());
|
caught.getLocalizedMessage());
|
||||||
} else {
|
} else {
|
||||||
Log.error("Error on delete TabResource: "
|
Log.error("Error on delete TabResource: "
|
||||||
+ caught.getLocalizedMessage());
|
+ caught.getLocalizedMessage());
|
||||||
UtilsGXT3.alert("Error",
|
UtilsGXT3.alert(msgsCommon.error(),
|
||||||
"Error on delete TabResource: "
|
msgs.errorOnDeleteTabularResourceFixed()
|
||||||
+ caught.getLocalizedMessage());
|
+ caught.getLocalizedMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,7 @@ import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTSessionExpire
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.union.UnionSession;
|
import org.gcube.portlets.user.td.gwtservice.shared.tr.union.UnionSession;
|
||||||
import org.gcube.portlets.user.td.monitorwidget.client.MonitorDialog;
|
import org.gcube.portlets.user.td.monitorwidget.client.MonitorDialog;
|
||||||
import org.gcube.portlets.user.td.monitorwidget.client.MonitorDialogListener;
|
import org.gcube.portlets.user.td.monitorwidget.client.MonitorDialogListener;
|
||||||
|
import org.gcube.portlets.user.td.widgetcommonevent.client.CommonMessages;
|
||||||
import org.gcube.portlets.user.td.widgetcommonevent.client.event.SessionExpiredEvent;
|
import org.gcube.portlets.user.td.widgetcommonevent.client.event.SessionExpiredEvent;
|
||||||
import org.gcube.portlets.user.td.widgetcommonevent.client.type.SessionExpiredType;
|
import org.gcube.portlets.user.td.widgetcommonevent.client.type.SessionExpiredType;
|
||||||
import org.gcube.portlets.user.td.widgetcommonevent.shared.OperationResult;
|
import org.gcube.portlets.user.td.widgetcommonevent.shared.OperationResult;
|
||||||
|
@ -17,6 +18,7 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
|
||||||
import org.gcube.portlets.user.td.wizardwidget.client.WizardCard;
|
import org.gcube.portlets.user.td.wizardwidget.client.WizardCard;
|
||||||
|
|
||||||
import com.allen_sauer.gwt.log.client.Log;
|
import com.allen_sauer.gwt.log.client.Log;
|
||||||
|
import com.google.gwt.core.client.GWT;
|
||||||
import com.google.gwt.safehtml.shared.SafeHtmlBuilder;
|
import com.google.gwt.safehtml.shared.SafeHtmlBuilder;
|
||||||
import com.google.gwt.user.client.Command;
|
import com.google.gwt.user.client.Command;
|
||||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||||
|
@ -37,17 +39,17 @@ import com.sencha.gxt.widget.core.client.container.VBoxLayoutContainer.VBoxLayou
|
||||||
*/
|
*/
|
||||||
public class UnionOperationInProgressCard extends WizardCard implements
|
public class UnionOperationInProgressCard extends WizardCard implements
|
||||||
MonitorDialogListener {
|
MonitorDialogListener {
|
||||||
|
private static CommonMessages msgsCommon=GWT.create(CommonMessages.class);
|
||||||
|
private UnionWizardMessages msgs;
|
||||||
|
private UnionSession unionSession;
|
||||||
|
private TRId newTrId;
|
||||||
|
private HtmlLayoutContainer resultField;
|
||||||
|
|
||||||
protected UnionOperationInProgressCard thisCard;
|
|
||||||
protected UnionSession unionSession;
|
|
||||||
protected TRId newTrId;
|
|
||||||
protected HtmlLayoutContainer resultField;
|
|
||||||
|
|
||||||
public UnionOperationInProgressCard(final UnionSession unionSession) {
|
public UnionOperationInProgressCard(final UnionSession unionSession) {
|
||||||
super("Operation In Progress", "");
|
super(msgsCommon.operationInProgress(), "");
|
||||||
|
|
||||||
this.unionSession = unionSession;
|
this.unionSession = unionSession;
|
||||||
thisCard = this;
|
initMessages();
|
||||||
|
|
||||||
VBoxLayoutContainer operationInProgressPanel = new VBoxLayoutContainer();
|
VBoxLayoutContainer operationInProgressPanel = new VBoxLayoutContainer();
|
||||||
operationInProgressPanel.setVBoxLayoutAlign(VBoxLayoutAlign.CENTER);
|
operationInProgressPanel.setVBoxLayoutAlign(VBoxLayoutAlign.CENTER);
|
||||||
|
@ -58,21 +60,21 @@ public class UnionOperationInProgressCard extends WizardCard implements
|
||||||
description.setBorderWidth(0);
|
description.setBorderWidth(0);
|
||||||
|
|
||||||
description.setHTML(0, 0,
|
description.setHTML(0, 0,
|
||||||
"<span style=\"font-weight:bold;\";>Union with: </span>");
|
"<span style=\"font-weight:bold;\";>"+msgs.unionWithFixed()+"</span>");
|
||||||
description.setText(0, 1, unionSession.getUnionTabularResource()
|
description.setText(0, 1, unionSession.getUnionTabularResource()
|
||||||
.getName());
|
.getName());
|
||||||
description.setHTML(1, 0,
|
description.setHTML(1, 0,
|
||||||
"<span style=\"font-weight:bold;\";>Type: </span>");
|
"<span style=\"font-weight:bold;\";>"+msgs.typeFixed()+"</span>");
|
||||||
description.setText(1, 1, unionSession.getUnionTabularResource()
|
description.setText(1, 1, unionSession.getUnionTabularResource()
|
||||||
.getTableTypeName());
|
.getTableTypeName());
|
||||||
|
|
||||||
description.setHTML(2, 0,
|
description.setHTML(2, 0,
|
||||||
"<span style=\"font-weight:bold;\";>Owner: </span>");
|
"<span style=\"font-weight:bold;\";>"+msgs.ownerFixed()+"</span>");
|
||||||
description.setText(2, 1, unionSession.getUnionTabularResource()
|
description.setText(2, 1, unionSession.getUnionTabularResource()
|
||||||
.getOwnerLogin());
|
.getOwnerLogin());
|
||||||
|
|
||||||
FramedPanel summary = new FramedPanel();
|
FramedPanel summary = new FramedPanel();
|
||||||
summary.setHeadingText("Union Summary");
|
summary.setHeadingText(msgs.summaryUnion());
|
||||||
summary.setWidth(400);
|
summary.setWidth(400);
|
||||||
summary.add(description);
|
summary.add(description);
|
||||||
operationInProgressPanel.add(summary, new BoxLayoutData(new Margins(20,
|
operationInProgressPanel.add(summary, new BoxLayoutData(new Margins(20,
|
||||||
|
@ -88,6 +90,10 @@ public class UnionOperationInProgressCard extends WizardCard implements
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void initMessages(){
|
||||||
|
msgs = GWT.create(UnionWizardMessages.class);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@ -109,18 +115,18 @@ public class UnionOperationInProgressCard extends WizardCard implements
|
||||||
} else {
|
} else {
|
||||||
if (caught instanceof TDGWTIsLockedException) {
|
if (caught instanceof TDGWTIsLockedException) {
|
||||||
Log.error(caught.getLocalizedMessage());
|
Log.error(caught.getLocalizedMessage());
|
||||||
showErrorAndHide("Error Locked",
|
showErrorAndHide(msgsCommon.errorLocked(),
|
||||||
caught.getLocalizedMessage(), "",
|
caught.getLocalizedMessage(), "",
|
||||||
caught);
|
caught);
|
||||||
} else {
|
} else {
|
||||||
if (caught instanceof TDGWTIsFinalException) {
|
if (caught instanceof TDGWTIsFinalException) {
|
||||||
Log.error(caught.getLocalizedMessage());
|
Log.error(caught.getLocalizedMessage());
|
||||||
showErrorAndHide("Error Final",
|
showErrorAndHide(msgsCommon.errorFinal(),
|
||||||
caught.getLocalizedMessage(), "",
|
caught.getLocalizedMessage(), "",
|
||||||
caught);
|
caught);
|
||||||
} else {
|
} else {
|
||||||
showErrorAndHide("Error in Union",
|
showErrorAndHide(msgsCommon.error(),
|
||||||
"An error occured in union.",
|
msgs.errorInUnionFixed(),
|
||||||
caught.getLocalizedMessage(),
|
caught.getLocalizedMessage(),
|
||||||
caught);
|
caught);
|
||||||
}
|
}
|
||||||
|
@ -152,7 +158,7 @@ public class UnionOperationInProgressCard extends WizardCard implements
|
||||||
newTrId = operationResult.getTrId();
|
newTrId = operationResult.getTrId();
|
||||||
SafeHtmlBuilder safeHtmlBuilder = new SafeHtmlBuilder();
|
SafeHtmlBuilder safeHtmlBuilder = new SafeHtmlBuilder();
|
||||||
safeHtmlBuilder
|
safeHtmlBuilder
|
||||||
.appendHtmlConstant("<div style='text-align:center;font-size:large;font-weight:bold; color:#009900;'>Operation Completed</div>");
|
.appendHtmlConstant("<div style='text-align:center;font-size:large;font-weight:bold; color:#009900;'>"+msgsCommon.operationCompleted()+"</div>");
|
||||||
resultField.setHTML(safeHtmlBuilder.toSafeHtml());
|
resultField.setHTML(safeHtmlBuilder.toSafeHtml());
|
||||||
resultField.setVisible(true);
|
resultField.setVisible(true);
|
||||||
Command sayComplete = new Command() {
|
Command sayComplete = new Command() {
|
||||||
|
@ -181,7 +187,7 @@ public class UnionOperationInProgressCard extends WizardCard implements
|
||||||
public void operationFailed(Throwable caught, String reason, String details) {
|
public void operationFailed(Throwable caught, String reason, String details) {
|
||||||
SafeHtmlBuilder safeHtmlBuilder = new SafeHtmlBuilder();
|
SafeHtmlBuilder safeHtmlBuilder = new SafeHtmlBuilder();
|
||||||
safeHtmlBuilder
|
safeHtmlBuilder
|
||||||
.appendHtmlConstant("<div style='text-align:center;font-size:large;font-weight:bold;color:red;'>Operation Failed</div>");
|
.appendHtmlConstant("<div style='text-align:center;font-size:large;font-weight:bold;color:red;'>"+msgsCommon.operationFailed()+"</div>");
|
||||||
resultField.setHTML(safeHtmlBuilder.toSafeHtml());
|
resultField.setHTML(safeHtmlBuilder.toSafeHtml());
|
||||||
resultField.setVisible(true);
|
resultField.setVisible(true);
|
||||||
if (caught instanceof TDGWTSessionExpiredException) {
|
if (caught instanceof TDGWTSessionExpiredException) {
|
||||||
|
@ -190,7 +196,7 @@ public class UnionOperationInProgressCard extends WizardCard implements
|
||||||
new SessionExpiredEvent(
|
new SessionExpiredEvent(
|
||||||
SessionExpiredType.EXPIREDONSERVER));
|
SessionExpiredType.EXPIREDONSERVER));
|
||||||
} else {
|
} else {
|
||||||
showErrorAndHide("Error in Union", reason, details, caught);
|
showErrorAndHide(msgsCommon.error(), reason, details, caught);
|
||||||
|
|
||||||
}
|
}
|
||||||
forceLayout();
|
forceLayout();
|
||||||
|
@ -201,7 +207,7 @@ public class UnionOperationInProgressCard extends WizardCard implements
|
||||||
newTrId = operationResult.getTrId();
|
newTrId = operationResult.getTrId();
|
||||||
SafeHtmlBuilder safeHtmlBuilder = new SafeHtmlBuilder();
|
SafeHtmlBuilder safeHtmlBuilder = new SafeHtmlBuilder();
|
||||||
safeHtmlBuilder
|
safeHtmlBuilder
|
||||||
.appendHtmlConstant("<div style='text-align:center;font-size:large;font-weight:bold;color: #FF9900;'>Validation Failed</div>");
|
.appendHtmlConstant("<div style='text-align:center;font-size:large;font-weight:bold;color: #FF9900;'>"+msgsCommon.validationFailed()+"</div>");
|
||||||
resultField.setHTML(safeHtmlBuilder.toSafeHtml());
|
resultField.setHTML(safeHtmlBuilder.toSafeHtml());
|
||||||
resultField.setVisible(true);
|
resultField.setVisible(true);
|
||||||
|
|
||||||
|
@ -232,7 +238,7 @@ public class UnionOperationInProgressCard extends WizardCard implements
|
||||||
public void operationAborted() {
|
public void operationAborted() {
|
||||||
SafeHtmlBuilder safeHtmlBuilder = new SafeHtmlBuilder();
|
SafeHtmlBuilder safeHtmlBuilder = new SafeHtmlBuilder();
|
||||||
safeHtmlBuilder
|
safeHtmlBuilder
|
||||||
.appendHtmlConstant("<div style='text-align:center;font-size:large;font-weight:bold;color: #AA00AA;'>Operation Aborted</div>");
|
.appendHtmlConstant("<div style='text-align:center;font-size:large;font-weight:bold;color: #AA00AA;'>"+msgsCommon.operationAborted()+"</div>");
|
||||||
resultField.setHTML(safeHtmlBuilder.toSafeHtml());
|
resultField.setHTML(safeHtmlBuilder.toSafeHtml());
|
||||||
resultField.setVisible(true);
|
resultField.setVisible(true);
|
||||||
|
|
||||||
|
@ -262,7 +268,7 @@ public class UnionOperationInProgressCard extends WizardCard implements
|
||||||
public void operationPutInBackground() {
|
public void operationPutInBackground() {
|
||||||
SafeHtmlBuilder safeHtmlBuilder = new SafeHtmlBuilder();
|
SafeHtmlBuilder safeHtmlBuilder = new SafeHtmlBuilder();
|
||||||
safeHtmlBuilder
|
safeHtmlBuilder
|
||||||
.appendHtmlConstant("<div style='text-align:center;font-size:large;font-weight:bold;color: #00AAAA;'>Operation in Background</div>");
|
.appendHtmlConstant("<div style='text-align:center;font-size:large;font-weight:bold;color: #00AAAA;'>"+msgsCommon.operationInBackground()+"</div>");
|
||||||
resultField.setHTML(safeHtmlBuilder.toSafeHtml());
|
resultField.setHTML(safeHtmlBuilder.toSafeHtml());
|
||||||
resultField.setVisible(true);
|
resultField.setVisible(true);
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,95 @@
|
||||||
|
package org.gcube.portlets.user.td.unionwizardwidget.client;
|
||||||
|
|
||||||
|
import com.google.gwt.i18n.client.Messages;
|
||||||
|
import com.google.gwt.safehtml.shared.SafeHtml;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author giancarlo email: <a
|
||||||
|
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public interface UnionWizardMessages extends Messages {
|
||||||
|
|
||||||
|
@DefaultMessage("Union")
|
||||||
|
String unionWizardHead();
|
||||||
|
|
||||||
|
@DefaultMessage("Select Tabular Resource for Union")
|
||||||
|
String tabResourcesSelectionCardHead();
|
||||||
|
|
||||||
|
@DefaultMessage("This tabular resource does not have a valid table!")
|
||||||
|
String attentionThisTabularResourceDoesNotHaveAValidTable();
|
||||||
|
|
||||||
|
@DefaultMessage("Delete")
|
||||||
|
String delete();
|
||||||
|
|
||||||
|
@DefaultMessage("Would you like to delete this tabular resource?")
|
||||||
|
String woultYouLikeToDeleteThisTabularResource();
|
||||||
|
|
||||||
|
@DefaultMessage("Would you like to delete this tabular resource without table?")
|
||||||
|
String woultYouLikeToDeleteThisTabularResourceWithoutTable();
|
||||||
|
|
||||||
|
@DefaultMessage("Error on delete Tabular Resource: ")
|
||||||
|
String errorOnDeleteTabularResourceFixed();
|
||||||
|
|
||||||
|
@DefaultMessage("Error retrienving information on current tabular resource: ")
|
||||||
|
String errorRetrievingInfomationOnTRFixed();
|
||||||
|
|
||||||
|
@DefaultMessage("Name")
|
||||||
|
String nameColumn();
|
||||||
|
|
||||||
|
@DefaultMessage("Type")
|
||||||
|
String typeColumn();
|
||||||
|
|
||||||
|
@DefaultMessage("Table Type")
|
||||||
|
String tableTypeColumn();
|
||||||
|
|
||||||
|
@DefaultMessage("Agency")
|
||||||
|
String agencyColumn();
|
||||||
|
|
||||||
|
@DefaultMessage("Owner")
|
||||||
|
SafeHtml ownerColumn();
|
||||||
|
|
||||||
|
@DefaultMessage("Creation Date")
|
||||||
|
String creationDateColumn();
|
||||||
|
|
||||||
|
@DefaultMessage("Delete")
|
||||||
|
String itemDelete();
|
||||||
|
|
||||||
|
@DefaultMessage("Error retrieving tabular resources on server!")
|
||||||
|
String errorRetrievingTabularResources();
|
||||||
|
|
||||||
|
@DefaultMessage("Mapping beetween Tabular Resources")
|
||||||
|
String columnMappingCardHead();
|
||||||
|
|
||||||
|
@DefaultMessage("Creates a valid column map!")
|
||||||
|
String attentionCreatesAValidColumnMap();
|
||||||
|
|
||||||
|
@DefaultMessage("Error retrieving source columns on server!")
|
||||||
|
String errorRetrievingSourceColumns();
|
||||||
|
|
||||||
|
@DefaultMessage("Error retrieving union columns on server!")
|
||||||
|
String errorRetrievingUnionColumns();
|
||||||
|
|
||||||
|
@DefaultMessage("Select a column...")
|
||||||
|
String comboSourceColumnEmptyText();
|
||||||
|
|
||||||
|
@DefaultMessage("Select a column...")
|
||||||
|
String comboUnionEmptyText();
|
||||||
|
|
||||||
|
@DefaultMessage("Union with: ")
|
||||||
|
String unionWithFixed();
|
||||||
|
|
||||||
|
@DefaultMessage("Type: ")
|
||||||
|
String typeFixed();
|
||||||
|
|
||||||
|
@DefaultMessage("Owner: ")
|
||||||
|
String ownerFixed();
|
||||||
|
|
||||||
|
@DefaultMessage("Union Summary")
|
||||||
|
String summaryUnion();
|
||||||
|
|
||||||
|
@DefaultMessage("An error occured in union.")
|
||||||
|
String errorInUnionFixed();
|
||||||
|
|
||||||
|
}
|
|
@ -14,17 +14,15 @@ import com.google.web.bindery.event.shared.EventBus;
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class UnionWizardTD extends WizardWindow {
|
public class UnionWizardTD extends WizardWindow {
|
||||||
protected static final int WITHWIZARD = 800;
|
private static final int WITHWIZARD = 800;
|
||||||
protected static final int HEIGHTWIZARD = 520;
|
private static final int HEIGHTWIZARD = 520;
|
||||||
|
private UnionSession unionSession;
|
||||||
protected UnionSession unionSession;
|
|
||||||
protected TRId trId;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param trId
|
* @param trId tabular resource id
|
||||||
* @param title
|
* @param title wizard title
|
||||||
* @param eventBus
|
* @param eventBus event bus
|
||||||
*/
|
*/
|
||||||
public UnionWizardTD(TRId trId, String title, EventBus eventBus) {
|
public UnionWizardTD(TRId trId, String title, EventBus eventBus) {
|
||||||
super(title, eventBus);
|
super(title, eventBus);
|
||||||
|
@ -32,7 +30,6 @@ public class UnionWizardTD extends WizardWindow {
|
||||||
setWidth(WITHWIZARD);
|
setWidth(WITHWIZARD);
|
||||||
setHeight(HEIGHTWIZARD);
|
setHeight(HEIGHTWIZARD);
|
||||||
|
|
||||||
this.trId = trId;
|
|
||||||
unionSession = new UnionSession();
|
unionSession = new UnionSession();
|
||||||
unionSession.setTrId(trId);
|
unionSession.setTrId(trId);
|
||||||
|
|
||||||
|
|
|
@ -4,20 +4,24 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
|
||||||
|
|
||||||
import com.allen_sauer.gwt.log.client.Log;
|
import com.allen_sauer.gwt.log.client.Log;
|
||||||
import com.google.gwt.core.client.EntryPoint;
|
import com.google.gwt.core.client.EntryPoint;
|
||||||
|
import com.google.gwt.core.client.GWT;
|
||||||
import com.google.web.bindery.event.shared.SimpleEventBus;
|
import com.google.web.bindery.event.shared.SimpleEventBus;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author "Giancarlo Panichi"
|
* @author "Giancarlo Panichi" email: <a
|
||||||
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class UnionWizardTDEntry implements EntryPoint {
|
public class UnionWizardTDEntry implements EntryPoint {
|
||||||
|
|
||||||
|
public UnionWizardMessages msgs = GWT.create(UnionWizardMessages.class);
|
||||||
|
|
||||||
public void onModuleLoad() {
|
public void onModuleLoad() {
|
||||||
TRId trId=new TRId();
|
TRId trId = new TRId();
|
||||||
SimpleEventBus eventBus=new SimpleEventBus();
|
SimpleEventBus eventBus = new SimpleEventBus();
|
||||||
UnionWizardTD unionWizard= new UnionWizardTD(trId, "Union",eventBus);
|
UnionWizardTD unionWizard = new UnionWizardTD(trId,
|
||||||
|
msgs.unionWizardHead(), eventBus);
|
||||||
Log.info(unionWizard.getId());
|
Log.info(unionWizard.getId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,12 @@ import com.google.gwt.core.client.GWT;
|
||||||
import com.google.gwt.resources.client.ClientBundle;
|
import com.google.gwt.resources.client.ClientBundle;
|
||||||
import com.google.gwt.resources.client.ImageResource;
|
import com.google.gwt.resources.client.ImageResource;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author giancarlo
|
||||||
|
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||||
|
*
|
||||||
|
*/
|
||||||
public interface UnionResourceBundle extends ClientBundle {
|
public interface UnionResourceBundle extends ClientBundle {
|
||||||
|
|
||||||
public static final UnionResourceBundle INSTANCE=GWT.create(UnionResourceBundle.class);
|
public static final UnionResourceBundle INSTANCE=GWT.create(UnionResourceBundle.class);
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
sendButton = Send
|
|
||||||
nameField = Enter your name
|
|
|
@ -1,2 +0,0 @@
|
||||||
sendButton = Envoyer
|
|
||||||
nameField = Entrez votre nom
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
unionWizardHead = Union
|
||||||
|
tabResourcesSelectionCardHead = Select Tabular Resource for Union
|
||||||
|
attentionThisTabularResourceDoesNotHaveAValidTable = This tabular resource does not have a valid table!
|
||||||
|
delete = Delete
|
||||||
|
woultYouLikeToDeleteThisTabularResource = Would you like to delete this tabular resource?
|
||||||
|
woultYouLikeToDeleteThisTabularResourceWithoutTable = Would you like to delete this tabular resource without table?
|
||||||
|
errorOnDeleteTabularResourceFixed = Error on delete Tabular Resource:
|
||||||
|
errorRetrievingInfomationOnTRFixed = Error retrienving information on current tabular resource:
|
||||||
|
nameColumn = Name
|
||||||
|
typeColumn = Type
|
||||||
|
tableTypeColumn = Table Type
|
||||||
|
agencyColumn = Agency
|
||||||
|
ownerColumn = Owner
|
||||||
|
creationDateColumn = Creation Date
|
||||||
|
itemDelete = Delete
|
||||||
|
errorRetrievingTabularResources = Error retrieving tabular resources on server!
|
||||||
|
columnMappingCardHead = Mapping beetween Tabular Resources
|
||||||
|
attentionCreatesAValidColumnMap = Creates a valid column map!
|
||||||
|
errorRetrievingSourceColumns = Error retrieving source columns on server!
|
||||||
|
errorRetrievingUnionColumns = Error retrieving union columns on server!
|
||||||
|
comboSourceColumnEmptyText = Select a column...
|
||||||
|
comboUnionEmptyText = Select a column...
|
||||||
|
unionWithFixed = Union with:
|
||||||
|
typeFixed = Type:
|
||||||
|
ownerFixed = Owner:
|
||||||
|
summaryUnion = Union Summary
|
||||||
|
errorInUnionFixed = An error occured in union.
|
||||||
|
|
|
@ -0,0 +1,27 @@
|
||||||
|
unionWizardHead = Unión
|
||||||
|
tabResourcesSelectionCardHead = Seleccione una Tabular Resource para la Unión
|
||||||
|
attentionThisTabularResourceDoesNotHaveAValidTable = Esta tabular resource no tiene una tabla válida!
|
||||||
|
delete = Borrar
|
||||||
|
woultYouLikeToDeleteThisTabularResource = Quieres eliminar esta tabular resource?
|
||||||
|
woultYouLikeToDeleteThisTabularResourceWithoutTable = Quieres eliminar esta tabular resource que no tiene una tabla válida?
|
||||||
|
errorOnDeleteTabularResourceFixed = Error eliminando la tabular resource:
|
||||||
|
errorRetrievingInfomationOnTRFixed = Error en la recuperación de información información relacionada con la tabular resource:
|
||||||
|
nameColumn = Nombre
|
||||||
|
typeColumn = Tipo
|
||||||
|
tableTypeColumn = Tipo Tabla
|
||||||
|
agencyColumn = Agencia
|
||||||
|
ownerColumn = Propietario
|
||||||
|
creationDateColumn = Fecha Creacion
|
||||||
|
itemDelete = Borrar
|
||||||
|
errorRetrievingTabularResources = Error al recuperar las tabular resources del servidor!
|
||||||
|
columnMappingCardHead = Correspondencia entre tabular resources
|
||||||
|
attentionCreatesAValidColumnMap = Crear un mapa válido entre columnas!
|
||||||
|
errorRetrievingSourceColumns = Error al recuperar las columnas que son fuentes para el mapeo!
|
||||||
|
errorRetrievingUnionColumns = Error al recuperar las columnas que son la unión para el mapeo!
|
||||||
|
comboSourceColumnEmptyText = Seleccione una columna...
|
||||||
|
comboUnionEmptyText = Seleccione una columna...
|
||||||
|
unionWithFixed = Unión con:
|
||||||
|
typeFixed = Tipo:
|
||||||
|
ownerFixed = Propietario:
|
||||||
|
summaryUnion = Resumen Unión
|
||||||
|
errorInUnionFixed = Error en la operación de unión.
|
|
@ -0,0 +1,27 @@
|
||||||
|
unionWizardHead = Unione
|
||||||
|
tabResourcesSelectionCardHead = Seleziona una Tabular Resource per Unione
|
||||||
|
attentionThisTabularResourceDoesNotHaveAValidTable = Questa tabular resource non ha una tabella valida!
|
||||||
|
delete = Elimina
|
||||||
|
woultYouLikeToDeleteThisTabularResource = Si desidera cancellare questa tabular resource?
|
||||||
|
woultYouLikeToDeleteThisTabularResourceWithoutTable = Si desidera cancellare questa tabular resource senza tabella valida?
|
||||||
|
errorOnDeleteTabularResourceFixed = Errore eliminando la tabular resource:
|
||||||
|
errorRetrievingInfomationOnTRFixed = Errore recuperando le informazioni sulla tabular resource:
|
||||||
|
nameColumn = Nome
|
||||||
|
typeColumn = Tipo
|
||||||
|
tableTypeColumn = Tipo Tabella
|
||||||
|
agencyColumn = Agenzia
|
||||||
|
ownerColumn = Proprietario
|
||||||
|
creationDateColumn = Data Creazione
|
||||||
|
itemDelete = Elimina
|
||||||
|
errorRetrievingTabularResources = Errore recuperando le tabular resources dal server!
|
||||||
|
columnMappingCardHead = Mappatura tra tabular resources
|
||||||
|
attentionCreatesAValidColumnMap = Crea un mappa valida tra colonne!
|
||||||
|
errorRetrievingSourceColumns = Errore recuperando le colonne sorgenti per la mappatura dal server!
|
||||||
|
errorRetrievingUnionColumns = Errore recuperando le colonne unione per la mappatura dal server!
|
||||||
|
comboSourceColumnEmptyText = Seleziona una colonna...
|
||||||
|
comboUnionEmptyText = Seleziona una colonna...
|
||||||
|
unionWithFixed = Unione con:
|
||||||
|
typeFixed = Tipo:
|
||||||
|
ownerFixed = Proprietario:
|
||||||
|
summaryUnion = Sommario Unione
|
||||||
|
errorInUnionFixed = Errore nell''operazione di unione.
|
Loading…
Reference in New Issue