Minor Update
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-unionwizard-widget@98820 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
ade55f98eb
commit
83a4cf7fe7
|
@ -104,7 +104,8 @@ public class ColumnMappingPanel extends ContentPanel {
|
||||||
columnLabel.setWidth(COLUMNLABELWIDTH);
|
columnLabel.setWidth(COLUMNLABELWIDTH);
|
||||||
columnLabel.setLabelSeparator("");*/
|
columnLabel.setLabelSeparator("");*/
|
||||||
|
|
||||||
FieldLabel sourceColumnLabel = new FieldLabel(null, "Column");
|
String currentTRLabel=parent.unionSession.getCurrentTabularResource().getName();
|
||||||
|
FieldLabel sourceColumnLabel = new FieldLabel(null, currentTRLabel);
|
||||||
sourceColumnLabel.getElement().applyStyles("font-weight:bold");
|
sourceColumnLabel.getElement().applyStyles("font-weight:bold");
|
||||||
sourceColumnLabel.setWidth(COMBOWIDTH);
|
sourceColumnLabel.setWidth(COMBOWIDTH);
|
||||||
sourceColumnLabel.setLabelSeparator("");
|
sourceColumnLabel.setLabelSeparator("");
|
||||||
|
|
|
@ -1,23 +1,31 @@
|
||||||
package org.gcube.portlets.user.td.unionwizardwidget.client;
|
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.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.widgetcommonevent.shared.TRId;
|
||||||
import org.gcube.portlets.user.td.wizardwidget.client.WizardWindow;
|
import org.gcube.portlets.user.td.wizardwidget.client.WizardWindow;
|
||||||
|
|
||||||
import com.allen_sauer.gwt.log.client.Log;
|
import com.allen_sauer.gwt.log.client.Log;
|
||||||
|
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 Panichi"
|
* @author "Giancarlo Panichi" email: <a
|
||||||
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class UnionWizardTD extends WizardWindow {
|
public class UnionWizardTD extends WizardWindow {
|
||||||
protected static final int WITHWIZARD=720;
|
protected static final int WITHWIZARD = 720;
|
||||||
protected static final int HEIGHTWIZARD=520;
|
protected static final int HEIGHTWIZARD = 520;
|
||||||
|
|
||||||
protected UnionSession unionSession;
|
protected UnionSession unionSession;
|
||||||
|
protected TRId trId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -26,21 +34,48 @@ public class UnionWizardTD extends WizardWindow {
|
||||||
* @param eventBus
|
* @param eventBus
|
||||||
*/
|
*/
|
||||||
public UnionWizardTD(TRId trId, String title, EventBus eventBus) {
|
public UnionWizardTD(TRId trId, String title, EventBus eventBus) {
|
||||||
super(title,eventBus);
|
super(title, eventBus);
|
||||||
Log.debug("UnionWizardTD: "+trId);
|
Log.debug("UnionWizardTD: " + trId);
|
||||||
setWidth(WITHWIZARD);
|
setWidth(WITHWIZARD);
|
||||||
setHeight(HEIGHTWIZARD);
|
setHeight(HEIGHTWIZARD);
|
||||||
|
|
||||||
unionSession= new UnionSession();
|
this.trId = trId;
|
||||||
|
unionSession = new UnionSession();
|
||||||
unionSession.setTrId(trId);
|
unionSession.setTrId(trId);
|
||||||
|
|
||||||
TabResourcesSelectionCard tabResourcesSelection= new TabResourcesSelectionCard(unionSession);
|
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);
|
addCard(tabResourcesSelection);
|
||||||
tabResourcesSelection.setup();
|
tabResourcesSelection.setup();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue