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-table-widget@120269 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
5853c4c945
commit
93e46eaf41
|
@ -2,6 +2,7 @@
|
||||||
<module rename-to='TableWidget'>
|
<module rename-to='TableWidget'>
|
||||||
<!-- Inherit the core Web Toolkit stuff. -->
|
<!-- Inherit the core Web Toolkit stuff. -->
|
||||||
<inherits name='com.google.gwt.user.User' />
|
<inherits name='com.google.gwt.user.User' />
|
||||||
|
<!-- <inherits name="com.google.gwt.i18n.I18N" /> -->
|
||||||
|
|
||||||
<!-- We need the JUnit module in the main module, -->
|
<!-- We need the JUnit module in the main module, -->
|
||||||
<!-- otherwise eclipse complains (Google plugin bug?) -->
|
<!-- otherwise eclipse complains (Google plugin bug?) -->
|
||||||
|
@ -10,7 +11,7 @@
|
||||||
<!-- Inherit the default GWT style sheet. You can change -->
|
<!-- Inherit the default GWT style sheet. You can change -->
|
||||||
<!-- the theme of your GWT application by uncommenting -->
|
<!-- the theme of your GWT application by uncommenting -->
|
||||||
<!-- any one of the following lines. -->
|
<!-- any one of the following lines. -->
|
||||||
<inherits name='com.google.gwt.user.theme.standard.Standard' />
|
<!-- <inherits name='com.google.gwt.user.theme.standard.Standard' /> -->
|
||||||
<!-- <inherits name='com.google.gwt.user.theme.chrome.Chrome'/> -->
|
<!-- <inherits name='com.google.gwt.user.theme.chrome.Chrome'/> -->
|
||||||
<!-- <inherits name='com.google.gwt.user.theme.dark.Dark'/> -->
|
<!-- <inherits name='com.google.gwt.user.theme.dark.Dark'/> -->
|
||||||
|
|
||||||
|
@ -26,6 +27,26 @@
|
||||||
<!-- Specify the app entry point class. -->
|
<!-- Specify the app entry point class. -->
|
||||||
<!-- <entry-point class='org.gcube.portlets.user.td.tablewidget.client.TableWidgetEntry' /> -->
|
<!-- <entry-point class='org.gcube.portlets.user.td.tablewidget.client.TableWidgetEntry' /> -->
|
||||||
|
|
||||||
|
<!--
|
||||||
|
<set-configuration-property name="locale.cookie"
|
||||||
|
value="TDLangCookie" />
|
||||||
|
<set-configuration-property name="locale.queryparam"
|
||||||
|
value="TDLang" />
|
||||||
|
<set-configuration-property name="locale.usemeta"
|
||||||
|
value="Y" />
|
||||||
|
<set-configuration-property name="locale.useragent"
|
||||||
|
value="Y" />
|
||||||
|
|
||||||
|
<set-configuration-property name="locale.searchorder"
|
||||||
|
value="cookie,queryparam,meta,useragent" />
|
||||||
|
|
||||||
|
<extend-property name="locale" values="en" />
|
||||||
|
<extend-property name="locale" values="it" />
|
||||||
|
<extend-property name="locale" values="es" />
|
||||||
|
<set-property name="locale" value="en, it, es" />
|
||||||
|
<set-property-fallback name="locale" value="en" />
|
||||||
|
-->
|
||||||
|
|
||||||
<!-- Specify the paths for translatable code -->
|
<!-- Specify the paths for translatable code -->
|
||||||
<source path='client' />
|
<source path='client' />
|
||||||
<source path='shared' />
|
<source path='shared' />
|
||||||
|
|
|
@ -13,6 +13,7 @@ import org.gcube.portlets.user.td.tablewidget.client.type.TableTypeElement;
|
||||||
import org.gcube.portlets.user.td.tablewidget.client.type.TableTypeProperties;
|
import org.gcube.portlets.user.td.tablewidget.client.type.TableTypeProperties;
|
||||||
import org.gcube.portlets.user.td.tablewidget.client.type.TableTypeStore;
|
import org.gcube.portlets.user.td.tablewidget.client.type.TableTypeStore;
|
||||||
import org.gcube.portlets.user.td.tablewidget.client.util.UtilsGXT3;
|
import org.gcube.portlets.user.td.tablewidget.client.util.UtilsGXT3;
|
||||||
|
import org.gcube.portlets.user.td.widgetcommonevent.client.CommonMessages;
|
||||||
import org.gcube.portlets.user.td.widgetcommonevent.client.event.ChangeTableRequestEvent;
|
import org.gcube.portlets.user.td.widgetcommonevent.client.event.ChangeTableRequestEvent;
|
||||||
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.ChangeTableRequestType;
|
import org.gcube.portlets.user.td.widgetcommonevent.client.type.ChangeTableRequestType;
|
||||||
|
@ -57,16 +58,25 @@ public class ChangeTableTypePanel extends FramedPanel implements
|
||||||
private ChangeTableTypeSession changeTableTypeSession;
|
private ChangeTableTypeSession changeTableTypeSession;
|
||||||
|
|
||||||
private ComboBox<TableTypeElement> comboTableType;
|
private ComboBox<TableTypeElement> comboTableType;
|
||||||
private TextButton change;
|
private TextButton btnApply;
|
||||||
|
private CommonMessages msgsCommon;
|
||||||
|
private TableWidgetMessages msgs;
|
||||||
|
|
||||||
public ChangeTableTypePanel(TRId trId, EventBus eventBus) {
|
public ChangeTableTypePanel(TRId trId, EventBus eventBus) {
|
||||||
super();
|
super();
|
||||||
this.trId = trId;
|
this.trId = trId;
|
||||||
this.eventBus = eventBus;
|
this.eventBus = eventBus;
|
||||||
forceLayoutOnResize = true;
|
forceLayoutOnResize = true;
|
||||||
|
initMessages();
|
||||||
create();
|
create();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void initMessages() {
|
||||||
|
msgsCommon = GWT.create(CommonMessages.class);
|
||||||
|
msgs = GWT.create(TableWidgetMessages.class);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
protected void create() {
|
protected void create() {
|
||||||
setWidth(WIDTH);
|
setWidth(WIDTH);
|
||||||
setHeight(HEIGHT);
|
setHeight(HEIGHT);
|
||||||
|
@ -86,18 +96,21 @@ public class ChangeTableTypePanel extends FramedPanel implements
|
||||||
|
|
||||||
Log.trace("ComboTableType created");
|
Log.trace("ComboTableType created");
|
||||||
|
|
||||||
comboTableType.setEmptyText("Select a Table Type...");
|
comboTableType.setEmptyText(msgs.comboTableTypeEmptyText());
|
||||||
comboTableType.setItemId("ComboTableType");
|
comboTableType.setItemId("ComboTableType");
|
||||||
comboTableType.setWidth("200px");
|
comboTableType.setWidth("200px");
|
||||||
comboTableType.setEditable(false);
|
comboTableType.setEditable(false);
|
||||||
comboTableType.setTriggerAction(TriggerAction.ALL);
|
comboTableType.setTriggerAction(TriggerAction.ALL);
|
||||||
|
|
||||||
change = new TextButton("Apply");
|
FieldLabel comboTableTypeLabel = new FieldLabel(comboTableType,
|
||||||
change.setIcon(ResourceBundle.INSTANCE.tableType());
|
msgs.comboTableTypeLabel());
|
||||||
change.setIconAlign(IconAlign.RIGHT);
|
|
||||||
change.setTitle("Apply Table Type");
|
|
||||||
|
|
||||||
change.addSelectHandler(new SelectHandler() {
|
btnApply = new TextButton(msgs.btnApplyText());
|
||||||
|
btnApply.setIcon(ResourceBundle.INSTANCE.tableType());
|
||||||
|
btnApply.setIconAlign(IconAlign.RIGHT);
|
||||||
|
btnApply.setToolTip(msgs.btnApplyToolTip());
|
||||||
|
|
||||||
|
btnApply.addSelectHandler(new SelectHandler() {
|
||||||
|
|
||||||
public void onSelect(SelectEvent event) {
|
public void onSelect(SelectEvent event) {
|
||||||
onChangeTableType();
|
onChangeTableType();
|
||||||
|
@ -109,10 +122,9 @@ public class ChangeTableTypePanel extends FramedPanel implements
|
||||||
vl.setScrollMode(ScrollMode.AUTO);
|
vl.setScrollMode(ScrollMode.AUTO);
|
||||||
vl.setAdjustForScroll(true);
|
vl.setAdjustForScroll(true);
|
||||||
|
|
||||||
vl.add(new FieldLabel(comboTableType, "Table Type"),
|
vl.add(comboTableTypeLabel, new VerticalLayoutData(1, -1));
|
||||||
new VerticalLayoutData(1, -1));
|
vl.add(btnApply, new VerticalLayoutData(-1, -1, new Margins(10, 0, 10,
|
||||||
vl.add(change,
|
0)));
|
||||||
new VerticalLayoutData(-1, -1, new Margins(10, 0, 10, 0)));
|
|
||||||
|
|
||||||
add(vl);
|
add(vl);
|
||||||
show();
|
show();
|
||||||
|
@ -128,10 +140,12 @@ public class ChangeTableTypePanel extends FramedPanel implements
|
||||||
tableTypeElement.getTableType());
|
tableTypeElement.getTableType());
|
||||||
callChangeTableType();
|
callChangeTableType();
|
||||||
} else {
|
} else {
|
||||||
UtilsGXT3.alert("Error", "Invalid table type!");
|
UtilsGXT3.alert(msgsCommon.error(),
|
||||||
|
msgs.errorInvalidTableType());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
UtilsGXT3.alert("Attention", "Select a table type!");
|
UtilsGXT3.alert(msgsCommon.attention(),
|
||||||
|
msgs.attentionSelectATableType());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -146,19 +160,20 @@ public class ChangeTableTypePanel extends FramedPanel 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 {
|
||||||
if (caught instanceof TDGWTIsFinalException) {
|
if (caught instanceof TDGWTIsFinalException) {
|
||||||
Log.error(caught.getLocalizedMessage());
|
Log.error(caught.getLocalizedMessage());
|
||||||
UtilsGXT3.alert("Error Final",
|
UtilsGXT3.alert(msgsCommon.errorFinal(),
|
||||||
caught.getLocalizedMessage());
|
caught.getLocalizedMessage());
|
||||||
} else {
|
} else {
|
||||||
Log.debug("Change The Table Type Error: "
|
Log.debug("Change The Table Type Error: "
|
||||||
+ caught.getLocalizedMessage());
|
+ caught.getLocalizedMessage());
|
||||||
UtilsGXT3
|
UtilsGXT3.alert(
|
||||||
.alert("Error Changing The Table Type",
|
msgsCommon.error(),
|
||||||
"Error in invocation of Change Table Type operation! "+caught.getLocalizedMessage());
|
msgs.errorInChangeTableTypeOperationFixed()
|
||||||
|
+ caught.getLocalizedMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -191,12 +206,12 @@ public class ChangeTableTypePanel extends FramedPanel 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 retrieving table: "
|
Log.error("Error retrieving table: "
|
||||||
+ caught.getLocalizedMessage());
|
+ caught.getLocalizedMessage());
|
||||||
UtilsGXT3.alert("Error retrieving table",
|
UtilsGXT3.alert(msgsCommon.error(),
|
||||||
caught.getLocalizedMessage());
|
caught.getLocalizedMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -235,7 +250,8 @@ public class ChangeTableTypePanel extends FramedPanel implements
|
||||||
public void operationComplete(OperationResult operationResult) {
|
public void operationComplete(OperationResult operationResult) {
|
||||||
ChangeTableWhy why = ChangeTableWhy.TABLEUPDATED;
|
ChangeTableWhy why = ChangeTableWhy.TABLEUPDATED;
|
||||||
ChangeTableRequestEvent changeTableRequestEvent = new ChangeTableRequestEvent(
|
ChangeTableRequestEvent changeTableRequestEvent = new ChangeTableRequestEvent(
|
||||||
ChangeTableRequestType.CHANGETABLETYPE, operationResult.getTrId(), why);
|
ChangeTableRequestType.CHANGETABLETYPE,
|
||||||
|
operationResult.getTrId(), why);
|
||||||
eventBus.fireEvent(changeTableRequestEvent);
|
eventBus.fireEvent(changeTableRequestEvent);
|
||||||
close();
|
close();
|
||||||
}
|
}
|
||||||
|
@ -248,10 +264,12 @@ public class ChangeTableTypePanel extends FramedPanel implements
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void operationStopped(OperationResult operationResult, String reason, String details) {
|
public void operationStopped(OperationResult operationResult,
|
||||||
|
String reason, String details) {
|
||||||
ChangeTableWhy why = ChangeTableWhy.TABLECURATION;
|
ChangeTableWhy why = ChangeTableWhy.TABLECURATION;
|
||||||
ChangeTableRequestEvent changeTableRequestEvent = new ChangeTableRequestEvent(
|
ChangeTableRequestEvent changeTableRequestEvent = new ChangeTableRequestEvent(
|
||||||
ChangeTableRequestType.CHANGETABLETYPE, operationResult.getTrId(), why);
|
ChangeTableRequestType.CHANGETABLETYPE,
|
||||||
|
operationResult.getTrId(), why);
|
||||||
eventBus.fireEvent(changeTableRequestEvent);
|
eventBus.fireEvent(changeTableRequestEvent);
|
||||||
close();
|
close();
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,7 @@ import org.gcube.portlets.user.td.gwtservice.shared.tr.clone.CloneTabularResourc
|
||||||
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.tablewidget.client.util.UtilsGXT3;
|
import org.gcube.portlets.user.td.tablewidget.client.util.UtilsGXT3;
|
||||||
|
import org.gcube.portlets.user.td.widgetcommonevent.client.CommonMessages;
|
||||||
import org.gcube.portlets.user.td.widgetcommonevent.client.event.ChangeTableRequestEvent;
|
import org.gcube.portlets.user.td.widgetcommonevent.client.event.ChangeTableRequestEvent;
|
||||||
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.ChangeTableRequestType;
|
import org.gcube.portlets.user.td.widgetcommonevent.client.type.ChangeTableRequestType;
|
||||||
|
@ -16,18 +17,35 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.OperationResult;
|
||||||
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
|
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.GWT;
|
||||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||||
import com.google.web.bindery.event.shared.EventBus;
|
import com.google.web.bindery.event.shared.EventBus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author giancarlo
|
||||||
|
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||||
|
*
|
||||||
|
*/
|
||||||
public class CloneTabularResource implements MonitorDialogListener {
|
public class CloneTabularResource implements MonitorDialogListener {
|
||||||
private TRId trId;
|
private TRId trId;
|
||||||
private EventBus eventBus;
|
private EventBus eventBus;
|
||||||
|
|
||||||
private CloneTabularResourceSession cloneTabularResourceSession;
|
private CloneTabularResourceSession cloneTabularResourceSession;
|
||||||
|
|
||||||
|
private TableWidgetMessages msgs;
|
||||||
|
private CommonMessages msgsCommon;
|
||||||
|
|
||||||
public CloneTabularResource(TRId trId, EventBus eventBus) {
|
public CloneTabularResource(TRId trId, EventBus eventBus) {
|
||||||
this.trId = trId;
|
this.trId = trId;
|
||||||
this.eventBus = eventBus;
|
this.eventBus = eventBus;
|
||||||
|
initMessages();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void initMessages(){
|
||||||
|
msgsCommon = GWT.create(CommonMessages.class);
|
||||||
|
msgs = GWT.create(TableWidgetMessages.class);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void cloneTR() {
|
public void cloneTR() {
|
||||||
|
@ -47,14 +65,14 @@ public class CloneTabularResource implements MonitorDialogListener {
|
||||||
} 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("Clone Error: "
|
Log.debug("Clone Error: "
|
||||||
+ caught.getLocalizedMessage());
|
+ caught.getLocalizedMessage());
|
||||||
UtilsGXT3.alert(
|
UtilsGXT3.alert(
|
||||||
"Error Cloning Tabular Resource",
|
msgsCommon.error(),
|
||||||
"Error in clone operation! "+caught.getLocalizedMessage());
|
msgs.errorInCloneFixed()+caught.getLocalizedMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,14 +2,31 @@ package org.gcube.portlets.user.td.tablewidget.client;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
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.event.shared.EventBus;
|
||||||
|
import com.google.gwt.event.shared.SimpleEventBus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author giancarlo
|
||||||
|
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||||
|
*
|
||||||
|
*/
|
||||||
public class TableWidgetEntry implements EntryPoint {
|
public class TableWidgetEntry implements EntryPoint {
|
||||||
|
|
||||||
|
|
||||||
public void onModuleLoad() {
|
public void onModuleLoad() {
|
||||||
|
|
||||||
Log.info("Hello!");
|
Log.info("Hello!");
|
||||||
|
EventBus eventBus= new SimpleEventBus();
|
||||||
|
TRId trId=new TRId("1");
|
||||||
|
|
||||||
|
|
||||||
|
CloneTabularResource cloneTabularResource= new CloneTabularResource(trId, eventBus);
|
||||||
|
cloneTabularResource.cloneTR();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,191 @@
|
||||||
|
package org.gcube.portlets.user.td.tablewidget.client;
|
||||||
|
|
||||||
|
import com.google.gwt.i18n.client.Messages;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author giancarlo
|
||||||
|
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public interface TableWidgetMessages extends Messages {
|
||||||
|
|
||||||
|
@DefaultMessage("Error in clone operation! ")
|
||||||
|
String errorInCloneFixed();
|
||||||
|
|
||||||
|
@DefaultMessage("Select a Table Type...")
|
||||||
|
String comboTableTypeEmptyText();
|
||||||
|
|
||||||
|
@DefaultMessage("Apply")
|
||||||
|
String btnApplyText();
|
||||||
|
|
||||||
|
@DefaultMessage("Apply Table Type")
|
||||||
|
String btnApplyToolTip();
|
||||||
|
|
||||||
|
@DefaultMessage("Table Type")
|
||||||
|
String comboTableTypeLabel();
|
||||||
|
|
||||||
|
@DefaultMessage("Invalid table type!")
|
||||||
|
String errorInvalidTableType();
|
||||||
|
|
||||||
|
@DefaultMessage("Select a table type!")
|
||||||
|
String attentionSelectATableType();
|
||||||
|
|
||||||
|
@DefaultMessage("Error in invocation of Change Table Type operation.")
|
||||||
|
String errorInChangeTableTypeOperationFixed();
|
||||||
|
|
||||||
|
@DefaultMessage("Select a column...")
|
||||||
|
String comboLatitudeEmptyText();
|
||||||
|
|
||||||
|
@DefaultMessage("Select a column...")
|
||||||
|
String comboLongitudeEmptyMessage();
|
||||||
|
|
||||||
|
@DefaultMessage("Points")
|
||||||
|
String columnFieldDefault();
|
||||||
|
|
||||||
|
@DefaultMessage("Column Label")
|
||||||
|
String columnFieldLabel();
|
||||||
|
|
||||||
|
@DefaultMessage("Create")
|
||||||
|
String btnCreatePointText();
|
||||||
|
|
||||||
|
@DefaultMessage("Create Point")
|
||||||
|
String btnCreatePointToolTip();
|
||||||
|
|
||||||
|
@DefaultMessage("Longitude")
|
||||||
|
String comboLongitudeLabel();
|
||||||
|
|
||||||
|
@DefaultMessage("Latitude")
|
||||||
|
String comboLatitudeLabel();
|
||||||
|
|
||||||
|
@DefaultMessage("Select a column label!")
|
||||||
|
String attentionSelectAColumnLabel();
|
||||||
|
|
||||||
|
@DefaultMessage("Select Latitude!")
|
||||||
|
String attentionSelectLatitude();
|
||||||
|
|
||||||
|
@DefaultMessage("Select Longitude!")
|
||||||
|
String attentionSelectLongitude();
|
||||||
|
|
||||||
|
@DefaultMessage("Error creating a point: ")
|
||||||
|
String errorCreatingAPointFixed();
|
||||||
|
|
||||||
|
@DefaultMessage("Error retrieving columns of tabular resource: ")
|
||||||
|
String errorRetrievingColumsOfTabularResourceFixed();
|
||||||
|
|
||||||
|
@DefaultMessage("No Integer or Numeric column is present in the tabular resource!")
|
||||||
|
String attentionNoIntegerOrNumericColumnIsPresent();
|
||||||
|
|
||||||
|
@DefaultMessage("Select a column...")
|
||||||
|
String comboCSquareColumnEmptyText();
|
||||||
|
|
||||||
|
@DefaultMessage("Select a resolution...")
|
||||||
|
String comboDownscaleEmptyText();
|
||||||
|
|
||||||
|
@DefaultMessage("Downscale")
|
||||||
|
String btnDownscaleText();
|
||||||
|
|
||||||
|
@DefaultMessage("Downscale C-Square")
|
||||||
|
String btnDownscaleToolTip();
|
||||||
|
|
||||||
|
@DefaultMessage("Column")
|
||||||
|
String comboCSquareColumnLabel();
|
||||||
|
|
||||||
|
@DefaultMessage("Resolution")
|
||||||
|
String comboDownscaleLabel();
|
||||||
|
|
||||||
|
@DefaultMessage("Select Resolution!")
|
||||||
|
String attentionSelectResolution();
|
||||||
|
|
||||||
|
@DefaultMessage("Select C-Square column!")
|
||||||
|
String attentionSelectCSquareColumn();
|
||||||
|
|
||||||
|
@DefaultMessage("No text column is present in the tabular resource. C-Square is a text column data type!")
|
||||||
|
String attentionNoTextColumnIsPresentCSquareIsTextColumn();
|
||||||
|
|
||||||
|
@DefaultMessage("Select a type...")
|
||||||
|
String comboGsCoordinateTypeEmptyText();
|
||||||
|
|
||||||
|
@DefaultMessage("Select a resolution...")
|
||||||
|
String comboResolutionEmptyText();
|
||||||
|
|
||||||
|
@DefaultMessage("Resolution")
|
||||||
|
String comboResolutionLabel();
|
||||||
|
|
||||||
|
@DefaultMessage("True")
|
||||||
|
String hasQuadrantTrue();
|
||||||
|
|
||||||
|
@DefaultMessage("False")
|
||||||
|
String hasQuadrantFalse();
|
||||||
|
|
||||||
|
@DefaultMessage("No Integer column is present in the tabular resource!")
|
||||||
|
String attentionNoIntegerColumnIsPresent();
|
||||||
|
|
||||||
|
@DefaultMessage("Has Quadrant")
|
||||||
|
String hasQuadrantLabel();
|
||||||
|
|
||||||
|
@DefaultMessage("Select true if you want select quadrant column")
|
||||||
|
String hasQuadrantToolTip();
|
||||||
|
|
||||||
|
@DefaultMessage("Select a column...")
|
||||||
|
String comboQuadrantEmptyText();
|
||||||
|
|
||||||
|
@DefaultMessage("Quadrant")
|
||||||
|
String comboQuadrantLabel();
|
||||||
|
|
||||||
|
@DefaultMessage("Create")
|
||||||
|
String btnCreateCoordinatesText();
|
||||||
|
|
||||||
|
@DefaultMessage("Create Geospatial Coordinates")
|
||||||
|
String btnCreateCoordinatesToolTip();
|
||||||
|
|
||||||
|
@DefaultMessage("Type")
|
||||||
|
String comboGsCoordinatesTypeLabel();
|
||||||
|
|
||||||
|
@DefaultMessage("Select Quadrant column!")
|
||||||
|
String attentionSelectQuadrantColumn();
|
||||||
|
|
||||||
|
@DefaultMessage("Select valid geospatial coordinates type!")
|
||||||
|
String selectValidGeospatialCoordinatesType();
|
||||||
|
|
||||||
|
@DefaultMessage("Invalid Geospatial Coordinates Type!")
|
||||||
|
String attentionInvalidGeospatialCoordinateType();
|
||||||
|
|
||||||
|
@DefaultMessage("Error creating geospatial coordinates: ")
|
||||||
|
String errorCreatingGeospatialCoordinatesFixed();
|
||||||
|
|
||||||
|
@DefaultMessage("Error retrieving current tabular resource id!")
|
||||||
|
String errorRetrievingCurrentTabularResourceId();
|
||||||
|
|
||||||
|
@DefaultMessage("Undo not applicable")
|
||||||
|
String attentionUndoNotApplicable();
|
||||||
|
|
||||||
|
@DefaultMessage("Date:")
|
||||||
|
String dateFixed();
|
||||||
|
|
||||||
|
@DefaultMessage("Description:")
|
||||||
|
String descriptionFixed();
|
||||||
|
|
||||||
|
@DefaultMessage("Step")
|
||||||
|
String stepCol();
|
||||||
|
|
||||||
|
@DefaultMessage("Date")
|
||||||
|
String dateCol();
|
||||||
|
|
||||||
|
@DefaultMessage("Undo")
|
||||||
|
String rollBackCol();
|
||||||
|
|
||||||
|
@DefaultMessage("Undo")
|
||||||
|
String btnCellUndoTitle();
|
||||||
|
|
||||||
|
@DefaultMessage("Empty")
|
||||||
|
String gridHistoryEmptyText();
|
||||||
|
|
||||||
|
@DefaultMessage("Error retrieving history!")
|
||||||
|
String errorRetrievingHistory();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -10,8 +10,10 @@ import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTSessionExpire
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.geometry.GeometryCreatePointSession;
|
import org.gcube.portlets.user.td.gwtservice.shared.geometry.GeometryCreatePointSession;
|
||||||
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.tablewidget.client.TableWidgetMessages;
|
||||||
import org.gcube.portlets.user.td.tablewidget.client.resources.ResourceBundle;
|
import org.gcube.portlets.user.td.tablewidget.client.resources.ResourceBundle;
|
||||||
import org.gcube.portlets.user.td.tablewidget.client.util.UtilsGXT3;
|
import org.gcube.portlets.user.td.tablewidget.client.util.UtilsGXT3;
|
||||||
|
import org.gcube.portlets.user.td.widgetcommonevent.client.CommonMessages;
|
||||||
import org.gcube.portlets.user.td.widgetcommonevent.client.event.ChangeTableRequestEvent;
|
import org.gcube.portlets.user.td.widgetcommonevent.client.event.ChangeTableRequestEvent;
|
||||||
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.ChangeTableRequestType;
|
import org.gcube.portlets.user.td.widgetcommonevent.client.type.ChangeTableRequestType;
|
||||||
|
@ -44,7 +46,6 @@ import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler;
|
||||||
import com.sencha.gxt.widget.core.client.form.ComboBox;
|
import com.sencha.gxt.widget.core.client.form.ComboBox;
|
||||||
import com.sencha.gxt.widget.core.client.form.FieldLabel;
|
import com.sencha.gxt.widget.core.client.form.FieldLabel;
|
||||||
import com.sencha.gxt.widget.core.client.form.TextField;
|
import com.sencha.gxt.widget.core.client.form.TextField;
|
||||||
import com.sencha.gxt.widget.core.client.info.Info;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -64,12 +65,14 @@ public class GeometryCreatePointPanel extends FramedPanel implements
|
||||||
private ArrayList<ColumnData> columns;
|
private ArrayList<ColumnData> columns;
|
||||||
private VerticalLayoutContainer vl;
|
private VerticalLayoutContainer vl;
|
||||||
|
|
||||||
private TextButton createPointButton;
|
private TextButton btnCreatePoint;
|
||||||
private ComboBox<ColumnData> comboLatitude;
|
private ComboBox<ColumnData> comboLatitude;
|
||||||
private ComboBox<ColumnData> comboLongitude;
|
private ComboBox<ColumnData> comboLongitude;
|
||||||
private ListStore<ColumnData> storeComboLatitude;
|
private ListStore<ColumnData> storeComboLatitude;
|
||||||
private ListStore<ColumnData> storeComboLongitude;
|
private ListStore<ColumnData> storeComboLongitude;
|
||||||
private TextField columnLabelField;
|
private TextField columnField;
|
||||||
|
private CommonMessages msgsCommon;
|
||||||
|
private TableWidgetMessages msgs;
|
||||||
|
|
||||||
public GeometryCreatePointPanel(TRId trId, EventBus eventBus) {
|
public GeometryCreatePointPanel(TRId trId, EventBus eventBus) {
|
||||||
super();
|
super();
|
||||||
|
@ -78,10 +81,18 @@ public class GeometryCreatePointPanel extends FramedPanel implements
|
||||||
this.eventBus = eventBus;
|
this.eventBus = eventBus;
|
||||||
this.created = false;
|
this.created = false;
|
||||||
forceLayoutOnResize = true;
|
forceLayoutOnResize = true;
|
||||||
|
|
||||||
|
initMessages();
|
||||||
retrieveColumns();
|
retrieveColumns();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void initMessages() {
|
||||||
|
msgsCommon = GWT.create(CommonMessages.class);
|
||||||
|
msgs = GWT.create(TableWidgetMessages.class);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
protected void testCreated() {
|
protected void testCreated() {
|
||||||
if (created) {
|
if (created) {
|
||||||
updateCombo();
|
updateCombo();
|
||||||
|
@ -122,22 +133,6 @@ public class GeometryCreatePointPanel extends FramedPanel implements
|
||||||
ColumnDataPropertiesCombo propsColumnData = GWT
|
ColumnDataPropertiesCombo propsColumnData = GWT
|
||||||
.create(ColumnDataPropertiesCombo.class);
|
.create(ColumnDataPropertiesCombo.class);
|
||||||
|
|
||||||
// Latitude
|
|
||||||
storeComboLatitude = new ListStore<ColumnData>(propsColumnData.id());
|
|
||||||
storeComboLatitude.addAll(columns);
|
|
||||||
|
|
||||||
comboLatitude = new ComboBox<ColumnData>(storeComboLatitude,
|
|
||||||
propsColumnData.label());
|
|
||||||
Log.trace("Combo ColumnData created");
|
|
||||||
|
|
||||||
addHandlersForComboColumnLatitude(propsColumnData.label());
|
|
||||||
|
|
||||||
comboLatitude.setEmptyText("Select a column...");
|
|
||||||
comboLatitude.setWidth(191);
|
|
||||||
comboLatitude.setTypeAhead(false);
|
|
||||||
comboLatitude.setEditable(false);
|
|
||||||
comboLatitude.setTriggerAction(TriggerAction.ALL);
|
|
||||||
|
|
||||||
// Longitude
|
// Longitude
|
||||||
storeComboLongitude = new ListStore<ColumnData>(propsColumnData.id());
|
storeComboLongitude = new ListStore<ColumnData>(propsColumnData.id());
|
||||||
storeComboLongitude.addAll(columns);
|
storeComboLongitude.addAll(columns);
|
||||||
|
@ -148,24 +143,47 @@ public class GeometryCreatePointPanel extends FramedPanel implements
|
||||||
|
|
||||||
addHandlersForComboColumnLongitude(propsColumnData.label());
|
addHandlersForComboColumnLongitude(propsColumnData.label());
|
||||||
|
|
||||||
comboLongitude.setEmptyText("Select a column...");
|
comboLongitude.setEmptyText(msgs.comboLongitudeEmptyMessage());
|
||||||
comboLongitude.setWidth(191);
|
comboLongitude.setWidth(191);
|
||||||
comboLongitude.setTypeAhead(false);
|
comboLongitude.setTypeAhead(false);
|
||||||
comboLongitude.setEditable(false);
|
comboLongitude.setEditable(false);
|
||||||
comboLongitude.setTriggerAction(TriggerAction.ALL);
|
comboLongitude.setTriggerAction(TriggerAction.ALL);
|
||||||
|
|
||||||
|
FieldLabel comboLongitudeLabel=new FieldLabel(comboLongitude, msgs.comboLongitudeLabel());
|
||||||
|
|
||||||
|
|
||||||
|
// Latitude
|
||||||
|
storeComboLatitude = new ListStore<ColumnData>(propsColumnData.id());
|
||||||
|
storeComboLatitude.addAll(columns);
|
||||||
|
|
||||||
|
comboLatitude = new ComboBox<ColumnData>(storeComboLatitude,
|
||||||
|
propsColumnData.label());
|
||||||
|
Log.trace("Combo ColumnData created");
|
||||||
|
|
||||||
|
addHandlersForComboColumnLatitude(propsColumnData.label());
|
||||||
|
|
||||||
|
comboLatitude.setEmptyText(msgs.comboLatitudeEmptyText());
|
||||||
|
comboLatitude.setWidth(191);
|
||||||
|
comboLatitude.setTypeAhead(false);
|
||||||
|
comboLatitude.setEditable(false);
|
||||||
|
comboLatitude.setTriggerAction(TriggerAction.ALL);
|
||||||
|
|
||||||
|
FieldLabel comboLatitudeLabel=new FieldLabel(comboLatitude, msgs.comboLatitudeLabel());
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Column Label
|
// Column Label
|
||||||
columnLabelField = new TextField();
|
columnField = new TextField();
|
||||||
columnLabelField.setValue("Points");
|
columnField.setValue(msgs.columnFieldDefault());
|
||||||
FieldLabel columnLab = new FieldLabel(columnLabelField, "Column Label");
|
FieldLabel columnFieldLabel = new FieldLabel(columnField, msgs.columnFieldLabel());
|
||||||
|
|
||||||
// Create
|
// Create
|
||||||
createPointButton = new TextButton("Create");
|
btnCreatePoint = new TextButton(msgs.btnCreatePointText());
|
||||||
createPointButton.setIcon(ResourceBundle.INSTANCE.geometryPoint());
|
btnCreatePoint.setIcon(ResourceBundle.INSTANCE.geometryPoint());
|
||||||
createPointButton.setIconAlign(IconAlign.RIGHT);
|
btnCreatePoint.setIconAlign(IconAlign.RIGHT);
|
||||||
createPointButton.setTitle("Create Point");
|
btnCreatePoint.setToolTip(msgs.btnCreatePointToolTip());
|
||||||
|
|
||||||
createPointButton.addSelectHandler(new SelectHandler() {
|
btnCreatePoint.addSelectHandler(new SelectHandler() {
|
||||||
|
|
||||||
public void onSelect(SelectEvent event) {
|
public void onSelect(SelectEvent event) {
|
||||||
onGeometryCreatePoint();
|
onGeometryCreatePoint();
|
||||||
|
@ -177,14 +195,14 @@ public class GeometryCreatePointPanel extends FramedPanel implements
|
||||||
vl.setScrollMode(ScrollMode.AUTO);
|
vl.setScrollMode(ScrollMode.AUTO);
|
||||||
vl.setAdjustForScroll(true);
|
vl.setAdjustForScroll(true);
|
||||||
|
|
||||||
vl.add(new FieldLabel(comboLongitude, "Longitude"),
|
vl.add(comboLongitudeLabel,
|
||||||
new VerticalLayoutData(1, -1));
|
new VerticalLayoutData(1, -1));
|
||||||
vl.add(new FieldLabel(comboLatitude, "Latitude"),
|
vl.add(comboLatitudeLabel,
|
||||||
new VerticalLayoutData(1, -1));
|
new VerticalLayoutData(1, -1));
|
||||||
|
|
||||||
vl.add(columnLab, new VerticalLayoutData(1, -1));
|
vl.add(columnFieldLabel, new VerticalLayoutData(1, -1));
|
||||||
|
|
||||||
vl.add(createPointButton, new VerticalLayoutData(-1, -1, new Margins(
|
vl.add(btnCreatePoint, new VerticalLayoutData(-1, -1, new Margins(
|
||||||
10, 0, 10, 0)));
|
10, 0, 10, 0)));
|
||||||
|
|
||||||
add(vl);
|
add(vl);
|
||||||
|
@ -198,12 +216,6 @@ public class GeometryCreatePointPanel extends FramedPanel implements
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSelection(SelectionEvent<ColumnData> event) {
|
public void onSelection(SelectionEvent<ColumnData> event) {
|
||||||
Info.display(
|
|
||||||
"Latitude Selected",
|
|
||||||
"You selected "
|
|
||||||
+ (event.getSelectedItem() == null ? "nothing"
|
|
||||||
: labelProvider.getLabel(event
|
|
||||||
.getSelectedItem()) + "!"));
|
|
||||||
Log.debug("Latitude selected: " + event.getSelectedItem());
|
Log.debug("Latitude selected: " + event.getSelectedItem());
|
||||||
ColumnData latitude = event.getSelectedItem();
|
ColumnData latitude = event.getSelectedItem();
|
||||||
updatedLatitude(latitude);
|
updatedLatitude(latitude);
|
||||||
|
@ -225,12 +237,6 @@ public class GeometryCreatePointPanel extends FramedPanel implements
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSelection(SelectionEvent<ColumnData> event) {
|
public void onSelection(SelectionEvent<ColumnData> event) {
|
||||||
Info.display(
|
|
||||||
"Longitude Selected",
|
|
||||||
"You selected "
|
|
||||||
+ (event.getSelectedItem() == null ? "nothing"
|
|
||||||
: labelProvider.getLabel(event
|
|
||||||
.getSelectedItem()) + "!"));
|
|
||||||
Log.debug("Longitude selected: " + event.getSelectedItem());
|
Log.debug("Longitude selected: " + event.getSelectedItem());
|
||||||
ColumnData longitude = event.getSelectedItem();
|
ColumnData longitude = event.getSelectedItem();
|
||||||
updatedLongitude(longitude);
|
updatedLongitude(longitude);
|
||||||
|
@ -251,19 +257,19 @@ public class GeometryCreatePointPanel extends FramedPanel implements
|
||||||
if (longitude != null) {
|
if (longitude != null) {
|
||||||
ColumnData latitude = comboLatitude.getCurrentValue();
|
ColumnData latitude = comboLatitude.getCurrentValue();
|
||||||
if (latitude != null) {
|
if (latitude != null) {
|
||||||
String columnLab = columnLabelField.getCurrentValue();
|
String columnLab = columnField.getCurrentValue();
|
||||||
if (columnLab != null && !columnLab.isEmpty()) {
|
if (columnLab != null && !columnLab.isEmpty()) {
|
||||||
GeometryCreatePointSession geoCreatePointSession = new GeometryCreatePointSession(
|
GeometryCreatePointSession geoCreatePointSession = new GeometryCreatePointSession(
|
||||||
trId, latitude, longitude, columnLab);
|
trId, latitude, longitude, columnLab);
|
||||||
callGeometryCreatePoint(geoCreatePointSession);
|
callGeometryCreatePoint(geoCreatePointSession);
|
||||||
} else {
|
} else {
|
||||||
UtilsGXT3.alert("Attention", "Select a column label!");
|
UtilsGXT3.alert(msgsCommon.attention(), msgs.attentionSelectAColumnLabel());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
UtilsGXT3.alert("Attention", "Select Latitude!");
|
UtilsGXT3.alert(msgsCommon.attention(), msgs.attentionSelectLatitude());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
UtilsGXT3.alert("Attention", "Select Longitude!");
|
UtilsGXT3.alert(msgsCommon.attention(), msgs.attentionSelectLongitude());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -279,19 +285,19 @@ public class GeometryCreatePointPanel extends FramedPanel 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 {
|
||||||
if (caught instanceof TDGWTIsFinalException) {
|
if (caught instanceof TDGWTIsFinalException) {
|
||||||
Log.error(caught.getLocalizedMessage());
|
Log.error(caught.getLocalizedMessage());
|
||||||
UtilsGXT3.alert("Error Final",
|
UtilsGXT3.alert(msgsCommon.errorFinal(),
|
||||||
caught.getLocalizedMessage());
|
caught.getLocalizedMessage());
|
||||||
} else {
|
} else {
|
||||||
Log.debug("Create a Point Error: "
|
Log.debug("Create a Point Error: "
|
||||||
+ caught.getLocalizedMessage());
|
+ caught.getLocalizedMessage());
|
||||||
UtilsGXT3
|
UtilsGXT3
|
||||||
.alert("Error Creating a point",
|
.alert(msgsCommon.error(),
|
||||||
"Error creating a point: "
|
msgs.errorCreatingAPointFixed()
|
||||||
+ caught.getLocalizedMessage());
|
+ caught.getLocalizedMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -318,18 +324,18 @@ public class GeometryCreatePointPanel extends FramedPanel 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 {
|
||||||
if (caught instanceof TDGWTIsFinalException) {
|
if (caught instanceof TDGWTIsFinalException) {
|
||||||
Log.error(caught.getLocalizedMessage());
|
Log.error(caught.getLocalizedMessage());
|
||||||
UtilsGXT3.alert("Error Final",
|
UtilsGXT3.alert(msgsCommon.errorFinal(),
|
||||||
caught.getLocalizedMessage());
|
caught.getLocalizedMessage());
|
||||||
} else {
|
} else {
|
||||||
Log.error("load combo failure:"
|
Log.error("load combo failure:"
|
||||||
+ caught.getLocalizedMessage());
|
+ caught.getLocalizedMessage());
|
||||||
UtilsGXT3.alert("Error",
|
UtilsGXT3.alert(msgsCommon.error(),
|
||||||
"Error retrieving columns of tabular resource:"
|
msgs.errorRetrievingColumsOfTabularResourceFixed()
|
||||||
+ trId.getId());
|
+ trId.getId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -366,8 +372,8 @@ public class GeometryCreatePointPanel extends FramedPanel implements
|
||||||
if (columns.size() < 1) {
|
if (columns.size() < 1) {
|
||||||
Log.debug("Attention no Integer or Numeric column is present in the tabular resource");
|
Log.debug("Attention no Integer or Numeric column is present in the tabular resource");
|
||||||
UtilsGXT3
|
UtilsGXT3
|
||||||
.alert("Attention",
|
.alert(msgsCommon.attention(),
|
||||||
"No Integer or Numeric column is present in the tabular resource!");
|
msgs.attentionNoIntegerOrNumericColumnIsPresent());
|
||||||
}
|
}
|
||||||
testCreated();
|
testCreated();
|
||||||
|
|
||||||
|
|
|
@ -10,8 +10,10 @@ import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTSessionExpire
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.geospatial.GeospatialDownscaleCSquareSession;
|
import org.gcube.portlets.user.td.gwtservice.shared.geospatial.GeospatialDownscaleCSquareSession;
|
||||||
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.tablewidget.client.TableWidgetMessages;
|
||||||
import org.gcube.portlets.user.td.tablewidget.client.resources.ResourceBundle;
|
import org.gcube.portlets.user.td.tablewidget.client.resources.ResourceBundle;
|
||||||
import org.gcube.portlets.user.td.tablewidget.client.util.UtilsGXT3;
|
import org.gcube.portlets.user.td.tablewidget.client.util.UtilsGXT3;
|
||||||
|
import org.gcube.portlets.user.td.widgetcommonevent.client.CommonMessages;
|
||||||
import org.gcube.portlets.user.td.widgetcommonevent.client.event.ChangeTableRequestEvent;
|
import org.gcube.portlets.user.td.widgetcommonevent.client.event.ChangeTableRequestEvent;
|
||||||
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.ChangeTableRequestType;
|
import org.gcube.portlets.user.td.widgetcommonevent.client.type.ChangeTableRequestType;
|
||||||
|
@ -42,7 +44,6 @@ import com.sencha.gxt.widget.core.client.event.SelectEvent;
|
||||||
import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler;
|
import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler;
|
||||||
import com.sencha.gxt.widget.core.client.form.ComboBox;
|
import com.sencha.gxt.widget.core.client.form.ComboBox;
|
||||||
import com.sencha.gxt.widget.core.client.form.FieldLabel;
|
import com.sencha.gxt.widget.core.client.form.FieldLabel;
|
||||||
import com.sencha.gxt.widget.core.client.info.Info;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -62,7 +63,7 @@ public class DownscaleCSquarePanel extends FramedPanel implements
|
||||||
private ArrayList<ColumnData> columns;
|
private ArrayList<ColumnData> columns;
|
||||||
private VerticalLayoutContainer vl;
|
private VerticalLayoutContainer vl;
|
||||||
|
|
||||||
private TextButton downscaleButton;
|
private TextButton btnDownscale;
|
||||||
private ComboBox<ColumnData> comboCSquareColumn;
|
private ComboBox<ColumnData> comboCSquareColumn;
|
||||||
private ListStore<ColumnData> storeComboCSquare;
|
private ListStore<ColumnData> storeComboCSquare;
|
||||||
|
|
||||||
|
@ -70,6 +71,9 @@ public class DownscaleCSquarePanel extends FramedPanel implements
|
||||||
private ListStore<Resolution> storeComboDownscale;
|
private ListStore<Resolution> storeComboDownscale;
|
||||||
private String columnLocalId;
|
private String columnLocalId;
|
||||||
|
|
||||||
|
private CommonMessages msgsCommon;
|
||||||
|
private TableWidgetMessages msgs;
|
||||||
|
|
||||||
public DownscaleCSquarePanel(TRId trId, String columnLocalId,
|
public DownscaleCSquarePanel(TRId trId, String columnLocalId,
|
||||||
EventBus eventBus) {
|
EventBus eventBus) {
|
||||||
super();
|
super();
|
||||||
|
@ -78,10 +82,17 @@ public class DownscaleCSquarePanel extends FramedPanel implements
|
||||||
this.eventBus = eventBus;
|
this.eventBus = eventBus;
|
||||||
this.created = false;
|
this.created = false;
|
||||||
forceLayoutOnResize = true;
|
forceLayoutOnResize = true;
|
||||||
|
initMessages();
|
||||||
retrieveColumns();
|
retrieveColumns();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void initMessages() {
|
||||||
|
msgsCommon = GWT.create(CommonMessages.class);
|
||||||
|
msgs = GWT.create(TableWidgetMessages.class);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
protected void testCreated() {
|
protected void testCreated() {
|
||||||
if (created) {
|
if (created) {
|
||||||
updateCombo();
|
updateCombo();
|
||||||
|
@ -134,12 +145,14 @@ public class DownscaleCSquarePanel extends FramedPanel implements
|
||||||
|
|
||||||
addHandlersForComboCSquare(propsColumnData.label());
|
addHandlersForComboCSquare(propsColumnData.label());
|
||||||
|
|
||||||
comboCSquareColumn.setEmptyText("Select a column...");
|
comboCSquareColumn.setEmptyText(msgs.comboCSquareColumnEmptyText());
|
||||||
comboCSquareColumn.setWidth(191);
|
comboCSquareColumn.setWidth(191);
|
||||||
comboCSquareColumn.setTypeAhead(false);
|
comboCSquareColumn.setTypeAhead(false);
|
||||||
comboCSquareColumn.setEditable(false);
|
comboCSquareColumn.setEditable(false);
|
||||||
comboCSquareColumn.setTriggerAction(TriggerAction.ALL);
|
comboCSquareColumn.setTriggerAction(TriggerAction.ALL);
|
||||||
|
|
||||||
|
FieldLabel comboCSquareColumnLabel=new FieldLabel(comboCSquareColumn, msgs.comboCSquareColumnLabel());
|
||||||
|
|
||||||
// Downscale combo
|
// Downscale combo
|
||||||
ResolutionPropertiesCombo propsDownscale = GWT
|
ResolutionPropertiesCombo propsDownscale = GWT
|
||||||
.create(ResolutionPropertiesCombo.class);
|
.create(ResolutionPropertiesCombo.class);
|
||||||
|
@ -154,21 +167,21 @@ public class DownscaleCSquarePanel extends FramedPanel implements
|
||||||
|
|
||||||
addHandlersForComboDownscale(propsDownscale.value());
|
addHandlersForComboDownscale(propsDownscale.value());
|
||||||
|
|
||||||
comboDownscale.setEmptyText("Select a resolution...");
|
comboDownscale.setEmptyText(msgs.comboDownscaleEmptyText());
|
||||||
comboDownscale.setWidth(191);
|
comboDownscale.setWidth(191);
|
||||||
comboDownscale.setTypeAhead(false);
|
comboDownscale.setTypeAhead(false);
|
||||||
comboDownscale.setEditable(false);
|
comboDownscale.setEditable(false);
|
||||||
comboDownscale.setTriggerAction(TriggerAction.ALL);
|
comboDownscale.setTriggerAction(TriggerAction.ALL);
|
||||||
|
|
||||||
|
FieldLabel comboDownscaleLabel=new FieldLabel(comboDownscale, msgs.comboDownscaleLabel());
|
||||||
|
|
||||||
// Create
|
// Create
|
||||||
downscaleButton = new TextButton("Downscale");
|
btnDownscale = new TextButton(msgs.btnDownscaleText());
|
||||||
downscaleButton.setIcon(ResourceBundle.INSTANCE.downscaleCSquare());
|
btnDownscale.setIcon(ResourceBundle.INSTANCE.downscaleCSquare());
|
||||||
downscaleButton.setIconAlign(IconAlign.RIGHT);
|
btnDownscale.setIconAlign(IconAlign.RIGHT);
|
||||||
downscaleButton.setTitle("Downscale C-Square");
|
btnDownscale.setToolTip(msgs.btnDownscaleToolTip());
|
||||||
|
|
||||||
downscaleButton.addSelectHandler(new SelectHandler() {
|
btnDownscale.addSelectHandler(new SelectHandler() {
|
||||||
|
|
||||||
public void onSelect(SelectEvent event) {
|
public void onSelect(SelectEvent event) {
|
||||||
onGeometryCreatePoint();
|
onGeometryCreatePoint();
|
||||||
|
@ -180,12 +193,12 @@ public class DownscaleCSquarePanel extends FramedPanel implements
|
||||||
vl.setScrollMode(ScrollMode.AUTO);
|
vl.setScrollMode(ScrollMode.AUTO);
|
||||||
vl.setAdjustForScroll(true);
|
vl.setAdjustForScroll(true);
|
||||||
|
|
||||||
vl.add(new FieldLabel(comboCSquareColumn, "Column"),
|
vl.add(comboCSquareColumnLabel,
|
||||||
new VerticalLayoutData(1, -1));
|
new VerticalLayoutData(1, -1));
|
||||||
vl.add(new FieldLabel(comboDownscale, "Resolution"),
|
vl.add(comboDownscaleLabel,
|
||||||
new VerticalLayoutData(1, -1));
|
new VerticalLayoutData(1, -1));
|
||||||
|
|
||||||
vl.add(downscaleButton, new VerticalLayoutData(-1, -1, new Margins(10,
|
vl.add(btnDownscale, new VerticalLayoutData(-1, -1, new Margins(10,
|
||||||
0, 10, 0)));
|
0, 10, 0)));
|
||||||
|
|
||||||
add(vl);
|
add(vl);
|
||||||
|
@ -225,13 +238,6 @@ public class DownscaleCSquarePanel extends FramedPanel implements
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSelection(SelectionEvent<ColumnData> event) {
|
public void onSelection(SelectionEvent<ColumnData> event) {
|
||||||
Info.display(
|
|
||||||
"Column Selected",
|
|
||||||
"You selected "
|
|
||||||
+ (event.getSelectedItem() == null ? "nothing"
|
|
||||||
: labelProvider.getLabel(event
|
|
||||||
.getSelectedItem())
|
|
||||||
+ "!"));
|
|
||||||
Log.debug("Latitude selected: "
|
Log.debug("Latitude selected: "
|
||||||
+ event.getSelectedItem());
|
+ event.getSelectedItem());
|
||||||
ColumnData csquareColumn = event.getSelectedItem();
|
ColumnData csquareColumn = event.getSelectedItem();
|
||||||
|
@ -254,12 +260,6 @@ public class DownscaleCSquarePanel extends FramedPanel implements
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSelection(SelectionEvent<Resolution> event) {
|
public void onSelection(SelectionEvent<Resolution> event) {
|
||||||
Info.display(
|
|
||||||
"Resolution Selected",
|
|
||||||
"You selected "
|
|
||||||
+ (event.getSelectedItem() == null ? "nothing"
|
|
||||||
: labelProvider.getLabel(event
|
|
||||||
.getSelectedItem()) + "!"));
|
|
||||||
Log.debug("Resolution selected: " + event.getSelectedItem());
|
Log.debug("Resolution selected: " + event.getSelectedItem());
|
||||||
Resolution resolution = event.getSelectedItem();
|
Resolution resolution = event.getSelectedItem();
|
||||||
updatedResolution(resolution);
|
updatedResolution(resolution);
|
||||||
|
@ -285,10 +285,10 @@ public class DownscaleCSquarePanel extends FramedPanel implements
|
||||||
callGeospatialDownscaleCSquare(geospatialDownscaleCSquareSession);
|
callGeospatialDownscaleCSquare(geospatialDownscaleCSquareSession);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
UtilsGXT3.alert("Attention", "Select Resolution!");
|
UtilsGXT3.alert(msgsCommon.attention(), msgs.attentionSelectResolution());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
UtilsGXT3.alert("Attention", "Select C-Square column!");
|
UtilsGXT3.alert(msgsCommon.attention(), msgs.attentionSelectCSquareColumn());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -304,18 +304,18 @@ public class DownscaleCSquarePanel extends FramedPanel 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 {
|
||||||
if (caught instanceof TDGWTIsFinalException) {
|
if (caught instanceof TDGWTIsFinalException) {
|
||||||
Log.error(caught.getLocalizedMessage());
|
Log.error(caught.getLocalizedMessage());
|
||||||
UtilsGXT3.alert("Error Final",
|
UtilsGXT3.alert(msgsCommon.errorFinal(),
|
||||||
caught.getLocalizedMessage());
|
caught.getLocalizedMessage());
|
||||||
} else {
|
} else {
|
||||||
Log.debug("Geospatial Downscale C-Square: "
|
Log.debug("Geospatial Downscale C-Square: "
|
||||||
+ caught.getLocalizedMessage());
|
+ caught.getLocalizedMessage());
|
||||||
UtilsGXT3
|
UtilsGXT3
|
||||||
.alert("Error Downscale C-Square",
|
.alert(msgsCommon.error(),
|
||||||
caught.getLocalizedMessage());
|
caught.getLocalizedMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -342,18 +342,18 @@ public class DownscaleCSquarePanel extends FramedPanel 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 {
|
||||||
if (caught instanceof TDGWTIsFinalException) {
|
if (caught instanceof TDGWTIsFinalException) {
|
||||||
Log.error(caught.getLocalizedMessage());
|
Log.error(caught.getLocalizedMessage());
|
||||||
UtilsGXT3.alert("Error Final",
|
UtilsGXT3.alert(msgsCommon.errorFinal(),
|
||||||
caught.getLocalizedMessage());
|
caught.getLocalizedMessage());
|
||||||
} else {
|
} else {
|
||||||
Log.error("load combo failure:"
|
Log.error("load combo failure:"
|
||||||
+ caught.getLocalizedMessage());
|
+ caught.getLocalizedMessage());
|
||||||
UtilsGXT3.alert("Error",
|
UtilsGXT3.alert(msgsCommon.error(),
|
||||||
"Error retrieving columns of tabular resource:"
|
msgs.errorRetrievingColumsOfTabularResourceFixed()
|
||||||
+ trId.getId());
|
+ trId.getId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -379,8 +379,8 @@ public class DownscaleCSquarePanel extends FramedPanel implements
|
||||||
if (columns.size() < 1) {
|
if (columns.size() < 1) {
|
||||||
Log.debug("Attention no text column is present in the tabular resource. C-Square column is a text column data type!");
|
Log.debug("Attention no text column is present in the tabular resource. C-Square column is a text column data type!");
|
||||||
UtilsGXT3
|
UtilsGXT3
|
||||||
.alert("Attention",
|
.alert(msgsCommon.attention(),
|
||||||
"No text column is present in the tabular resource. C-Square is a text column data type!");
|
msgs.attentionNoTextColumnIsPresentCSquareIsTextColumn());
|
||||||
}
|
}
|
||||||
testCreated();
|
testCreated();
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@ package org.gcube.portlets.user.td.tablewidget.client.geospatial;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
import org.gcube.portlets.user.td.columnwidget.client.geospatial.GeospatialCoordinatesTypePropertiesCombo;
|
||||||
import org.gcube.portlets.user.td.expressionwidget.client.properties.ColumnDataPropertiesCombo;
|
import org.gcube.portlets.user.td.expressionwidget.client.properties.ColumnDataPropertiesCombo;
|
||||||
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.TDGWTIsFinalException;
|
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTIsFinalException;
|
||||||
|
@ -10,9 +11,10 @@ import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTSessionExpire
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.geospatial.GeospatialCreateCoordinatesSession;
|
import org.gcube.portlets.user.td.gwtservice.shared.geospatial.GeospatialCreateCoordinatesSession;
|
||||||
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.columnwidget.client.geospatial.GeospatialCoordinatesTypePropertiesCombo;
|
import org.gcube.portlets.user.td.tablewidget.client.TableWidgetMessages;
|
||||||
import org.gcube.portlets.user.td.tablewidget.client.resources.ResourceBundle;
|
import org.gcube.portlets.user.td.tablewidget.client.resources.ResourceBundle;
|
||||||
import org.gcube.portlets.user.td.tablewidget.client.util.UtilsGXT3;
|
import org.gcube.portlets.user.td.tablewidget.client.util.UtilsGXT3;
|
||||||
|
import org.gcube.portlets.user.td.widgetcommonevent.client.CommonMessages;
|
||||||
import org.gcube.portlets.user.td.widgetcommonevent.client.event.ChangeTableRequestEvent;
|
import org.gcube.portlets.user.td.widgetcommonevent.client.event.ChangeTableRequestEvent;
|
||||||
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.ChangeTableRequestType;
|
import org.gcube.portlets.user.td.widgetcommonevent.client.type.ChangeTableRequestType;
|
||||||
|
@ -53,7 +55,6 @@ import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler;
|
||||||
import com.sencha.gxt.widget.core.client.form.ComboBox;
|
import com.sencha.gxt.widget.core.client.form.ComboBox;
|
||||||
import com.sencha.gxt.widget.core.client.form.FieldLabel;
|
import com.sencha.gxt.widget.core.client.form.FieldLabel;
|
||||||
import com.sencha.gxt.widget.core.client.form.Radio;
|
import com.sencha.gxt.widget.core.client.form.Radio;
|
||||||
import com.sencha.gxt.widget.core.client.info.Info;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -75,7 +76,7 @@ public class GeospatialCreateCoordinatesPanel extends FramedPanel implements
|
||||||
private ArrayList<ColumnData> quadrantColumns;
|
private ArrayList<ColumnData> quadrantColumns;
|
||||||
private VerticalLayoutContainer vl;
|
private VerticalLayoutContainer vl;
|
||||||
|
|
||||||
private TextButton createCoordinatesButton;
|
private TextButton btnCreateCoordinates;
|
||||||
private ComboBox<ColumnData> comboLatitude;
|
private ComboBox<ColumnData> comboLatitude;
|
||||||
private ComboBox<ColumnData> comboLongitude;
|
private ComboBox<ColumnData> comboLongitude;
|
||||||
private ComboBox<GeospatialCoordinatesType> comboGsCoordinatesType;
|
private ComboBox<GeospatialCoordinatesType> comboGsCoordinatesType;
|
||||||
|
@ -91,11 +92,15 @@ public class GeospatialCreateCoordinatesPanel extends FramedPanel implements
|
||||||
private ComboBox<Resolution> comboResolution;
|
private ComboBox<Resolution> comboResolution;
|
||||||
private ListStore<Resolution> storeComboResolution;
|
private ListStore<Resolution> storeComboResolution;
|
||||||
|
|
||||||
|
private CommonMessages msgsCommon;
|
||||||
|
private TableWidgetMessages msgs;
|
||||||
|
|
||||||
public GeospatialCreateCoordinatesPanel(TRId trId,
|
public GeospatialCreateCoordinatesPanel(TRId trId,
|
||||||
RequestProperties requestProperties, EventBus eventBus) {
|
RequestProperties requestProperties, EventBus eventBus) {
|
||||||
super();
|
super();
|
||||||
this.trId = trId;
|
initMessages();
|
||||||
|
|
||||||
|
this.trId = trId;
|
||||||
this.gsCoordinatesType = (GeospatialCoordinatesType) requestProperties
|
this.gsCoordinatesType = (GeospatialCoordinatesType) requestProperties
|
||||||
.getMap().get(RequestPropertiesParameterType.Coordinates);
|
.getMap().get(RequestPropertiesParameterType.Coordinates);
|
||||||
|
|
||||||
|
@ -106,6 +111,12 @@ public class GeospatialCreateCoordinatesPanel extends FramedPanel implements
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void initMessages() {
|
||||||
|
msgsCommon = GWT.create(CommonMessages.class);
|
||||||
|
msgs = GWT.create(TableWidgetMessages.class);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
protected void testCreated() {
|
protected void testCreated() {
|
||||||
if (created) {
|
if (created) {
|
||||||
updateCombo();
|
updateCombo();
|
||||||
|
@ -163,7 +174,7 @@ public class GeospatialCreateCoordinatesPanel extends FramedPanel implements
|
||||||
|
|
||||||
addHandlersForComboColumnLatitude(propsColumnData.label());
|
addHandlersForComboColumnLatitude(propsColumnData.label());
|
||||||
|
|
||||||
comboLatitude.setEmptyText("Select a column...");
|
comboLatitude.setEmptyText(msgs.comboLatitudeEmptyText());
|
||||||
comboLatitude.setWidth(191);
|
comboLatitude.setWidth(191);
|
||||||
comboLatitude.setTypeAhead(false);
|
comboLatitude.setTypeAhead(false);
|
||||||
comboLatitude.setEditable(false);
|
comboLatitude.setEditable(false);
|
||||||
|
@ -179,7 +190,7 @@ public class GeospatialCreateCoordinatesPanel extends FramedPanel implements
|
||||||
|
|
||||||
addHandlersForComboColumnLongitude(propsColumnData.label());
|
addHandlersForComboColumnLongitude(propsColumnData.label());
|
||||||
|
|
||||||
comboLongitude.setEmptyText("Select a column...");
|
comboLongitude.setEmptyText(msgs.comboLongitudeEmptyMessage());
|
||||||
comboLongitude.setWidth(191);
|
comboLongitude.setWidth(191);
|
||||||
comboLongitude.setTypeAhead(false);
|
comboLongitude.setTypeAhead(false);
|
||||||
comboLongitude.setEditable(false);
|
comboLongitude.setEditable(false);
|
||||||
|
@ -201,7 +212,7 @@ public class GeospatialCreateCoordinatesPanel extends FramedPanel implements
|
||||||
addHandlersForComboGsCoordinatesType(propsGeospatialCoordinatesType
|
addHandlersForComboGsCoordinatesType(propsGeospatialCoordinatesType
|
||||||
.label());
|
.label());
|
||||||
|
|
||||||
comboGsCoordinatesType.setEmptyText("Select a type...");
|
comboGsCoordinatesType.setEmptyText(msgs.comboGsCoordinateTypeEmptyText());
|
||||||
comboGsCoordinatesType.setWidth(191);
|
comboGsCoordinatesType.setWidth(191);
|
||||||
comboGsCoordinatesType.setTypeAhead(false);
|
comboGsCoordinatesType.setTypeAhead(false);
|
||||||
comboGsCoordinatesType.setEditable(false);
|
comboGsCoordinatesType.setEditable(false);
|
||||||
|
@ -221,7 +232,7 @@ public class GeospatialCreateCoordinatesPanel extends FramedPanel implements
|
||||||
|
|
||||||
addHandlersForComboResolution(propsResolution.value());
|
addHandlersForComboResolution(propsResolution.value());
|
||||||
|
|
||||||
comboResolution.setEmptyText("Select a resolution...");
|
comboResolution.setEmptyText(msgs.comboResolutionEmptyText());
|
||||||
comboResolution.setValue(ResolutionStore
|
comboResolution.setValue(ResolutionStore
|
||||||
.getStoreCSquareResolutionDefault());
|
.getStoreCSquareResolutionDefault());
|
||||||
comboResolution.setWidth(191);
|
comboResolution.setWidth(191);
|
||||||
|
@ -229,16 +240,16 @@ public class GeospatialCreateCoordinatesPanel extends FramedPanel implements
|
||||||
comboResolution.setEditable(false);
|
comboResolution.setEditable(false);
|
||||||
comboResolution.setTriggerAction(TriggerAction.ALL);
|
comboResolution.setTriggerAction(TriggerAction.ALL);
|
||||||
|
|
||||||
FieldLabel resolutionLabel = new FieldLabel(comboResolution,
|
FieldLabel comboResolutionLabel = new FieldLabel(comboResolution,
|
||||||
"Resolution");
|
msgs.comboResolutionLabel());
|
||||||
|
|
||||||
// Has Quadrant
|
// Has Quadrant
|
||||||
hasQuadrantTrue = new Radio();
|
hasQuadrantTrue = new Radio();
|
||||||
hasQuadrantTrue.setBoxLabel("True");
|
hasQuadrantTrue.setBoxLabel(msgs.hasQuadrantTrue());
|
||||||
hasQuadrantTrue.setValue(true);
|
hasQuadrantTrue.setValue(true);
|
||||||
|
|
||||||
hasQuadrantFalse = new Radio();
|
hasQuadrantFalse = new Radio();
|
||||||
hasQuadrantFalse.setBoxLabel("False");
|
hasQuadrantFalse.setBoxLabel(msgs.hasQuadrantFalse());
|
||||||
|
|
||||||
ToggleGroup hasQuadrantGroup = new ToggleGroup();
|
ToggleGroup hasQuadrantGroup = new ToggleGroup();
|
||||||
hasQuadrantGroup.add(hasQuadrantTrue);
|
hasQuadrantGroup.add(hasQuadrantTrue);
|
||||||
|
@ -256,8 +267,8 @@ public class GeospatialCreateCoordinatesPanel extends FramedPanel implements
|
||||||
|| quadrantColumns.size() < 1) {
|
|| quadrantColumns.size() < 1) {
|
||||||
Log.debug("Attention no Integer column is present in the tabular resource");
|
Log.debug("Attention no Integer column is present in the tabular resource");
|
||||||
UtilsGXT3
|
UtilsGXT3
|
||||||
.alert("Attention",
|
.alert(msgsCommon.attention(),
|
||||||
"No Integer column is present in the tabular resource!");
|
msgs.attentionNoIntegerColumnIsPresent());
|
||||||
|
|
||||||
}
|
}
|
||||||
comboQuadrantLabel.setVisible(true);
|
comboQuadrantLabel.setVisible(true);
|
||||||
|
@ -280,9 +291,9 @@ public class GeospatialCreateCoordinatesPanel extends FramedPanel implements
|
||||||
hasQuadrantPanel.add(hasQuadrantTrue);
|
hasQuadrantPanel.add(hasQuadrantTrue);
|
||||||
hasQuadrantPanel.add(hasQuadrantFalse);
|
hasQuadrantPanel.add(hasQuadrantFalse);
|
||||||
|
|
||||||
hasQuadrantLabel = new FieldLabel(hasQuadrantPanel, "Has Quadrant");
|
hasQuadrantLabel = new FieldLabel(hasQuadrantPanel, msgs.hasQuadrantLabel());
|
||||||
hasQuadrantLabel
|
hasQuadrantLabel
|
||||||
.setToolTip("Select true if you want select quadrant column");
|
.setToolTip(msgs.hasQuadrantToolTip());
|
||||||
|
|
||||||
// Quadrant
|
// Quadrant
|
||||||
storeComboQuadrant = new ListStore<ColumnData>(propsColumnData.id());
|
storeComboQuadrant = new ListStore<ColumnData>(propsColumnData.id());
|
||||||
|
@ -294,22 +305,22 @@ public class GeospatialCreateCoordinatesPanel extends FramedPanel implements
|
||||||
|
|
||||||
addHandlersForComboQuadrant(propsColumnData.label());
|
addHandlersForComboQuadrant(propsColumnData.label());
|
||||||
|
|
||||||
comboQuadrant.setEmptyText("Select a column...");
|
comboQuadrant.setEmptyText(msgs.comboQuadrantEmptyText());
|
||||||
comboQuadrant.setWidth(191);
|
comboQuadrant.setWidth(191);
|
||||||
comboQuadrant.setTypeAhead(false);
|
comboQuadrant.setTypeAhead(false);
|
||||||
comboQuadrant.setEditable(false);
|
comboQuadrant.setEditable(false);
|
||||||
comboQuadrant.setTriggerAction(TriggerAction.ALL);
|
comboQuadrant.setTriggerAction(TriggerAction.ALL);
|
||||||
|
|
||||||
comboQuadrantLabel = new FieldLabel(comboQuadrant, "Quadrant");
|
comboQuadrantLabel = new FieldLabel(comboQuadrant, msgs.comboQuadrantLabel());
|
||||||
|
|
||||||
// Create
|
// Create
|
||||||
createCoordinatesButton = new TextButton("Create");
|
btnCreateCoordinates = new TextButton(msgs.btnCreateCoordinatesText());
|
||||||
createCoordinatesButton.setIcon(ResourceBundle.INSTANCE
|
btnCreateCoordinates.setIcon(ResourceBundle.INSTANCE
|
||||||
.geospatialCoordinates());
|
.geospatialCoordinates());
|
||||||
createCoordinatesButton.setIconAlign(IconAlign.RIGHT);
|
btnCreateCoordinates.setIconAlign(IconAlign.RIGHT);
|
||||||
createCoordinatesButton.setTitle("Create Geospatial Coordinates");
|
btnCreateCoordinates.setToolTip(msgs.btnCreateCoordinatesToolTip());
|
||||||
|
|
||||||
createCoordinatesButton.addSelectHandler(new SelectHandler() {
|
btnCreateCoordinates.addSelectHandler(new SelectHandler() {
|
||||||
|
|
||||||
public void onSelect(SelectEvent event) {
|
public void onSelect(SelectEvent event) {
|
||||||
onGeospatialCreateCoordinates();
|
onGeospatialCreateCoordinates();
|
||||||
|
@ -321,21 +332,21 @@ public class GeospatialCreateCoordinatesPanel extends FramedPanel implements
|
||||||
vl.setScrollMode(ScrollMode.AUTO);
|
vl.setScrollMode(ScrollMode.AUTO);
|
||||||
vl.setAdjustForScroll(true);
|
vl.setAdjustForScroll(true);
|
||||||
|
|
||||||
vl.add(new FieldLabel(comboLongitude, "Longitude"),
|
vl.add(new FieldLabel(comboLongitude, msgs.comboLongitudeLabel()),
|
||||||
new VerticalLayoutData(1, -1));
|
new VerticalLayoutData(1, -1));
|
||||||
vl.add(new FieldLabel(comboLatitude, "Latitude"),
|
vl.add(new FieldLabel(comboLatitude, msgs.comboLatitudeLabel()),
|
||||||
new VerticalLayoutData(1, -1));
|
new VerticalLayoutData(1, -1));
|
||||||
|
|
||||||
vl.add(new FieldLabel(comboGsCoordinatesType, "Type"),
|
vl.add(new FieldLabel(comboGsCoordinatesType, msgs.comboGsCoordinatesTypeLabel()),
|
||||||
new VerticalLayoutData(1, -1));
|
new VerticalLayoutData(1, -1));
|
||||||
|
|
||||||
vl.add(resolutionLabel, new VerticalLayoutData(1, -1));
|
vl.add(comboResolutionLabel, new VerticalLayoutData(1, -1));
|
||||||
|
|
||||||
vl.add(hasQuadrantLabel, new VerticalLayoutData(-1, -1));
|
vl.add(hasQuadrantLabel, new VerticalLayoutData(-1, -1));
|
||||||
|
|
||||||
vl.add(comboQuadrantLabel, new VerticalLayoutData(1, -1));
|
vl.add(comboQuadrantLabel, new VerticalLayoutData(1, -1));
|
||||||
|
|
||||||
vl.add(createCoordinatesButton, new VerticalLayoutData(-1, -1,
|
vl.add(btnCreateCoordinates, new VerticalLayoutData(-1, -1,
|
||||||
new Margins(10, 0, 10, 0)));
|
new Margins(10, 0, 10, 0)));
|
||||||
|
|
||||||
add(vl);
|
add(vl);
|
||||||
|
@ -350,12 +361,6 @@ public class GeospatialCreateCoordinatesPanel extends FramedPanel implements
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSelection(SelectionEvent<Resolution> event) {
|
public void onSelection(SelectionEvent<Resolution> event) {
|
||||||
Info.display(
|
|
||||||
"Resolution Selected",
|
|
||||||
"You selected "
|
|
||||||
+ (event.getSelectedItem() == null ? "nothing"
|
|
||||||
: value.getLabel(event
|
|
||||||
.getSelectedItem()) + "!"));
|
|
||||||
Log.debug("Reolution selected: " + event.getSelectedItem());
|
Log.debug("Reolution selected: " + event.getSelectedItem());
|
||||||
Resolution resolution = event.getSelectedItem();
|
Resolution resolution = event.getSelectedItem();
|
||||||
updatedResolution(resolution);
|
updatedResolution(resolution);
|
||||||
|
@ -376,12 +381,6 @@ public class GeospatialCreateCoordinatesPanel extends FramedPanel implements
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSelection(SelectionEvent<ColumnData> event) {
|
public void onSelection(SelectionEvent<ColumnData> event) {
|
||||||
Info.display(
|
|
||||||
"Latitude Selected",
|
|
||||||
"You selected "
|
|
||||||
+ (event.getSelectedItem() == null ? "nothing"
|
|
||||||
: labelProvider.getLabel(event
|
|
||||||
.getSelectedItem()) + "!"));
|
|
||||||
Log.debug("Latitude selected: " + event.getSelectedItem());
|
Log.debug("Latitude selected: " + event.getSelectedItem());
|
||||||
ColumnData latitude = event.getSelectedItem();
|
ColumnData latitude = event.getSelectedItem();
|
||||||
updatedLatitude(latitude);
|
updatedLatitude(latitude);
|
||||||
|
@ -403,12 +402,6 @@ public class GeospatialCreateCoordinatesPanel extends FramedPanel implements
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSelection(SelectionEvent<ColumnData> event) {
|
public void onSelection(SelectionEvent<ColumnData> event) {
|
||||||
Info.display(
|
|
||||||
"Longitude Selected",
|
|
||||||
"You selected "
|
|
||||||
+ (event.getSelectedItem() == null ? "nothing"
|
|
||||||
: labelProvider.getLabel(event
|
|
||||||
.getSelectedItem()) + "!"));
|
|
||||||
Log.debug("Longitude selected: " + event.getSelectedItem());
|
Log.debug("Longitude selected: " + event.getSelectedItem());
|
||||||
ColumnData longitude = event.getSelectedItem();
|
ColumnData longitude = event.getSelectedItem();
|
||||||
updatedLongitude(longitude);
|
updatedLongitude(longitude);
|
||||||
|
@ -432,13 +425,6 @@ public class GeospatialCreateCoordinatesPanel extends FramedPanel implements
|
||||||
@Override
|
@Override
|
||||||
public void onSelection(
|
public void onSelection(
|
||||||
SelectionEvent<GeospatialCoordinatesType> event) {
|
SelectionEvent<GeospatialCoordinatesType> event) {
|
||||||
Info.display(
|
|
||||||
"Type Selected",
|
|
||||||
"You selected "
|
|
||||||
+ (event.getSelectedItem() == null ? "nothing"
|
|
||||||
: labelProvider.getLabel(event
|
|
||||||
.getSelectedItem())
|
|
||||||
+ "!"));
|
|
||||||
Log.debug("Type selected: " + event.getSelectedItem());
|
Log.debug("Type selected: " + event.getSelectedItem());
|
||||||
GeospatialCoordinatesType type = event
|
GeospatialCoordinatesType type = event
|
||||||
.getSelectedItem();
|
.getSelectedItem();
|
||||||
|
@ -470,7 +456,7 @@ public class GeospatialCreateCoordinatesPanel extends FramedPanel implements
|
||||||
comboResolution.reset();
|
comboResolution.reset();
|
||||||
comboResolution.setValue(ResolutionStore
|
comboResolution.setValue(ResolutionStore
|
||||||
.getStoreCSquareResolutionDefault());
|
.getStoreCSquareResolutionDefault());
|
||||||
createCoordinatesButton.setIcon(ResourceBundle.INSTANCE
|
btnCreateCoordinates.setIcon(ResourceBundle.INSTANCE
|
||||||
.geospatialCSquare());
|
.geospatialCSquare());
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
@ -495,7 +481,7 @@ public class GeospatialCreateCoordinatesPanel extends FramedPanel implements
|
||||||
.getStoreOceanAreaResolutionDefault());
|
.getStoreOceanAreaResolutionDefault());
|
||||||
hasQuadrantLabel.setVisible(true);
|
hasQuadrantLabel.setVisible(true);
|
||||||
comboGsCoordinatesType.setValue(gsCoordinatesType);
|
comboGsCoordinatesType.setValue(gsCoordinatesType);
|
||||||
createCoordinatesButton.setIcon(ResourceBundle.INSTANCE
|
btnCreateCoordinates.setIcon(ResourceBundle.INSTANCE
|
||||||
.geospatialOceanArea());
|
.geospatialOceanArea());
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -509,7 +495,7 @@ public class GeospatialCreateCoordinatesPanel extends FramedPanel implements
|
||||||
.getStoreCSquareResolutionDefault());
|
.getStoreCSquareResolutionDefault());
|
||||||
hasQuadrantLabel.setVisible(false);
|
hasQuadrantLabel.setVisible(false);
|
||||||
comboQuadrantLabel.setVisible(false);
|
comboQuadrantLabel.setVisible(false);
|
||||||
createCoordinatesButton.setIcon(ResourceBundle.INSTANCE
|
btnCreateCoordinates.setIcon(ResourceBundle.INSTANCE
|
||||||
.geospatialCoordinates());
|
.geospatialCoordinates());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -524,12 +510,6 @@ public class GeospatialCreateCoordinatesPanel extends FramedPanel implements
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSelection(SelectionEvent<ColumnData> event) {
|
public void onSelection(SelectionEvent<ColumnData> event) {
|
||||||
Info.display(
|
|
||||||
"Quadrant Selected",
|
|
||||||
"You selected "
|
|
||||||
+ (event.getSelectedItem() == null ? "nothing"
|
|
||||||
: labelProvider.getLabel(event
|
|
||||||
.getSelectedItem()) + "!"));
|
|
||||||
Log.debug("Quadrant selected: " + event.getSelectedItem());
|
Log.debug("Quadrant selected: " + event.getSelectedItem());
|
||||||
ColumnData quadrant = event.getSelectedItem();
|
ColumnData quadrant = event.getSelectedItem();
|
||||||
updatedQuadrant(quadrant);
|
updatedQuadrant(quadrant);
|
||||||
|
@ -579,11 +559,12 @@ public class GeospatialCreateCoordinatesPanel extends FramedPanel implements
|
||||||
if (quadrant != null) {
|
if (quadrant != null) {
|
||||||
gsCreateCoordinatesSession = new GeospatialCreateCoordinatesSession(
|
gsCreateCoordinatesSession = new GeospatialCreateCoordinatesSession(
|
||||||
trId, latitude, longitude, type,
|
trId, latitude, longitude, type,
|
||||||
true, quadrant, resolution.getValue());
|
true, quadrant,
|
||||||
|
resolution.getValue());
|
||||||
callGeospatialCreateCoordinates(gsCreateCoordinatesSession);
|
callGeospatialCreateCoordinates(gsCreateCoordinatesSession);
|
||||||
} else {
|
} else {
|
||||||
UtilsGXT3.alert("Attention",
|
UtilsGXT3.alert(msgsCommon.attention(),
|
||||||
"Select Quadrant column!");
|
msgs.attentionSelectQuadrantColumn());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -597,25 +578,25 @@ public class GeospatialCreateCoordinatesPanel extends FramedPanel implements
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
UtilsGXT3
|
UtilsGXT3
|
||||||
.alert("Attention",
|
.alert(msgsCommon.attention(),
|
||||||
"Select valid geospatial coordinates type!");
|
msgs.selectValidGeospatialCoordinatesType());
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
UtilsGXT3.alert("Attention",
|
UtilsGXT3.alert(msgsCommon.attention(),
|
||||||
"Invalid Geospatial Coordinates Type!");
|
msgs.attentionInvalidGeospatialCoordinateType());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
UtilsGXT3.alert("Attention", "Select Resolution!");
|
UtilsGXT3.alert(msgsCommon.attention(), msgs.attentionSelectResolution());
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
UtilsGXT3.alert("Attention", "Select Latitude!");
|
UtilsGXT3.alert(msgsCommon.attention(), msgs.attentionSelectLatitude());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
UtilsGXT3.alert("Attention", "Select Longitude!");
|
UtilsGXT3.alert(msgsCommon.attention(), msgs.attentionSelectLongitude());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -631,19 +612,19 @@ public class GeospatialCreateCoordinatesPanel extends FramedPanel 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 {
|
||||||
if (caught instanceof TDGWTIsFinalException) {
|
if (caught instanceof TDGWTIsFinalException) {
|
||||||
Log.error(caught.getLocalizedMessage());
|
Log.error(caught.getLocalizedMessage());
|
||||||
UtilsGXT3.alert("Error Final",
|
UtilsGXT3.alert(msgsCommon.errorFinal(),
|
||||||
caught.getLocalizedMessage());
|
caught.getLocalizedMessage());
|
||||||
} else {
|
} else {
|
||||||
Log.debug("Create Geospatial Coordinates Error: "
|
Log.debug("Create Geospatial Coordinates Error: "
|
||||||
+ caught.getLocalizedMessage());
|
+ caught.getLocalizedMessage());
|
||||||
UtilsGXT3
|
UtilsGXT3
|
||||||
.alert("Error Creating Geospatial Coordinates",
|
.alert(msgsCommon.error(),
|
||||||
"Error creating geospatial coordinates: "
|
msgs.errorCreatingGeospatialCoordinatesFixed()
|
||||||
+ caught.getLocalizedMessage());
|
+ caught.getLocalizedMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -670,18 +651,18 @@ public class GeospatialCreateCoordinatesPanel extends FramedPanel 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 {
|
||||||
if (caught instanceof TDGWTIsFinalException) {
|
if (caught instanceof TDGWTIsFinalException) {
|
||||||
Log.error(caught.getLocalizedMessage());
|
Log.error(caught.getLocalizedMessage());
|
||||||
UtilsGXT3.alert("Error Final",
|
UtilsGXT3.alert(msgsCommon.errorFinal(),
|
||||||
caught.getLocalizedMessage());
|
caught.getLocalizedMessage());
|
||||||
} else {
|
} else {
|
||||||
Log.error("load combo failure:"
|
Log.error("load combo failure:"
|
||||||
+ caught.getLocalizedMessage());
|
+ caught.getLocalizedMessage());
|
||||||
UtilsGXT3.alert("Error",
|
UtilsGXT3.alert(msgsCommon.error(),
|
||||||
"Error retrieving columns of tabular resource:"
|
msgs.errorRetrievingColumsOfTabularResourceFixed()
|
||||||
+ trId.getId());
|
+ trId.getId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -722,8 +703,8 @@ public class GeospatialCreateCoordinatesPanel extends FramedPanel implements
|
||||||
if (columns.size() < 1) {
|
if (columns.size() < 1) {
|
||||||
Log.debug("Attention no Integer or Numeric column is present in the tabular resource");
|
Log.debug("Attention no Integer or Numeric column is present in the tabular resource");
|
||||||
UtilsGXT3
|
UtilsGXT3
|
||||||
.alert("Attention",
|
.alert(msgsCommon.attention(),
|
||||||
"No Integer or Numeric column is present in the tabular resource!");
|
msgs.attentionNoIntegerOrNumericColumnIsPresent());
|
||||||
}
|
}
|
||||||
testCreated();
|
testCreated();
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,9 @@ import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTIsLockedExcep
|
||||||
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.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.tablewidget.client.TableWidgetMessages;
|
||||||
import org.gcube.portlets.user.td.tablewidget.client.util.UtilsGXT3;
|
import org.gcube.portlets.user.td.tablewidget.client.util.UtilsGXT3;
|
||||||
|
import org.gcube.portlets.user.td.widgetcommonevent.client.CommonMessages;
|
||||||
import org.gcube.portlets.user.td.widgetcommonevent.client.event.ChangeTableRequestEvent;
|
import org.gcube.portlets.user.td.widgetcommonevent.client.event.ChangeTableRequestEvent;
|
||||||
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.ChangeTableRequestType;
|
import org.gcube.portlets.user.td.widgetcommonevent.client.type.ChangeTableRequestType;
|
||||||
|
@ -16,21 +18,39 @@ import org.gcube.portlets.user.td.widgetcommonevent.shared.OperationResult;
|
||||||
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
|
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.GWT;
|
||||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||||
import com.google.web.bindery.event.shared.EventBus;
|
import com.google.web.bindery.event.shared.EventBus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author giancarlo
|
||||||
|
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||||
|
*
|
||||||
|
*/
|
||||||
public class HistoryDiscard implements MonitorDialogListener {
|
public class HistoryDiscard implements MonitorDialogListener {
|
||||||
protected TRId trId;
|
private TRId trId;
|
||||||
protected EventBus eventBus;
|
private EventBus eventBus;
|
||||||
|
|
||||||
|
private CommonMessages msgsCommon;
|
||||||
|
private TableWidgetMessages msgs;
|
||||||
|
|
||||||
|
|
||||||
public HistoryDiscard(EventBus eventBus) {
|
public HistoryDiscard(EventBus eventBus) {
|
||||||
this.eventBus = eventBus;
|
this.eventBus = eventBus;
|
||||||
|
initMessages();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void discard() {
|
public void discard() {
|
||||||
retrieveCurrentTR();
|
retrieveCurrentTR();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void initMessages() {
|
||||||
|
msgsCommon = GWT.create(CommonMessages.class);
|
||||||
|
msgs = GWT.create(TableWidgetMessages.class);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
protected void retrieveCurrentTR() {
|
protected void retrieveCurrentTR() {
|
||||||
TDGWTServiceAsync.INSTANCE.getCurrentTRId(new AsyncCallback<TRId>() {
|
TDGWTServiceAsync.INSTANCE.getCurrentTRId(new AsyncCallback<TRId>() {
|
||||||
|
|
||||||
|
@ -41,13 +61,13 @@ public class HistoryDiscard implements MonitorDialogListener {
|
||||||
} 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 retrieving trId: "
|
Log.error("Error retrieving trId: "
|
||||||
+ caught.getLocalizedMessage());
|
+ caught.getLocalizedMessage());
|
||||||
UtilsGXT3.alert("Error",
|
UtilsGXT3.alert(msgsCommon.error(),
|
||||||
"Error retrieving current tabular resource id");
|
msgs.errorRetrievingCurrentTabularResourceId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -72,17 +92,17 @@ public class HistoryDiscard implements MonitorDialogListener {
|
||||||
} 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 {
|
||||||
if (caught instanceof TDGWTIsFinalException) {
|
if (caught instanceof TDGWTIsFinalException) {
|
||||||
Log.error(caught.getLocalizedMessage());
|
Log.error(caught.getLocalizedMessage());
|
||||||
UtilsGXT3.alert("Error Final",
|
UtilsGXT3.alert(msgsCommon.errorFinal(),
|
||||||
caught.getLocalizedMessage());
|
caught.getLocalizedMessage());
|
||||||
} else {
|
} else {
|
||||||
Log.error("Error in discard: "
|
Log.error("Error in discard: "
|
||||||
+ caught.getLocalizedMessage());
|
+ caught.getLocalizedMessage());
|
||||||
UtilsGXT3.alert("Error in undo",
|
UtilsGXT3.alert(msgsCommon.error(),
|
||||||
caught.getLocalizedMessage());
|
caught.getLocalizedMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -93,7 +113,7 @@ public class HistoryDiscard implements MonitorDialogListener {
|
||||||
Log.debug("Discard Session taskId: " + taskId);
|
Log.debug("Discard Session taskId: " + taskId);
|
||||||
if (taskId == null) {
|
if (taskId == null) {
|
||||||
Log.info("Attention: undo not applicable");
|
Log.info("Attention: undo not applicable");
|
||||||
UtilsGXT3.info("Attention", "Undo not applicable");
|
UtilsGXT3.info(msgsCommon.error(), msgs.attentionUndoNotApplicable());
|
||||||
} else {
|
} else {
|
||||||
openMonitorDialog(taskId);
|
openMonitorDialog(taskId);
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,13 +9,14 @@ import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTIsLockedExcep
|
||||||
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.history.OpHistory;
|
import org.gcube.portlets.user.td.gwtservice.shared.history.OpHistory;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.history.RollBackSession;
|
import org.gcube.portlets.user.td.gwtservice.shared.history.RollBackSession;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.TableData;
|
|
||||||
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.tablewidget.client.TableWidgetMessages;
|
||||||
import org.gcube.portlets.user.td.tablewidget.client.custom.ActionButtonCellNoFirst;
|
import org.gcube.portlets.user.td.tablewidget.client.custom.ActionButtonCellNoFirst;
|
||||||
import org.gcube.portlets.user.td.tablewidget.client.properties.OpHistoryProperties;
|
import org.gcube.portlets.user.td.tablewidget.client.properties.OpHistoryProperties;
|
||||||
import org.gcube.portlets.user.td.tablewidget.client.resources.ResourceBundle;
|
import org.gcube.portlets.user.td.tablewidget.client.resources.ResourceBundle;
|
||||||
import org.gcube.portlets.user.td.tablewidget.client.util.UtilsGXT3;
|
import org.gcube.portlets.user.td.tablewidget.client.util.UtilsGXT3;
|
||||||
|
import org.gcube.portlets.user.td.widgetcommonevent.client.CommonMessages;
|
||||||
import org.gcube.portlets.user.td.widgetcommonevent.client.event.ChangeTableRequestEvent;
|
import org.gcube.portlets.user.td.widgetcommonevent.client.event.ChangeTableRequestEvent;
|
||||||
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.ChangeTableRequestType;
|
import org.gcube.portlets.user.td.widgetcommonevent.client.type.ChangeTableRequestType;
|
||||||
|
@ -44,7 +45,6 @@ import com.sencha.gxt.data.shared.loader.ListLoader;
|
||||||
import com.sencha.gxt.data.shared.loader.LoadResultListStoreBinding;
|
import com.sencha.gxt.data.shared.loader.LoadResultListStoreBinding;
|
||||||
import com.sencha.gxt.widget.core.client.FramedPanel;
|
import com.sencha.gxt.widget.core.client.FramedPanel;
|
||||||
import com.sencha.gxt.widget.core.client.container.MarginData;
|
import com.sencha.gxt.widget.core.client.container.MarginData;
|
||||||
import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer;
|
|
||||||
import com.sencha.gxt.widget.core.client.event.SelectEvent;
|
import com.sencha.gxt.widget.core.client.event.SelectEvent;
|
||||||
import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler;
|
import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler;
|
||||||
import com.sencha.gxt.widget.core.client.grid.ColumnConfig;
|
import com.sencha.gxt.widget.core.client.grid.ColumnConfig;
|
||||||
|
@ -59,29 +59,30 @@ import com.sencha.gxt.widget.core.client.grid.RowExpander;
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class HistoryPanel extends FramedPanel implements MonitorDialogListener {
|
public class HistoryPanel extends FramedPanel implements MonitorDialogListener {
|
||||||
protected String WIDTH = "298px";
|
private static final String WIDTH = "298px";
|
||||||
protected String HEIGHT = "520px";
|
private static final String HEIGHT = "520px";
|
||||||
|
|
||||||
protected TRId trId;
|
private TRId trId;
|
||||||
protected TableData table;
|
private EventBus eventBus;
|
||||||
protected String headingTitle;
|
|
||||||
protected VerticalLayoutContainer vl;
|
|
||||||
protected EventBus eventBus;
|
|
||||||
|
|
||||||
protected ListStore<OpHistory> store;
|
private ListStore<OpHistory> store;
|
||||||
protected ListLoader<ListLoadConfig, ListLoadResult<OpHistory>> loader;
|
private ListLoader<ListLoadConfig, ListLoadResult<OpHistory>> loader;
|
||||||
protected Grid<OpHistory> grid;
|
private Grid<OpHistory> gridHistory;
|
||||||
|
|
||||||
protected OpHistory currentOpHistory;
|
private OpHistory currentOpHistory;
|
||||||
protected int currentRowIndex;
|
private int currentRowIndex;
|
||||||
protected RollBackSession rollBackSession;
|
private RollBackSession rollBackSession;
|
||||||
|
|
||||||
private boolean drawed = false;
|
private boolean drawed = false;
|
||||||
|
|
||||||
|
private CommonMessages msgsCommon;
|
||||||
|
private TableWidgetMessages msgs;
|
||||||
|
|
||||||
public HistoryPanel(EventBus eventBus) {
|
public HistoryPanel(EventBus eventBus) {
|
||||||
super();
|
super();
|
||||||
this.eventBus = eventBus;
|
this.eventBus = eventBus;
|
||||||
forceLayoutOnResize = true;
|
forceLayoutOnResize = true;
|
||||||
|
initMessages();
|
||||||
retrieveCurrentTR();
|
retrieveCurrentTR();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -90,9 +91,16 @@ public class HistoryPanel extends FramedPanel implements MonitorDialogListener {
|
||||||
this.trId = trId;
|
this.trId = trId;
|
||||||
this.eventBus = eventBus;
|
this.eventBus = eventBus;
|
||||||
forceLayoutOnResize = true;
|
forceLayoutOnResize = true;
|
||||||
|
initMessages();
|
||||||
draw();
|
draw();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void initMessages() {
|
||||||
|
msgsCommon = GWT.create(CommonMessages.class);
|
||||||
|
msgs = GWT.create(TableWidgetMessages.class);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
protected void draw() {
|
protected void draw() {
|
||||||
drawed = true;
|
drawed = true;
|
||||||
init();
|
init();
|
||||||
|
@ -117,18 +125,23 @@ public class HistoryPanel extends FramedPanel implements MonitorDialogListener {
|
||||||
@Override
|
@Override
|
||||||
public void render(Context context, OpHistory value,
|
public void render(Context context, OpHistory value,
|
||||||
SafeHtmlBuilder sb) {
|
SafeHtmlBuilder sb) {
|
||||||
sb.appendHtmlConstant("<p style='margin: 5px 5px 10px'><b>Date:</b>"
|
sb.appendHtmlConstant("<p style='margin: 5px 5px 10px'><b>"
|
||||||
+ SafeHtmlUtils.htmlEscape(value.getDate()) + "</p>");
|
+ msgs.dateFixed()
|
||||||
sb.appendHtmlConstant("<p style='margin: 5px 5px 10px'><b>Description:</b>"
|
+ "</b>"
|
||||||
|
+ SafeHtmlUtils.htmlEscape(value.getDate())
|
||||||
|
+ "</p>");
|
||||||
|
sb.appendHtmlConstant("<p style='margin: 5px 5px 10px'><b>"
|
||||||
|
+ msgs.descriptionFixed()
|
||||||
|
+ "</b>"
|
||||||
+ SafeHtmlUtils.htmlEscape(value
|
+ SafeHtmlUtils.htmlEscape(value
|
||||||
.getDescription()) + "</p>");
|
.getDescription()) + "</p>");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
ColumnConfig<OpHistory, String> nameCol = new ColumnConfig<OpHistory, String>(
|
ColumnConfig<OpHistory, String> stepCol = new ColumnConfig<OpHistory, String>(
|
||||||
props.name(), 132, "Step");
|
props.name(), 132, msgs.stepCol());
|
||||||
|
|
||||||
nameCol.setCell(new AbstractCell<String>() {
|
stepCol.setCell(new AbstractCell<String>() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void render(Context context, String value, SafeHtmlBuilder sb) {
|
public void render(Context context, String value, SafeHtmlBuilder sb) {
|
||||||
|
@ -141,15 +154,15 @@ public class HistoryPanel extends FramedPanel implements MonitorDialogListener {
|
||||||
});
|
});
|
||||||
|
|
||||||
ColumnConfig<OpHistory, String> dateCol = new ColumnConfig<OpHistory, String>(
|
ColumnConfig<OpHistory, String> dateCol = new ColumnConfig<OpHistory, String>(
|
||||||
props.date(), 106, "Date");
|
props.date(), 106, msgs.dateCol());
|
||||||
|
|
||||||
ColumnConfig<OpHistory, String> rollBackColumn = new ColumnConfig<OpHistory, String>(
|
ColumnConfig<OpHistory, String> rollBackColumn = new ColumnConfig<OpHistory, String>(
|
||||||
props.date(), 40, "Undo");
|
props.date(), 40, msgs.rollBackCol());
|
||||||
|
|
||||||
ActionButtonCellNoFirst button = new ActionButtonCellNoFirst();
|
ActionButtonCellNoFirst btnCellUndo = new ActionButtonCellNoFirst();
|
||||||
button.setIcon(ResourceBundle.INSTANCE.undo());
|
btnCellUndo.setIcon(ResourceBundle.INSTANCE.undo());
|
||||||
button.setTitle("Undo");
|
btnCellUndo.setTitle(msgs.btnCellUndoTitle());
|
||||||
button.addSelectHandler(new SelectHandler() {
|
btnCellUndo.addSelectHandler(new SelectHandler() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSelect(SelectEvent event) {
|
public void onSelect(SelectEvent event) {
|
||||||
|
@ -160,11 +173,11 @@ public class HistoryPanel extends FramedPanel implements MonitorDialogListener {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
rollBackColumn.setCell(button);
|
rollBackColumn.setCell(btnCellUndo);
|
||||||
|
|
||||||
List<ColumnConfig<OpHistory, ?>> l = new ArrayList<ColumnConfig<OpHistory, ?>>();
|
List<ColumnConfig<OpHistory, ?>> l = new ArrayList<ColumnConfig<OpHistory, ?>>();
|
||||||
l.add(expander);
|
l.add(expander);
|
||||||
l.add(nameCol);
|
l.add(stepCol);
|
||||||
l.add(dateCol);
|
l.add(dateCol);
|
||||||
l.add(rollBackColumn);
|
l.add(rollBackColumn);
|
||||||
|
|
||||||
|
@ -189,7 +202,7 @@ public class HistoryPanel extends FramedPanel implements MonitorDialogListener {
|
||||||
store) {
|
store) {
|
||||||
});
|
});
|
||||||
|
|
||||||
grid = new Grid<OpHistory>(store, cm) {
|
gridHistory = new Grid<OpHistory>(store, cm) {
|
||||||
@Override
|
@Override
|
||||||
protected void onAfterFirstAttach() {
|
protected void onAfterFirstAttach() {
|
||||||
super.onAfterFirstAttach();
|
super.onAfterFirstAttach();
|
||||||
|
@ -202,26 +215,26 @@ public class HistoryPanel extends FramedPanel implements MonitorDialogListener {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
grid.setLoader(loader);
|
gridHistory.setLoader(loader);
|
||||||
grid.setSize("200px", "300px");
|
gridHistory.setSize("200px", "300px");
|
||||||
|
|
||||||
grid.getView().setStripeRows(true);
|
gridHistory.getView().setStripeRows(true);
|
||||||
grid.getView().setColumnLines(true);
|
gridHistory.getView().setColumnLines(true);
|
||||||
grid.getView().setAutoFill(true);
|
gridHistory.getView().setAutoFill(true);
|
||||||
grid.setBorders(false);
|
gridHistory.setBorders(false);
|
||||||
grid.setLoadMask(true);
|
gridHistory.setLoadMask(true);
|
||||||
grid.setColumnReordering(true);
|
gridHistory.setColumnReordering(true);
|
||||||
grid.setColumnResize(true);
|
gridHistory.setColumnResize(true);
|
||||||
grid.getView().setAutoExpandColumn(nameCol);
|
gridHistory.getView().setAutoExpandColumn(stepCol);
|
||||||
grid.getView().setEmptyText("Empty");
|
gridHistory.getView().setEmptyText(msgs.gridHistoryEmptyText());
|
||||||
expander.initPlugin(grid);
|
expander.initPlugin(gridHistory);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* VerticalLayoutContainer v = new VerticalLayoutContainer();
|
* VerticalLayoutContainer v = new VerticalLayoutContainer();
|
||||||
* v.setScrollMode(ScrollMode.AUTO); v.add(grid, new
|
* v.setScrollMode(ScrollMode.AUTO); v.add(grid, new
|
||||||
* VerticalLayoutData(1, 1, new Margins(0))); v.forceLayout();
|
* VerticalLayoutData(1, 1, new Margins(0))); v.forceLayout();
|
||||||
*/
|
*/
|
||||||
add(grid, new MarginData(0));
|
add(gridHistory, new MarginData(0));
|
||||||
|
|
||||||
onResize();
|
onResize();
|
||||||
}
|
}
|
||||||
|
@ -248,20 +261,18 @@ public class HistoryPanel extends FramedPanel implements MonitorDialogListener {
|
||||||
} 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 {
|
||||||
if (caught instanceof TDGWTIsFinalException) {
|
if (caught instanceof TDGWTIsFinalException) {
|
||||||
Log.error(caught.getLocalizedMessage());
|
Log.error(caught.getLocalizedMessage());
|
||||||
UtilsGXT3.alert("Error Final",
|
UtilsGXT3.alert(msgsCommon.errorFinal(),
|
||||||
caught.getLocalizedMessage());
|
caught.getLocalizedMessage());
|
||||||
} else {
|
} else {
|
||||||
Log.error("Error in rollback: "
|
Log.error("Error in rollback: "
|
||||||
+ caught.getLocalizedMessage());
|
+ caught.getLocalizedMessage());
|
||||||
UtilsGXT3
|
UtilsGXT3.alert(msgsCommon.error(),
|
||||||
.alert("Error in rollback",
|
caught.getLocalizedMessage());
|
||||||
"Error: "
|
|
||||||
+ caught.getLocalizedMessage());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -289,13 +300,13 @@ public class HistoryPanel extends FramedPanel implements MonitorDialogListener {
|
||||||
} 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 Retrieving History: "
|
Log.error("Error Retrieving History: "
|
||||||
+ caught.getLocalizedMessage());
|
+ caught.getLocalizedMessage());
|
||||||
UtilsGXT3.alert("Error retrieving history",
|
UtilsGXT3.alert(msgsCommon.error(),
|
||||||
"Error retrieving history");
|
msgs.errorRetrievingHistory());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
callback.onFailure(caught);
|
callback.onFailure(caught);
|
||||||
|
@ -327,13 +338,13 @@ public class HistoryPanel extends FramedPanel implements MonitorDialogListener {
|
||||||
} 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 retrieving current TRId: "
|
Log.error("Error retrieving current TRId: "
|
||||||
+ caught.getLocalizedMessage());
|
+ caught.getLocalizedMessage());
|
||||||
UtilsGXT3.alert("Error",
|
UtilsGXT3.alert(msgsCommon.error(),
|
||||||
"Error retrieving current tabular resource id");
|
msgs.errorRetrievingCurrentTabularResourceId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -380,7 +391,8 @@ public class HistoryPanel extends FramedPanel implements MonitorDialogListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void operationStopped(OperationResult operationResult, String reason, String details) {
|
public void operationStopped(OperationResult operationResult,
|
||||||
|
String reason, String details) {
|
||||||
ChangeTableWhy why = ChangeTableWhy.TABLECURATION;
|
ChangeTableWhy why = ChangeTableWhy.TABLECURATION;
|
||||||
ChangeTableRequestEvent changeTableRequestEvent = new ChangeTableRequestEvent(
|
ChangeTableRequestEvent changeTableRequestEvent = new ChangeTableRequestEvent(
|
||||||
ChangeTableRequestType.ROLLBACK, operationResult.getTrId(), why);
|
ChangeTableRequestType.ROLLBACK, operationResult.getTrId(), why);
|
||||||
|
|
|
@ -1,34 +1,57 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<module rename-to='TableWidget'>
|
<module rename-to='TableWidget'>
|
||||||
<!-- Inherit the core Web Toolkit stuff. -->
|
<!-- Inherit the core Web Toolkit stuff. -->
|
||||||
<inherits name='com.google.gwt.user.User' />
|
<inherits name='com.google.gwt.user.User' />
|
||||||
|
<!-- <inherits name="com.google.gwt.i18n.I18N" /> -->
|
||||||
|
|
||||||
<!-- We need the JUnit module in the main module, -->
|
<!-- We need the JUnit module in the main module, -->
|
||||||
<!-- otherwise eclipse complains (Google plugin bug?) -->
|
<!-- otherwise eclipse complains (Google plugin bug?) -->
|
||||||
<inherits name='com.google.gwt.junit.JUnit' />
|
<inherits name='com.google.gwt.junit.JUnit' />
|
||||||
|
|
||||||
<!-- Inherit the default GWT style sheet. You can change -->
|
<!-- Inherit the default GWT style sheet. You can change -->
|
||||||
<!-- the theme of your GWT application by uncommenting -->
|
<!-- the theme of your GWT application by uncommenting -->
|
||||||
<!-- any one of the following lines. -->
|
<!-- any one of the following lines. -->
|
||||||
<inherits name='com.google.gwt.user.theme.standard.Standard' />
|
<!-- <inherits name='com.google.gwt.user.theme.standard.Standard' /> -->
|
||||||
<!-- <inherits name='com.google.gwt.user.theme.chrome.Chrome'/> -->
|
<!-- <inherits name='com.google.gwt.user.theme.chrome.Chrome'/> -->
|
||||||
<!-- <inherits name='com.google.gwt.user.theme.dark.Dark'/> -->
|
<!-- <inherits name='com.google.gwt.user.theme.dark.Dark'/> -->
|
||||||
|
|
||||||
<!-- Other module inherits -->
|
<!-- Other module inherits -->
|
||||||
<inherits name='com.sencha.gxt.ui.GXT' />
|
<inherits name='com.sencha.gxt.ui.GXT' />
|
||||||
<inherits name="com.allen_sauer.gwt.log.gwt-log-TRACE" />
|
<inherits name="com.allen_sauer.gwt.log.gwt-log-TRACE" />
|
||||||
<inherits name='org.gcube.portlets.user.td.gwtservice.TDGWTService' />
|
<inherits name='org.gcube.portlets.user.td.gwtservice.TDGWTService' />
|
||||||
<inherits
|
<inherits
|
||||||
name='org.gcube.portlets.user.td.expressionwidget.ExpressionWidget' />
|
name='org.gcube.portlets.user.td.expressionwidget.ExpressionWidget' />
|
||||||
|
|
||||||
<inherits name='org.gcube.portlets.user.td.monitorwidget.MonitorWidgetTD' />
|
<inherits name='org.gcube.portlets.user.td.monitorwidget.MonitorWidgetTD' />
|
||||||
<inherits name='org.gcube.portlets.user.td.columnwidget.ColumnWidget' />
|
<inherits name='org.gcube.portlets.user.td.columnwidget.ColumnWidget' />
|
||||||
<!-- Specify the app entry point class. -->
|
<!-- Specify the app entry point class. -->
|
||||||
<!-- <entry-point class='org.gcube.portlets.user.td.sharewidget.client.TableWidgetEntry' /> -->
|
<!-- <entry-point class='org.gcube.portlets.user.td.sharewidget.client.TableWidgetEntry'
|
||||||
|
/> -->
|
||||||
|
|
||||||
<!-- Specify the paths for translatable code -->
|
<!--
|
||||||
<source path='client' />
|
<set-configuration-property name="locale.cookie"
|
||||||
<source path='shared' />
|
value="TDLangCookie" />
|
||||||
|
<set-configuration-property name="locale.queryparam"
|
||||||
|
value="TDLang" />
|
||||||
|
<set-configuration-property name="locale.usemeta"
|
||||||
|
value="Y" />
|
||||||
|
<set-configuration-property name="locale.useragent"
|
||||||
|
value="Y" />
|
||||||
|
|
||||||
|
<set-configuration-property name="locale.searchorder"
|
||||||
|
value="cookie,queryparam,meta,useragent" />
|
||||||
|
|
||||||
|
<extend-property name="locale" values="en" />
|
||||||
|
<extend-property name="locale" values="it" />
|
||||||
|
<extend-property name="locale" values="es" />
|
||||||
|
<set-property name="locale" value="en, it, es" />
|
||||||
|
<set-property-fallback name="locale" value="en" />
|
||||||
|
-->
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Specify the paths for translatable code -->
|
||||||
|
<source path='client' />
|
||||||
|
<source path='shared' />
|
||||||
|
|
||||||
|
|
||||||
</module>
|
</module>
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
sendButton = Send
|
|
||||||
nameField = Enter your name
|
|
|
@ -1,2 +0,0 @@
|
||||||
sendButton = Envoyer
|
|
||||||
nameField = Entrez votre nom
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
buttonOpenLabel = Open
|
||||||
|
tabResourcesSelectionCardSelectLabel = Select a Tabular Resource
|
||||||
|
buttonSearchLabel = Search
|
||||||
|
buttonReloadLabel = Reload
|
||||||
|
tabResourcesSelectionPanelColumnNameLabel = Name
|
||||||
|
tabResourcesSelectionPanelColumnTypeLabel = Type
|
||||||
|
tabResourcesSelectionPanelColumnTableTypeLabel = Table Type
|
||||||
|
tabResourcesSelectionPanelColumnLockLabel = Lock
|
||||||
|
tabResourcesSelectionPanelColumnAgencyLabel = Agency
|
||||||
|
tabResourcesSelectionPanelColumnOwnerLabel = Owner
|
||||||
|
tabResourcesSelectionPanelColumnCreationDateLabel = Creation Date
|
||||||
|
tabResourcesSelectionPanelContextMenuDelete = Delete
|
||||||
|
tabResourcesSelectionPanelContextMenuInfo = Info
|
||||||
|
attentionTabularResourceIsLockedNoInfoAvailable = Tabular Resource is locked no info available!
|
||||||
|
deleteHead = Delete
|
||||||
|
questionWouldYouLikeToDeleteThisTabularResource = Would you like to delete this tabular resource?
|
|
@ -0,0 +1,16 @@
|
||||||
|
buttonOpenLabel = Abrir
|
||||||
|
tabResourcesSelectionCardSelectLabel = Seleccione una Tabular Resource
|
||||||
|
buttonSearchLabel = Búsqueda
|
||||||
|
buttonReloadLabel = Recargar
|
||||||
|
tabResourcesSelectionPanelColumnNameLabel = Nombre
|
||||||
|
tabResourcesSelectionPanelColumnTypeLabel = Tipo
|
||||||
|
tabResourcesSelectionPanelColumnTableTypeLabel = Tipo Tabla
|
||||||
|
tabResourcesSelectionPanelColumnLockLabel = Lock
|
||||||
|
tabResourcesSelectionPanelColumnAgencyLabel = Agencia
|
||||||
|
tabResourcesSelectionPanelColumnOwnerLabel = Propietario
|
||||||
|
tabResourcesSelectionPanelColumnCreationDateLabel = Fecha Creacion
|
||||||
|
tabResourcesSelectionPanelContextMenuDelete = Borrar
|
||||||
|
tabResourcesSelectionPanelContextMenuInfo = Información
|
||||||
|
attentionTabularResourceIsLockedNoInfoAvailable = La Tabular Resource es locked no hay información disponible!
|
||||||
|
deleteHead = Borrar
|
||||||
|
questionWouldYouLikeToDeleteThisTabularResource = Seguro que quieres eliminar esta Tabular Resource?
|
|
@ -0,0 +1,16 @@
|
||||||
|
buttonOpenLabel = Apri
|
||||||
|
tabResourcesSelectionCardSelectLabel = Seleziona una Tabular Resource
|
||||||
|
buttonSearchLabel = Cerca
|
||||||
|
buttonReloadLabel = Reload
|
||||||
|
tabResourcesSelectionPanelColumnNameLabel = Nome
|
||||||
|
tabResourcesSelectionPanelColumnTypeLabel = Tipo
|
||||||
|
tabResourcesSelectionPanelColumnTableTypeLabel = Tipo Tabella
|
||||||
|
tabResourcesSelectionPanelColumnLockLabel = Lock
|
||||||
|
tabResourcesSelectionPanelColumnAgencyLabel = Agenzia
|
||||||
|
tabResourcesSelectionPanelColumnOwnerLabel = Proprietario
|
||||||
|
tabResourcesSelectionPanelColumnCreationDateLabel = Data Creazione
|
||||||
|
tabResourcesSelectionPanelContextMenuDelete = Elimina
|
||||||
|
tabResourcesSelectionPanelContextMenuInfo = Informazioni
|
||||||
|
attentionTabularResourceIsLockedNoInfoAvailable = La Tabular Resource è locked nessuna informazione disponibile!
|
||||||
|
deleteHead = Elimina
|
||||||
|
questionWouldYouLikeToDeleteThisTabularResource = Sei sicuro di voler eliminare questa Tabular Resource?
|
Loading…
Reference in New Issue