Minor Update
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-table-widget@94970 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
79d978ae4b
commit
bfc947448f
|
@ -71,7 +71,6 @@ public class HistoryPanel extends FramedPanel {
|
||||||
super();
|
super();
|
||||||
this.eventBus = eventBus;
|
this.eventBus = eventBus;
|
||||||
forceLayoutOnResize = true;
|
forceLayoutOnResize = true;
|
||||||
|
|
||||||
retrieveCurrentTR();
|
retrieveCurrentTR();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -55,16 +55,31 @@ public class ValidationsTablePanel extends FramedPanel {
|
||||||
protected ListStore<Validations> storeValidations;
|
protected ListStore<Validations> storeValidations;
|
||||||
protected ListLoader<ListLoadConfig, ListLoadResult<Validations>> loader;
|
protected ListLoader<ListLoadConfig, ListLoadResult<Validations>> loader;
|
||||||
protected Grid<Validations> grid;
|
protected Grid<Validations> grid;
|
||||||
|
private boolean drawed;
|
||||||
|
|
||||||
|
public ValidationsTablePanel(EventBus eventBus) {
|
||||||
|
super();
|
||||||
|
this.eventBus = eventBus;
|
||||||
|
forceLayoutOnResize = true;
|
||||||
|
retrieveCurrentTR();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public ValidationsTablePanel(TRId trId, EventBus eventBus) {
|
public ValidationsTablePanel(TRId trId, EventBus eventBus) {
|
||||||
super();
|
super();
|
||||||
this.trId = trId;
|
this.trId = trId;
|
||||||
this.eventBus = eventBus;
|
this.eventBus = eventBus;
|
||||||
forceLayoutOnResize = true;
|
forceLayoutOnResize = true;
|
||||||
|
draw();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void draw() {
|
||||||
|
drawed = true;
|
||||||
init();
|
init();
|
||||||
create();
|
create();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void init() {
|
protected void init() {
|
||||||
setWidth(WIDTH);
|
setWidth(WIDTH);
|
||||||
setHeight(HEIGHT);
|
setHeight(HEIGHT);
|
||||||
|
@ -205,9 +220,41 @@ public class ValidationsTablePanel extends FramedPanel {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void update(TRId trId) {
|
|
||||||
this.trId = trId;
|
|
||||||
|
public void update() {
|
||||||
|
retrieveCurrentTR();
|
||||||
loader.load();
|
loader.load();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void update(TRId trId) {
|
||||||
|
this.trId=trId;
|
||||||
|
loader.load();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
protected void retrieveCurrentTR() {
|
||||||
|
TDGWTServiceAsync.INSTANCE.getCurrentTRId(new AsyncCallback<TRId>() {
|
||||||
|
|
||||||
|
public void onFailure(Throwable caught) {
|
||||||
|
Log.error("Error retrieving current TRId: "
|
||||||
|
+ caught.getLocalizedMessage());
|
||||||
|
UtilsGXT3.alert("Error",
|
||||||
|
"Error retrieving current tabular resource id");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onSuccess(TRId result) {
|
||||||
|
Log.debug("retrieved " + result);
|
||||||
|
trId = result;
|
||||||
|
if (!drawed) {
|
||||||
|
draw();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue