|
|
|
@ -52,6 +52,7 @@ import org.gcube.portlets.user.td.tablewidget.client.util.UtilsGXT3;
|
|
|
|
|
import org.gcube.portlets.user.td.tablewidget.client.validation.ValidationsDelete;
|
|
|
|
|
import org.gcube.portlets.user.td.taskswidget.client.TdTaskController;
|
|
|
|
|
import org.gcube.portlets.user.td.unionwizardwidget.client.UnionWizardTD;
|
|
|
|
|
import org.gcube.portlets.user.td.widgetcommonevent.client.CommonMessages;
|
|
|
|
|
import org.gcube.portlets.user.td.widgetcommonevent.client.event.BackgroundRequestEvent;
|
|
|
|
|
import org.gcube.portlets.user.td.widgetcommonevent.client.event.ChangeTableRequestEvent;
|
|
|
|
|
import org.gcube.portlets.user.td.widgetcommonevent.client.event.DataViewActiveEvent;
|
|
|
|
@ -134,23 +135,28 @@ public class TabularDataController {
|
|
|
|
|
* Grid TableId
|
|
|
|
|
*/
|
|
|
|
|
private TRId openTRIdAfterServerUpdate;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Messages
|
|
|
|
|
* Messages
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
private TabularDataControllerMessages msgs;
|
|
|
|
|
private CommonMessages msgsCommon;
|
|
|
|
|
|
|
|
|
|
public TabularDataController() {
|
|
|
|
|
eventBus = new SimpleEventBus();
|
|
|
|
|
msgs = GWT.create(TabularDataControllerMessages.class);
|
|
|
|
|
|
|
|
|
|
initMessages();
|
|
|
|
|
callHello();
|
|
|
|
|
checkSession();
|
|
|
|
|
pendingTasksRetrieve();
|
|
|
|
|
bindToEvents();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void initMessages() {
|
|
|
|
|
msgs = GWT.create(TabularDataControllerMessages.class);
|
|
|
|
|
msgsCommon = GWT.create(CommonMessages.class);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void checkSession() {
|
|
|
|
|
// if you do not need to something when the session expire
|
|
|
|
|
CheckSession.getInstance().startPolling();
|
|
|
|
@ -195,10 +201,12 @@ public class TabularDataController {
|
|
|
|
|
public void onFailure(Throwable caught) {
|
|
|
|
|
Log.info("No valid user found: " + caught.getMessage());
|
|
|
|
|
if (caught instanceof TDGWTSessionExpiredException) {
|
|
|
|
|
UtilsGXT3.alert("Error", "Expired Session");
|
|
|
|
|
UtilsGXT3.alert(msgsCommon.error(),
|
|
|
|
|
msgsCommon.expiredSession());
|
|
|
|
|
sessionExpiredShowDelayed();
|
|
|
|
|
} else {
|
|
|
|
|
UtilsGXT3.alert("Error", "No user found");
|
|
|
|
|
UtilsGXT3.alert(msgsCommon.error(),
|
|
|
|
|
msgsCommon.noUserFound());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -221,10 +229,11 @@ public class TabularDataController {
|
|
|
|
|
public void onFailure(Throwable caught) {
|
|
|
|
|
Log.info("No valid user found: " + caught.getMessage());
|
|
|
|
|
if (caught instanceof TDGWTSessionExpiredException) {
|
|
|
|
|
UtilsGXT3.alert("Error", "Expired Session");
|
|
|
|
|
UtilsGXT3.alert(msgsCommon.error(),
|
|
|
|
|
msgsCommon.expiredSession());
|
|
|
|
|
sessionExpiredShowDelayed();
|
|
|
|
|
} else {
|
|
|
|
|
UtilsGXT3.alert("Error",
|
|
|
|
|
UtilsGXT3.alert(msgsCommon.error(),
|
|
|
|
|
caught.getLocalizedMessage());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -372,16 +381,16 @@ public class TabularDataController {
|
|
|
|
|
|
|
|
|
|
LocaleInfo currentLocaleInfo = LocaleInfo.getCurrentLocale();
|
|
|
|
|
Log.debug("Current Locale:" + currentLocaleInfo.getLocaleName());
|
|
|
|
|
|
|
|
|
|
String localeName=currentLocaleInfo.getLocaleName();
|
|
|
|
|
|
|
|
|
|
String localeName = currentLocaleInfo.getLocaleName();
|
|
|
|
|
InfoLocale infoLocale;
|
|
|
|
|
if(localeName==null||localeName.isEmpty()){
|
|
|
|
|
infoLocale=new InfoLocale("en");
|
|
|
|
|
if (localeName == null || localeName.isEmpty()) {
|
|
|
|
|
infoLocale = new InfoLocale("en");
|
|
|
|
|
} else {
|
|
|
|
|
infoLocale=new InfoLocale(localeName.substring(0, 2));
|
|
|
|
|
infoLocale = new InfoLocale(localeName.substring(0, 2));
|
|
|
|
|
}
|
|
|
|
|
setInfoLocale(infoLocale);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected void changeLanguage(String localeName) {
|
|
|
|
@ -395,18 +404,18 @@ public class TabularDataController {
|
|
|
|
|
}
|
|
|
|
|
Cookies.setCookie(Constants.TD_LANG_COOKIE, localeName, now);
|
|
|
|
|
com.google.gwt.user.client.Window.Location.reload();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
InfoLocale infoLocale;
|
|
|
|
|
if(localeName==null||localeName.isEmpty()){
|
|
|
|
|
infoLocale=new InfoLocale("en");
|
|
|
|
|
if (localeName == null || localeName.isEmpty()) {
|
|
|
|
|
infoLocale = new InfoLocale("en");
|
|
|
|
|
} else {
|
|
|
|
|
infoLocale=new InfoLocale(localeName);
|
|
|
|
|
infoLocale = new InfoLocale(localeName);
|
|
|
|
|
}
|
|
|
|
|
setInfoLocale(infoLocale);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected void setInfoLocale(InfoLocale infoLocale){
|
|
|
|
|
|
|
|
|
|
protected void setInfoLocale(InfoLocale infoLocale) {
|
|
|
|
|
TDGWTServiceAsync.INSTANCE.setLocale(infoLocale,
|
|
|
|
|
new AsyncCallback<Void>() {
|
|
|
|
|
|
|
|
|
@ -417,10 +426,10 @@ public class TabularDataController {
|
|
|
|
|
} else {
|
|
|
|
|
if (caught instanceof TDGWTIsLockedException) {
|
|
|
|
|
Log.error(caught.getLocalizedMessage());
|
|
|
|
|
UtilsGXT3.alert("Error Locked",
|
|
|
|
|
UtilsGXT3.alert(msgsCommon.errorLocked(),
|
|
|
|
|
caught.getLocalizedMessage());
|
|
|
|
|
} else {
|
|
|
|
|
UtilsGXT3.alert("Error",
|
|
|
|
|
UtilsGXT3.alert(msgsCommon.error(),
|
|
|
|
|
caught.getLocalizedMessage());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -432,7 +441,7 @@ public class TabularDataController {
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
public void restoreUISession() {
|
|
|
|
|
checkLocale();
|
|
|
|
@ -451,10 +460,10 @@ public class TabularDataController {
|
|
|
|
|
} else {
|
|
|
|
|
if (caught instanceof TDGWTIsLockedException) {
|
|
|
|
|
Log.error(caught.getLocalizedMessage());
|
|
|
|
|
UtilsGXT3.alert("Error Locked",
|
|
|
|
|
UtilsGXT3.alert(msgsCommon.errorLocked(),
|
|
|
|
|
caught.getLocalizedMessage());
|
|
|
|
|
} else {
|
|
|
|
|
UtilsGXT3.alert("Error",
|
|
|
|
|
UtilsGXT3.alert(msgsCommon.error(),
|
|
|
|
|
caught.getLocalizedMessage());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -603,7 +612,7 @@ public class TabularDataController {
|
|
|
|
|
.closeAllTabularResources(new AsyncCallback<Void>() {
|
|
|
|
|
|
|
|
|
|
public void onFailure(Throwable caught) {
|
|
|
|
|
UtilsGXT3.alert("Error closing all tabular resources",
|
|
|
|
|
UtilsGXT3.alert(msgs.errorClosingAllTabularResource(),
|
|
|
|
|
caught.getLocalizedMessage());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -645,10 +654,9 @@ public class TabularDataController {
|
|
|
|
|
Log.error("Error in Close and Open TR "
|
|
|
|
|
+ caught.getLocalizedMessage());
|
|
|
|
|
caught.printStackTrace();
|
|
|
|
|
UtilsGXT3
|
|
|
|
|
.alert("Error",
|
|
|
|
|
"Error in close TR: "
|
|
|
|
|
+ caught.getLocalizedMessage());
|
|
|
|
|
UtilsGXT3.alert(msgsCommon.error(), msgs
|
|
|
|
|
.errorInCloseTR(caught
|
|
|
|
|
.getLocalizedMessage()));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@ -699,13 +707,12 @@ public class TabularDataController {
|
|
|
|
|
eventBus.fireEvent(new SessionExpiredEvent(
|
|
|
|
|
SessionExpiredType.EXPIREDONSERVER));
|
|
|
|
|
} else {
|
|
|
|
|
Log.error("Error in set Active TR: "
|
|
|
|
|
+ caught.getLocalizedMessage());
|
|
|
|
|
Log.error(msgs.errorInSetActiveTR(caught
|
|
|
|
|
.getLocalizedMessage()));
|
|
|
|
|
caught.printStackTrace();
|
|
|
|
|
UtilsGXT3.alert(
|
|
|
|
|
"Error",
|
|
|
|
|
"Error in set Active TR: "
|
|
|
|
|
+ caught.getLocalizedMessage());
|
|
|
|
|
UtilsGXT3.alert(msgsCommon.error(), msgs
|
|
|
|
|
.errorInSetActiveTR(caught
|
|
|
|
|
.getLocalizedMessage()));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@ -742,8 +749,8 @@ public class TabularDataController {
|
|
|
|
|
|
|
|
|
|
private void deleteTabularResource() {
|
|
|
|
|
|
|
|
|
|
final ConfirmMessageBox mb = new ConfirmMessageBox("Confirm",
|
|
|
|
|
"Are you sure you want to delete the tabular resource?");
|
|
|
|
|
final ConfirmMessageBox mb = new ConfirmMessageBox(msgs.confirm(),
|
|
|
|
|
msgs.areYouSureYouWantToDeleteTheTabularResource());
|
|
|
|
|
|
|
|
|
|
mb.addDialogHideHandler(new DialogHideHandler() {
|
|
|
|
|
|
|
|
|
@ -759,7 +766,7 @@ public class TabularDataController {
|
|
|
|
|
new AsyncCallback<Void>() {
|
|
|
|
|
|
|
|
|
|
public void onFailure(Throwable caught) {
|
|
|
|
|
UtilsGXT3.alert("Error on Delete",
|
|
|
|
|
UtilsGXT3.alert(msgsCommon.error(),
|
|
|
|
|
caught.getLocalizedMessage());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -850,7 +857,7 @@ public class TabularDataController {
|
|
|
|
|
break;
|
|
|
|
|
case VALIDATIONS_DELETE:
|
|
|
|
|
validationsDelete();
|
|
|
|
|
break;
|
|
|
|
|
break;
|
|
|
|
|
case DUPLICATE_DETECTION:
|
|
|
|
|
openDuplicatesRowsDetection();
|
|
|
|
|
break;
|
|
|
|
@ -1111,7 +1118,8 @@ public class TabularDataController {
|
|
|
|
|
dialog.show();
|
|
|
|
|
} else {
|
|
|
|
|
Log.error("TRId is null");
|
|
|
|
|
UtilsGXT3.alert("Error", "No tabular resource present");
|
|
|
|
|
UtilsGXT3
|
|
|
|
|
.alert(msgsCommon.error(), msgs.noTabularResourcePresent());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -1120,8 +1128,8 @@ public class TabularDataController {
|
|
|
|
|
|
|
|
|
|
public void onSuccess() {
|
|
|
|
|
openWizard();
|
|
|
|
|
SDMXImportWizardTD importWizard = new SDMXImportWizardTD(
|
|
|
|
|
"SDMX Import", eventBus);
|
|
|
|
|
SDMXImportWizardTD importWizard = new SDMXImportWizardTD(msgs
|
|
|
|
|
.sdmxImport(), eventBus);
|
|
|
|
|
importWizard.addListener(new WizardListener() {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@ -1164,8 +1172,8 @@ public class TabularDataController {
|
|
|
|
|
|
|
|
|
|
public void onSuccess() {
|
|
|
|
|
openWizard();
|
|
|
|
|
CSVExportWizardTD exportWizard = new CSVExportWizardTD(
|
|
|
|
|
"CSV Export", eventBus);
|
|
|
|
|
CSVExportWizardTD exportWizard = new CSVExportWizardTD(msgs
|
|
|
|
|
.csvExport(), eventBus);
|
|
|
|
|
|
|
|
|
|
exportWizard.addListener(new WizardListener() {
|
|
|
|
|
|
|
|
|
@ -1210,8 +1218,8 @@ public class TabularDataController {
|
|
|
|
|
|
|
|
|
|
public void onSuccess() {
|
|
|
|
|
openWizard();
|
|
|
|
|
JSONExportWidgetTD exportWizard = new JSONExportWidgetTD(
|
|
|
|
|
"JSON Export", eventBus);
|
|
|
|
|
JSONExportWidgetTD exportWizard = new JSONExportWidgetTD(msgs
|
|
|
|
|
.jsonExport(), eventBus);
|
|
|
|
|
|
|
|
|
|
exportWizard.addListener(new WizardListener() {
|
|
|
|
|
|
|
|
|
@ -1256,8 +1264,8 @@ public class TabularDataController {
|
|
|
|
|
|
|
|
|
|
public void onSuccess() {
|
|
|
|
|
openWizard();
|
|
|
|
|
SDMXExportWizardTD exportWizard = new SDMXExportWizardTD(
|
|
|
|
|
"SDMX Export", eventBus);
|
|
|
|
|
SDMXExportWizardTD exportWizard = new SDMXExportWizardTD(msgs
|
|
|
|
|
.sdmxExport(), eventBus);
|
|
|
|
|
|
|
|
|
|
exportWizard.addListener(new WizardListener() {
|
|
|
|
|
public void failed(String title, String message,
|
|
|
|
@ -1298,7 +1306,7 @@ public class TabularDataController {
|
|
|
|
|
public void onSuccess() {
|
|
|
|
|
openWizard();
|
|
|
|
|
ExtractCodelistWizardTD extractCodelistWizard = new ExtractCodelistWizardTD(
|
|
|
|
|
trId, "Extract Codelist", eventBus);
|
|
|
|
|
trId, msgs.extractCodelist(), eventBus);
|
|
|
|
|
|
|
|
|
|
extractCodelistWizard.addListener(new WizardListener() {
|
|
|
|
|
public void failed(String title, String message,
|
|
|
|
@ -1339,7 +1347,7 @@ public class TabularDataController {
|
|
|
|
|
public void onSuccess() {
|
|
|
|
|
openWizard();
|
|
|
|
|
CodelistMappingImportWizardTD codelistMappingWizard = new CodelistMappingImportWizardTD(
|
|
|
|
|
trId, "Codelist Mapping Import", eventBus);
|
|
|
|
|
trId, msgs.codelistMappingImport(), eventBus);
|
|
|
|
|
|
|
|
|
|
codelistMappingWizard.addListener(new WizardListener() {
|
|
|
|
|
public void failed(String title, String message,
|
|
|
|
@ -1379,8 +1387,8 @@ public class TabularDataController {
|
|
|
|
|
|
|
|
|
|
public void onSuccess() {
|
|
|
|
|
openWizard();
|
|
|
|
|
UnionWizardTD unionWizard = new UnionWizardTD(trId, "Union",
|
|
|
|
|
eventBus);
|
|
|
|
|
UnionWizardTD unionWizard = new UnionWizardTD(trId, msgs
|
|
|
|
|
.union(), eventBus);
|
|
|
|
|
|
|
|
|
|
unionWizard.addListener(new WizardListener() {
|
|
|
|
|
public void failed(String title, String message,
|
|
|
|
@ -1430,10 +1438,11 @@ public class TabularDataController {
|
|
|
|
|
if (columnname == null || columnname.isEmpty()) {
|
|
|
|
|
|
|
|
|
|
replaceByExternalColWizard = new ReplaceByExternalTD(trId,
|
|
|
|
|
"Replace By External Columns", eventBus);
|
|
|
|
|
msgs.replaceByExternalColumns(), eventBus);
|
|
|
|
|
} else {
|
|
|
|
|
replaceByExternalColWizard = new ReplaceByExternalTD(trId,
|
|
|
|
|
columnname, "Replace By External Columns", eventBus);
|
|
|
|
|
columnname, msgs.replaceByExternalColumns(),
|
|
|
|
|
eventBus);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
replaceByExternalColWizard.addListener(new WizardListener() {
|
|
|
|
@ -1475,7 +1484,7 @@ public class TabularDataController {
|
|
|
|
|
public void onSuccess() {
|
|
|
|
|
openWizard();
|
|
|
|
|
ChartsWidgetTD chartWizard = new ChartsWidgetTD(trId, userInfo,
|
|
|
|
|
"Charts Creation", eventBus);
|
|
|
|
|
msgs.chartsCreation(), eventBus);
|
|
|
|
|
|
|
|
|
|
chartWizard.addListener(new WizardListener() {
|
|
|
|
|
public void failed(String title, String message,
|
|
|
|
@ -1519,8 +1528,8 @@ public class TabularDataController {
|
|
|
|
|
|
|
|
|
|
public void onSuccess() {
|
|
|
|
|
openWizard();
|
|
|
|
|
MapWidgetTD mapWizard = new MapWidgetTD(trId, userInfo,
|
|
|
|
|
"Map Creation", eventBus);
|
|
|
|
|
MapWidgetTD mapWizard = new MapWidgetTD(trId, userInfo, msgs
|
|
|
|
|
.mapCreation(), eventBus);
|
|
|
|
|
|
|
|
|
|
mapWizard.addListener(new WizardListener() {
|
|
|
|
|
public void failed(String title, String message,
|
|
|
|
@ -1617,8 +1626,8 @@ public class TabularDataController {
|
|
|
|
|
|
|
|
|
|
public void onSuccess() {
|
|
|
|
|
openWizard();
|
|
|
|
|
CSVImportWizardTD importWizard = new CSVImportWizardTD(
|
|
|
|
|
"CSV Import", eventBus);
|
|
|
|
|
CSVImportWizardTD importWizard = new CSVImportWizardTD(msgs
|
|
|
|
|
.csvImport(), eventBus);
|
|
|
|
|
|
|
|
|
|
importWizard.addListener(new WizardListener() {
|
|
|
|
|
|
|
|
|
@ -1742,8 +1751,8 @@ public class TabularDataController {
|
|
|
|
|
taDialog.show();
|
|
|
|
|
} else {
|
|
|
|
|
Log.error("TRId is null");
|
|
|
|
|
UtilsGXT3.alert("Error",
|
|
|
|
|
"No current tabular resource present");
|
|
|
|
|
UtilsGXT3.alert(msgsCommon.error(),
|
|
|
|
|
msgs.noCurrentTabularResourcePresent());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -1823,8 +1832,8 @@ public class TabularDataController {
|
|
|
|
|
raDialog.show();
|
|
|
|
|
} else {
|
|
|
|
|
Log.error("TRId is null");
|
|
|
|
|
UtilsGXT3.alert("Error",
|
|
|
|
|
"No current tabular resource present");
|
|
|
|
|
UtilsGXT3.alert(msgsCommon.error(),
|
|
|
|
|
msgs.noCurrentTabularResourcePresent());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -1873,8 +1882,8 @@ public class TabularDataController {
|
|
|
|
|
raDialog.show();
|
|
|
|
|
} else {
|
|
|
|
|
Log.error("TRId is null");
|
|
|
|
|
UtilsGXT3.alert("Error",
|
|
|
|
|
"No current tabular resource present");
|
|
|
|
|
UtilsGXT3.alert(msgsCommon.error(),
|
|
|
|
|
msgs.noCurrentTabularResourcePresent());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -1969,7 +1978,8 @@ public class TabularDataController {
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
Log.error("TRId is null");
|
|
|
|
|
UtilsGXT3.alert("Error", "No current tabular resource present");
|
|
|
|
|
UtilsGXT3.alert(msgsCommon.error(),
|
|
|
|
|
msgs.noCurrentTabularResourcePresent());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@ -1992,8 +2002,8 @@ public class TabularDataController {
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
Log.error("TRId is null");
|
|
|
|
|
UtilsGXT3.alert("Error",
|
|
|
|
|
"No current tabular resource present");
|
|
|
|
|
UtilsGXT3.alert(msgsCommon.error(),
|
|
|
|
|
msgs.noCurrentTabularResourcePresent());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -2016,7 +2026,8 @@ public class TabularDataController {
|
|
|
|
|
RStudio rStudio = new RStudio(trId, eventBus);
|
|
|
|
|
} else {
|
|
|
|
|
Log.error("TRId is null");
|
|
|
|
|
UtilsGXT3.alert("Error", "No current tabular resource present");
|
|
|
|
|
UtilsGXT3.alert(msgsCommon.error(),
|
|
|
|
|
msgs.noCurrentTabularResourcePresent());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@ -2045,7 +2056,8 @@ public class TabularDataController {
|
|
|
|
|
mcfDialog.show();
|
|
|
|
|
} else {
|
|
|
|
|
Log.error("TRId is null");
|
|
|
|
|
UtilsGXT3.alert("Error", "No current tabular resource present");
|
|
|
|
|
UtilsGXT3.alert(msgsCommon.error(),
|
|
|
|
|
msgs.noCurrentTabularResourcePresent());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -2066,7 +2078,8 @@ public class TabularDataController {
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
Log.error("TRId is null");
|
|
|
|
|
UtilsGXT3.alert("Error", "No current tabular resource present");
|
|
|
|
|
UtilsGXT3.alert(msgsCommon.error(),
|
|
|
|
|
msgs.noCurrentTabularResourcePresent());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -2083,7 +2096,8 @@ public class TabularDataController {
|
|
|
|
|
rowsDeleteDialog.show();
|
|
|
|
|
} else {
|
|
|
|
|
Log.error("TRId is null");
|
|
|
|
|
UtilsGXT3.alert("Error", "No current tabular resource present");
|
|
|
|
|
UtilsGXT3.alert(msgsCommon.error(),
|
|
|
|
|
msgs.noCurrentTabularResourcePresent());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -2100,7 +2114,8 @@ public class TabularDataController {
|
|
|
|
|
rceDialog.show();
|
|
|
|
|
} else {
|
|
|
|
|
Log.error("TRId is null");
|
|
|
|
|
UtilsGXT3.alert("Error", "No current tabular resource present");
|
|
|
|
|
UtilsGXT3.alert(msgsCommon.error(),
|
|
|
|
|
msgs.noCurrentTabularResourcePresent());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -2119,7 +2134,8 @@ public class TabularDataController {
|
|
|
|
|
eventBus.fireEvent(e);
|
|
|
|
|
} else {
|
|
|
|
|
Log.error("TRId is null");
|
|
|
|
|
UtilsGXT3.alert("Error", "No current tabular resource present");
|
|
|
|
|
UtilsGXT3.alert(msgsCommon.error(),
|
|
|
|
|
msgs.noCurrentTabularResourcePresent());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -2137,7 +2153,8 @@ public class TabularDataController {
|
|
|
|
|
eventBus.fireEvent(e);
|
|
|
|
|
} else {
|
|
|
|
|
Log.error("TRId is null");
|
|
|
|
|
UtilsGXT3.alert("Error", "No current tabular resource present");
|
|
|
|
|
UtilsGXT3.alert(msgsCommon.error(),
|
|
|
|
|
msgs.noCurrentTabularResourcePresent());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -2155,7 +2172,8 @@ public class TabularDataController {
|
|
|
|
|
eventBus.fireEvent(e);
|
|
|
|
|
} else {
|
|
|
|
|
Log.error("TRId is null");
|
|
|
|
|
UtilsGXT3.alert("Error", "No current tabular resource present");
|
|
|
|
|
UtilsGXT3.alert(msgsCommon.error(),
|
|
|
|
|
msgs.noCurrentTabularResourcePresent());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -2176,7 +2194,8 @@ public class TabularDataController {
|
|
|
|
|
dialog.show();
|
|
|
|
|
} else {
|
|
|
|
|
Log.error("TRId is null");
|
|
|
|
|
UtilsGXT3.alert("Error", "No tabular resource present");
|
|
|
|
|
UtilsGXT3
|
|
|
|
|
.alert(msgsCommon.error(), msgs.noTabularResourcePresent());
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
@ -2193,7 +2212,8 @@ public class TabularDataController {
|
|
|
|
|
eventBus.fireEvent(e);
|
|
|
|
|
} else {
|
|
|
|
|
Log.error("TRId is null");
|
|
|
|
|
UtilsGXT3.alert("Error", "No tabular resource present");
|
|
|
|
|
UtilsGXT3
|
|
|
|
|
.alert(msgsCommon.error(), msgs.noTabularResourcePresent());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -2212,7 +2232,8 @@ public class TabularDataController {
|
|
|
|
|
eventBus.fireEvent(e);
|
|
|
|
|
} else {
|
|
|
|
|
Log.error("TRId is null");
|
|
|
|
|
UtilsGXT3.alert("Error", "No tabular resource present");
|
|
|
|
|
UtilsGXT3
|
|
|
|
|
.alert(msgsCommon.error(), msgs.noTabularResourcePresent());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -2231,7 +2252,8 @@ public class TabularDataController {
|
|
|
|
|
eventBus.fireEvent(e);
|
|
|
|
|
} else {
|
|
|
|
|
Log.error("TRId is null");
|
|
|
|
|
UtilsGXT3.alert("Error", "No tabular resource present");
|
|
|
|
|
UtilsGXT3
|
|
|
|
|
.alert(msgsCommon.error(), msgs.noTabularResourcePresent());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -2250,7 +2272,8 @@ public class TabularDataController {
|
|
|
|
|
eventBus.fireEvent(e);
|
|
|
|
|
} else {
|
|
|
|
|
Log.error("TRId is null");
|
|
|
|
|
UtilsGXT3.alert("Error", "No tabular resource present");
|
|
|
|
|
UtilsGXT3
|
|
|
|
|
.alert(msgsCommon.error(), msgs.noTabularResourcePresent());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -2268,7 +2291,8 @@ public class TabularDataController {
|
|
|
|
|
eventBus.fireEvent(e);
|
|
|
|
|
} else {
|
|
|
|
|
Log.error("TRId is null");
|
|
|
|
|
UtilsGXT3.alert("Error", "No tabular resource present");
|
|
|
|
|
UtilsGXT3
|
|
|
|
|
.alert(msgsCommon.error(), msgs.noTabularResourcePresent());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -2286,7 +2310,8 @@ public class TabularDataController {
|
|
|
|
|
eventBus.fireEvent(e);
|
|
|
|
|
} else {
|
|
|
|
|
Log.error("TRId is null");
|
|
|
|
|
UtilsGXT3.alert("Error", "No tabular resource present");
|
|
|
|
|
UtilsGXT3
|
|
|
|
|
.alert(msgsCommon.error(), msgs.noTabularResourcePresent());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -2305,7 +2330,8 @@ public class TabularDataController {
|
|
|
|
|
eventBus.fireEvent(e);
|
|
|
|
|
} else {
|
|
|
|
|
Log.error("TRId is null");
|
|
|
|
|
UtilsGXT3.alert("Error", "No tabular resource present");
|
|
|
|
|
UtilsGXT3
|
|
|
|
|
.alert(msgsCommon.error(), msgs.noTabularResourcePresent());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -2324,7 +2350,8 @@ public class TabularDataController {
|
|
|
|
|
eventBus.fireEvent(e);
|
|
|
|
|
} else {
|
|
|
|
|
Log.error("TRId is null");
|
|
|
|
|
UtilsGXT3.alert("Error", "No tabular resource present");
|
|
|
|
|
UtilsGXT3
|
|
|
|
|
.alert(msgsCommon.error(), msgs.noTabularResourcePresent());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -2337,7 +2364,8 @@ public class TabularDataController {
|
|
|
|
|
eventBus.fireEvent(e);
|
|
|
|
|
} else {
|
|
|
|
|
Log.error("TRId is null");
|
|
|
|
|
UtilsGXT3.alert("Error", "No tabular resource present");
|
|
|
|
|
UtilsGXT3
|
|
|
|
|
.alert(msgsCommon.error(), msgs.noTabularResourcePresent());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -2350,7 +2378,8 @@ public class TabularDataController {
|
|
|
|
|
eventBus.fireEvent(e);
|
|
|
|
|
} else {
|
|
|
|
|
Log.error("TRId is null");
|
|
|
|
|
UtilsGXT3.alert("Error", "No tabular resource present");
|
|
|
|
|
UtilsGXT3
|
|
|
|
|
.alert(msgsCommon.error(), msgs.noTabularResourcePresent());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -2363,6 +2392,8 @@ public class TabularDataController {
|
|
|
|
|
eventBus.fireEvent(e);
|
|
|
|
|
} else {
|
|
|
|
|
Log.error("TRId is null");
|
|
|
|
|
UtilsGXT3
|
|
|
|
|
.alert(msgsCommon.error(), msgs.noTabularResourcePresent());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -2372,7 +2403,8 @@ public class TabularDataController {
|
|
|
|
|
new ValidationsDelete(trId, eventBus);
|
|
|
|
|
} else {
|
|
|
|
|
Log.error("TRId is null");
|
|
|
|
|
UtilsGXT3.alert("Error", "No tabular resource present");
|
|
|
|
|
UtilsGXT3
|
|
|
|
|
.alert(msgsCommon.error(), msgs.noTabularResourcePresent());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -2385,7 +2417,8 @@ public class TabularDataController {
|
|
|
|
|
eventBus.fireEvent(e);
|
|
|
|
|
} else {
|
|
|
|
|
Log.error("TRId is null");
|
|
|
|
|
UtilsGXT3.alert("Error", "No tabular resource present");
|
|
|
|
|
UtilsGXT3
|
|
|
|
|
.alert(msgsCommon.error(), msgs.noTabularResourcePresent());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -2404,7 +2437,8 @@ public class TabularDataController {
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
Log.error("TRId is null");
|
|
|
|
|
UtilsGXT3.alert("Error", "No tabular resource present");
|
|
|
|
|
UtilsGXT3
|
|
|
|
|
.alert(msgsCommon.error(), msgs.noTabularResourcePresent());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -2423,7 +2457,8 @@ public class TabularDataController {
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
Log.error("TRId is null");
|
|
|
|
|
UtilsGXT3.alert("Error", "No tabular resource present");
|
|
|
|
|
UtilsGXT3
|
|
|
|
|
.alert(msgsCommon.error(), msgs.noTabularResourcePresent());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -2437,7 +2472,8 @@ public class TabularDataController {
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
Log.error("TRId is null");
|
|
|
|
|
UtilsGXT3.alert("Error", "No tabular resource present");
|
|
|
|
|
UtilsGXT3
|
|
|
|
|
.alert(msgsCommon.error(), msgs.noTabularResourcePresent());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -2456,7 +2492,8 @@ public class TabularDataController {
|
|
|
|
|
eventBus.fireEvent(e);
|
|
|
|
|
} else {
|
|
|
|
|
Log.error("TRId is null");
|
|
|
|
|
UtilsGXT3.alert("Error", "No tabular resource present");
|
|
|
|
|
UtilsGXT3
|
|
|
|
|
.alert(msgsCommon.error(), msgs.noTabularResourcePresent());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -2499,14 +2536,14 @@ public class TabularDataController {
|
|
|
|
|
} else {
|
|
|
|
|
if (caught instanceof TDGWTIsLockedException) {
|
|
|
|
|
Log.error(caught.getLocalizedMessage());
|
|
|
|
|
UtilsGXT3.alert("Error Locked",
|
|
|
|
|
UtilsGXT3.alert(msgsCommon.errorLocked(),
|
|
|
|
|
caught.getLocalizedMessage());
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
Log.error("Error on set TabResource: "
|
|
|
|
|
+ caught.getLocalizedMessage());
|
|
|
|
|
UtilsGXT3.alert(
|
|
|
|
|
"Error",
|
|
|
|
|
msgsCommon.error(),
|
|
|
|
|
"Error on set TabResource: "
|
|
|
|
|
+ caught.getLocalizedMessage());
|
|
|
|
|
}
|
|
|
|
@ -2536,16 +2573,15 @@ public class TabularDataController {
|
|
|
|
|
} else {
|
|
|
|
|
if (caught instanceof TDGWTIsLockedException) {
|
|
|
|
|
Log.error(caught.getLocalizedMessage());
|
|
|
|
|
UtilsGXT3.alert("Error Locked",
|
|
|
|
|
UtilsGXT3.alert(msgsCommon.errorLocked(),
|
|
|
|
|
caught.getLocalizedMessage());
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
Log.error("Error on set TabResource: "
|
|
|
|
|
+ caught.getLocalizedMessage());
|
|
|
|
|
UtilsGXT3.alert(
|
|
|
|
|
"Error",
|
|
|
|
|
"Error on set TabResource: "
|
|
|
|
|
+ caught.getLocalizedMessage());
|
|
|
|
|
UtilsGXT3.alert(msgsCommon.error(), msgs
|
|
|
|
|
.errorOnSetTabularResource(caught
|
|
|
|
|
.getLocalizedMessage()));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@ -2579,7 +2615,7 @@ public class TabularDataController {
|
|
|
|
|
*/
|
|
|
|
|
private void onRowsDelete(ArrayList<String> rows) {
|
|
|
|
|
if (rows == null || rows.size() == 0) {
|
|
|
|
|
UtilsGXT3.alert("No rows selected", "No rows selected");
|
|
|
|
|
UtilsGXT3.alert(msgsCommon.error(), msgs.noRowSelected());
|
|
|
|
|
} else {
|
|
|
|
|
DeleteRows deleteRows = new DeleteRows(trId, rows, eventBus);
|
|
|
|
|
deleteRows.delete();
|
|
|
|
@ -2593,7 +2629,7 @@ public class TabularDataController {
|
|
|
|
|
*/
|
|
|
|
|
private void onReplace(CellData cellData) {
|
|
|
|
|
if (cellData == null) {
|
|
|
|
|
UtilsGXT3.alert("No cell selected", "No cell selected");
|
|
|
|
|
UtilsGXT3.alert(msgsCommon.error(),msgs.noCellSelected());
|
|
|
|
|
} else {
|
|
|
|
|
ReplaceAllDialog replaceDialog = new ReplaceAllDialog(cellData,
|
|
|
|
|
trId, eventBus);
|
|
|
|
@ -2608,7 +2644,7 @@ public class TabularDataController {
|
|
|
|
|
*/
|
|
|
|
|
private void onRowEdit(ArrayList<RowRaw> rowsRaw) {
|
|
|
|
|
if (rowsRaw == null || rowsRaw.isEmpty()) {
|
|
|
|
|
UtilsGXT3.alert("No rows selected", "No rows selected");
|
|
|
|
|
UtilsGXT3.alert(msgsCommon.error(), msgs.noRowSelected());
|
|
|
|
|
} else {
|
|
|
|
|
EditRowDialog editRowDialog = new EditRowDialog(trId, rowsRaw,
|
|
|
|
|
eventBus);
|
|
|
|
|