Minor Update
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-unionwizard-widget@98824 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
83a4cf7fe7
commit
17e289dc61
|
@ -71,6 +71,7 @@ public class ColumnMappingPanel extends ContentPanel {
|
|||
* @param res
|
||||
*/
|
||||
public ColumnMappingPanel(ColumnMappingCard parent, ResourceBundle res) {
|
||||
super();
|
||||
this.res = res;
|
||||
this.parent = parent;
|
||||
thisPanel = this;
|
||||
|
@ -83,6 +84,8 @@ public class ColumnMappingPanel extends ContentPanel {
|
|||
|
||||
protected void init() {
|
||||
setHeaderVisible(false);
|
||||
//setBodyBorder(false);
|
||||
setBodyStyle("backgroundColor:#DFE8F6;");
|
||||
//new Resizable(this, Dir.E, Dir.SE, Dir.S);
|
||||
//Important: fixed rendering of widgets
|
||||
forceLayoutOnResize = true;
|
||||
|
@ -130,9 +133,11 @@ public class ColumnMappingPanel extends ContentPanel {
|
|||
vPanel.setScrollMode(ScrollMode.AUTO);
|
||||
vPanel.setAdjustForScroll(true);
|
||||
|
||||
|
||||
vPanel.add(horiz, new VerticalLayoutData(1, -1, new Margins(1,1,1,10)));
|
||||
vPanel.add(container, new VerticalLayoutData(1, -1, new Margins(1,1,1,10)));
|
||||
|
||||
|
||||
add(vPanel);
|
||||
forceLayout();
|
||||
|
||||
|
|
|
@ -1,9 +1,13 @@
|
|||
package org.gcube.portlets.user.td.unionwizardwidget.client;
|
||||
|
||||
import org.gcube.portlets.user.td.gwtservice.client.rpc.TDGWTServiceAsync;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTSessionExpiredException;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.TabResource;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.TableData;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.union.UnionSession;
|
||||
import org.gcube.portlets.user.td.unionwizardwidget.client.utils.UtilsGXT3;
|
||||
import org.gcube.portlets.user.td.widgetcommonevent.client.event.SessionExpiredEvent;
|
||||
import org.gcube.portlets.user.td.widgetcommonevent.client.type.SessionExpiredType;
|
||||
import org.gcube.portlets.user.td.wizardwidget.client.WizardCard;
|
||||
|
||||
import com.allen_sauer.gwt.log.client.Log;
|
||||
|
@ -177,9 +181,37 @@ public class TabResourcesSelectionCard extends WizardCard {
|
|||
tabResource.setTrId(table.getTrId());
|
||||
unionSession.setUnionTabularResource(tabResource);
|
||||
Log.debug("UnionSession: " + unionSession);
|
||||
retriveCurrentTabularResourceInfo();
|
||||
}
|
||||
|
||||
|
||||
|
||||
protected void retriveCurrentTabularResourceInfo(){
|
||||
TDGWTServiceAsync.INSTANCE
|
||||
.getTabResourceInformation(unionSession.getTrId(), new AsyncCallback<TabResource>() {
|
||||
|
||||
public void onSuccess(TabResource result) {
|
||||
Log.info("Retrived TR: " + result.getTrId());
|
||||
unionSession.setCurrentTabularResource(result);
|
||||
goNext();
|
||||
}
|
||||
|
||||
public void onFailure(Throwable caught) {
|
||||
if (caught instanceof TDGWTSessionExpiredException) {
|
||||
getEventBus().fireEvent(new SessionExpiredEvent(
|
||||
SessionExpiredType.EXPIREDONSERVER));
|
||||
} else {
|
||||
UtilsGXT3.alert("Error",
|
||||
"Error retrienving information on current tabular resource: ");
|
||||
getWizardWindow().setEnableNextButton(false);
|
||||
getWizardWindow().setEnableBackButton(true);
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
protected void goNext() {
|
||||
try {
|
||||
Log.info("NextCard ColumnMappingCard");
|
||||
|
|
|
@ -1,17 +1,10 @@
|
|||
package org.gcube.portlets.user.td.unionwizardwidget.client;
|
||||
|
||||
import org.gcube.portlets.user.td.gwtservice.client.rpc.TDGWTServiceAsync;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.exception.TDGWTSessionExpiredException;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.TabResource;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.union.UnionSession;
|
||||
import org.gcube.portlets.user.td.unionwizardwidget.client.utils.UtilsGXT3;
|
||||
import org.gcube.portlets.user.td.widgetcommonevent.client.event.SessionExpiredEvent;
|
||||
import org.gcube.portlets.user.td.widgetcommonevent.client.type.SessionExpiredType;
|
||||
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
|
||||
import org.gcube.portlets.user.td.wizardwidget.client.WizardWindow;
|
||||
|
||||
import com.allen_sauer.gwt.log.client.Log;
|
||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||
import com.google.web.bindery.event.shared.EventBus;
|
||||
|
||||
/**
|
||||
|
@ -43,39 +36,11 @@ public class UnionWizardTD extends WizardWindow {
|
|||
unionSession = new UnionSession();
|
||||
unionSession.setTrId(trId);
|
||||
|
||||
retriveTabularResourceMinInfo();
|
||||
|
||||
}
|
||||
|
||||
protected void retriveTabularResourceMinInfo(){
|
||||
TDGWTServiceAsync.INSTANCE
|
||||
.getTabResourceInformation(trId, new AsyncCallback<TabResource>() {
|
||||
|
||||
public void onSuccess(TabResource result) {
|
||||
Log.info("Retrived TR: " + result.getTrId());
|
||||
unionSession.setCurrentTabularResource(result);
|
||||
}
|
||||
|
||||
public void onFailure(Throwable caught) {
|
||||
if (caught instanceof TDGWTSessionExpiredException) {
|
||||
eventBus.fireEvent(new SessionExpiredEvent(
|
||||
SessionExpiredType.EXPIREDONSERVER));
|
||||
} else {
|
||||
UtilsGXT3.alert("Error",
|
||||
"Error retrienving information on current tabular resource: ");
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
protected void callCard(){
|
||||
TabResourcesSelectionCard tabResourcesSelection = new TabResourcesSelectionCard(
|
||||
unionSession);
|
||||
addCard(tabResourcesSelection);
|
||||
tabResourcesSelection.setup();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
Loading…
Reference in New Issue