Minor update
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-portlet@101666 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
1d0e3420e3
commit
ba6766333c
|
@ -94,26 +94,26 @@ import com.sencha.gxt.widget.core.client.event.HideEvent.HideHandler;
|
|||
public class TabularDataController {
|
||||
// implements HasCloseHandlers<Long>, HasOpenHandlers<Long> {
|
||||
|
||||
protected SimpleEventBus eventBus;
|
||||
private SimpleEventBus eventBus;
|
||||
// protected TabularDataX tabularData;
|
||||
private MainBoxPanel mainBoxPanel;
|
||||
protected UIStateType uiState = UIStateType.START;
|
||||
private UIStateType uiState = UIStateType.START;
|
||||
|
||||
private boolean taskManagerInit = false;
|
||||
protected TdTaskController tdTaskController;
|
||||
private TdTaskController tdTaskController;
|
||||
|
||||
protected ContentPanel toolBoxPanel;
|
||||
protected BorderLayoutData westData;
|
||||
private ContentPanel toolBoxPanel;
|
||||
private BorderLayoutData westData;
|
||||
|
||||
/**
|
||||
* Current user
|
||||
*/
|
||||
protected UserInfo userInfo;
|
||||
private UserInfo userInfo;
|
||||
|
||||
/**
|
||||
* Tabular Resource Id
|
||||
*/
|
||||
protected TRId trId;
|
||||
private TRId trId;
|
||||
|
||||
/**
|
||||
* Grid TableId
|
||||
|
@ -361,13 +361,13 @@ public class TabularDataController {
|
|||
case TABLECURATION:
|
||||
uiStateEvent = new UIStateEvent(UIStateType.TABLECURATION);
|
||||
uiStateEvent.setTrId(trId);
|
||||
Log.debug("ResumeUIState Fire: "+uiStateEvent);
|
||||
Log.debug("ResumeUIState Fire: " + uiStateEvent);
|
||||
eventBus.fireEvent(uiStateEvent);
|
||||
break;
|
||||
case TABLEUPDATE:
|
||||
uiStateEvent = new UIStateEvent(UIStateType.TABLEUPDATE);
|
||||
uiStateEvent.setTrId(trId);
|
||||
Log.debug("ResumeUIState Fire: "+uiStateEvent);
|
||||
Log.debug("ResumeUIState Fire: " + uiStateEvent);
|
||||
eventBus.fireEvent(uiStateEvent);
|
||||
break;
|
||||
case TR_CLOSE:
|
||||
|
@ -378,7 +378,7 @@ public class TabularDataController {
|
|||
case TR_OPEN:
|
||||
uiStateEvent = new UIStateEvent(UIStateType.TR_OPEN);
|
||||
uiStateEvent.setTrId(trId);
|
||||
Log.debug("ResumeUIState Fire: "+uiStateEvent);
|
||||
Log.debug("ResumeUIState Fire: " + uiStateEvent);
|
||||
eventBus.fireEvent(uiStateEvent);
|
||||
break;
|
||||
case TR_READONLY:
|
||||
|
@ -421,7 +421,7 @@ public class TabularDataController {
|
|||
uiState = UIStateType.TABLEUPDATE;
|
||||
UIStateEvent uiStateEvent = new UIStateEvent(UIStateType.TABLEUPDATE);
|
||||
uiStateEvent.setTrId(tabularResourceId);
|
||||
Log.debug("UpdateTable Fire: "+uiStateEvent);
|
||||
Log.debug("UpdateTable Fire: " + uiStateEvent);
|
||||
eventBus.fireEvent(uiStateEvent);
|
||||
}
|
||||
|
||||
|
@ -435,7 +435,7 @@ public class TabularDataController {
|
|||
uiState = UIStateType.TABLECURATION;
|
||||
UIStateEvent uiStateEvent = new UIStateEvent(UIStateType.TABLECURATION);
|
||||
uiStateEvent.setTrId(tabularResourceId);
|
||||
Log.debug("UpdateTableForCuration Fire: "+uiStateEvent);
|
||||
Log.debug("UpdateTableForCuration Fire: " + uiStateEvent);
|
||||
eventBus.fireEvent(uiStateEvent);
|
||||
}
|
||||
|
||||
|
@ -547,8 +547,9 @@ public class TabularDataController {
|
|||
}
|
||||
|
||||
protected void doOpenTRIdAfterServerUpdate() {
|
||||
if(trId!=null && trId.getId().compareTo(openTRIdAfterServerUpdate.getId())==0
|
||||
&& trId.getTableId().compareTo(trId.getTableId())==0){
|
||||
if (trId != null
|
||||
&& trId.getId().compareTo(openTRIdAfterServerUpdate.getId()) == 0
|
||||
&& trId.getTableId().compareTo(trId.getTableId()) == 0) {
|
||||
Log.debug("Open Table Break table just open");
|
||||
} else {
|
||||
Log.debug("Open Table new Table for TR");
|
||||
|
@ -586,7 +587,7 @@ public class TabularDataController {
|
|||
|
||||
@Override
|
||||
public void onSuccess(TRId result) {
|
||||
openTRIdAfterServerUpdate=result;
|
||||
openTRIdAfterServerUpdate = result;
|
||||
doOpenTRIdAfterServerUpdate();
|
||||
|
||||
}
|
||||
|
@ -806,8 +807,8 @@ public class TabularDataController {
|
|||
case TABLEAGGREAGETE:
|
||||
break;
|
||||
case TABLEREPLACEBYEXTERNALCOL:
|
||||
openReplaceByExternalColWizard();
|
||||
break;
|
||||
openReplaceByExternalColWizard(null);
|
||||
break;
|
||||
case ROWADD:
|
||||
doRowAdd();
|
||||
break;
|
||||
|
@ -1235,16 +1236,23 @@ public class TabularDataController {
|
|||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
protected void openReplaceByExternalColWizard() {
|
||||
|
||||
protected void openReplaceByExternalColWizard(final String colname) {
|
||||
GWT.runAsync(new RunAsyncCallback() {
|
||||
|
||||
public void onSuccess() {
|
||||
openWizard();
|
||||
ReplaceByExternalTD replaceByExternalColWizard = new ReplaceByExternalTD(trId, "Replace By External Columns",
|
||||
eventBus);
|
||||
|
||||
|
||||
ReplaceByExternalTD replaceByExternalColWizard;
|
||||
if(colname==null|| colname.isEmpty()){
|
||||
|
||||
replaceByExternalColWizard= new ReplaceByExternalTD(
|
||||
trId, "Replace By External Columns", eventBus);
|
||||
} else {
|
||||
replaceByExternalColWizard= new ReplaceByExternalTD(
|
||||
trId, colname,"Replace By External Columns", eventBus);
|
||||
}
|
||||
|
||||
replaceByExternalColWizard.addListener(new WizardListener() {
|
||||
public void failed(String title, String message,
|
||||
Throwable throwable) {
|
||||
|
@ -1277,8 +1285,6 @@ public class TabularDataController {
|
|||
|
||||
}
|
||||
|
||||
|
||||
|
||||
protected void openCreateChart() {
|
||||
GWT.runAsync(new RunAsyncCallback() {
|
||||
|
||||
|
@ -1317,8 +1323,7 @@ public class TabularDataController {
|
|||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
protected void openCreateMapWizard() {
|
||||
GWT.runAsync(new RunAsyncCallback() {
|
||||
|
||||
|
@ -1527,7 +1532,7 @@ public class TabularDataController {
|
|||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
protected void openTemplateApply() {
|
||||
GWT.runAsync(new RunAsyncCallback() {
|
||||
public void onSuccess() {
|
||||
|
@ -1550,7 +1555,6 @@ public class TabularDataController {
|
|||
|
||||
}
|
||||
|
||||
|
||||
protected void openShareWindow() {
|
||||
GWT.runAsync(new RunAsyncCallback() {
|
||||
public void onSuccess() {
|
||||
|
@ -1585,7 +1589,6 @@ public class TabularDataController {
|
|||
|
||||
}
|
||||
|
||||
|
||||
protected void openMultiColumnFilter() {
|
||||
Log.debug("Request Open Multi Column Filter Dialog");
|
||||
if (trId != null) {
|
||||
|
@ -1785,11 +1788,11 @@ public class TabularDataController {
|
|||
UtilsGXT3.alert("Error", "No tabular resource present");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected void openTimeAggregate() {
|
||||
openTimeAggregate(null);
|
||||
}
|
||||
|
||||
|
||||
protected void openTimeAggregate(String columnName) {
|
||||
Log.debug("Request Time Aggregate Tab");
|
||||
if (trId != null) {
|
||||
|
@ -1803,10 +1806,6 @@ public class TabularDataController {
|
|||
UtilsGXT3.alert("Error", "No tabular resource present");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
protected void openColumnLabel() {
|
||||
openColumnLabel(null);
|
||||
|
@ -2042,9 +2041,16 @@ public class TabularDataController {
|
|||
} else {
|
||||
if (opId.compareTo(GridHeaderOperationId.COLUMNREPLACEBYEXPRESSION
|
||||
.toString()) == 0) {
|
||||
// TODO
|
||||
|
||||
openReplaceColumnByExpression(columnName);
|
||||
} else {
|
||||
if (opId.compareTo(GridHeaderOperationId.COLUMNREPLACEBYEXTERNAL
|
||||
.toString()) == 0) {
|
||||
|
||||
openReplaceByExternalColWizard(columnName);
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -68,7 +68,7 @@
|
|||
<!-- Specify the app entry point class. -->
|
||||
<entry-point class='org.gcube.portlets.user.td.client.TabularDataPortlet' />
|
||||
|
||||
<!--
|
||||
<!--
|
||||
<set-property name="log_DivLogger" value="ENABLED" /> <set-property
|
||||
name="log_ConsoleLogger" value="ENABLED" /> <set-property name="log_FirebugLogger"
|
||||
value="ENABLED" /> <set-property name="log_GWTLogger" value="ENABLED" />
|
||||
|
|
Loading…
Reference in New Issue