Fixed the behavior of the user interface
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-information-widget@84413 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
f7ce7c238c
commit
0a468dd68a
|
@ -2,11 +2,10 @@ package org.gcube.portlets.user.td.informationwidget.client;
|
|||
|
||||
import java.util.HashMap;
|
||||
|
||||
|
||||
import org.gcube.portlets.user.td.gwtservice.client.rpc.TDGWTServiceAsync;
|
||||
import org.gcube.portlets.user.td.gwtservice.shared.TabResource;
|
||||
|
||||
|
||||
|
||||
import com.allen_sauer.gwt.log.client.Log;
|
||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||
import com.google.web.bindery.event.shared.EventBus;
|
||||
|
@ -36,34 +35,7 @@ public class TabularResourceProperties extends ContentPanel {
|
|||
setId(name);
|
||||
this.eventBus = eventBus;
|
||||
|
||||
TDGWTServiceAsync.INSTANCE
|
||||
.getTabResourceInformation(new AsyncCallback<TabResource>() {
|
||||
|
||||
@Override
|
||||
public void onSuccess(TabResource result) {
|
||||
addTabularResource(result);
|
||||
Log.info("Retrived TR:"+ result.getId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
AlertMessageBox d = new AlertMessageBox("Error",
|
||||
"Error retrienving properties: "
|
||||
+ caught.getLocalizedMessage());
|
||||
d.addHideHandler(new HideHandler() {
|
||||
|
||||
@Override
|
||||
public void onHide(HideEvent event) {
|
||||
//
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
d.show();
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
update();
|
||||
|
||||
FramedPanel panel = new FramedPanel();
|
||||
panel.setHeaderVisible(false);
|
||||
|
@ -73,6 +45,8 @@ public class TabularResourceProperties extends ContentPanel {
|
|||
panel.add(vl);
|
||||
this.add(panel);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void addTabularResource(TabResource tabResource) {
|
||||
|
@ -136,5 +110,36 @@ public class TabularResourceProperties extends ContentPanel {
|
|||
vl.add(fieldSet);
|
||||
|
||||
}
|
||||
|
||||
public void update(){
|
||||
TDGWTServiceAsync.INSTANCE
|
||||
.getTabResourceInformation(new AsyncCallback<TabResource>() {
|
||||
|
||||
@Override
|
||||
public void onSuccess(TabResource result) {
|
||||
addTabularResource(result);
|
||||
Log.info("Retrived TR:" + result.getId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
AlertMessageBox d = new AlertMessageBox("Error",
|
||||
"Error retrienving properties: "
|
||||
+ caught.getLocalizedMessage());
|
||||
d.addHideHandler(new HideHandler() {
|
||||
|
||||
@Override
|
||||
public void onHide(HideEvent event) {
|
||||
//
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
d.show();
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue