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();
|
||||
this.eventBus = eventBus;
|
||||
forceLayoutOnResize = true;
|
||||
|
||||
retrieveCurrentTR();
|
||||
}
|
||||
|
||||
|
|
|
@ -55,16 +55,31 @@ public class ValidationsTablePanel extends FramedPanel {
|
|||
protected ListStore<Validations> storeValidations;
|
||||
protected ListLoader<ListLoadConfig, ListLoadResult<Validations>> loader;
|
||||
protected Grid<Validations> grid;
|
||||
|
||||
private boolean drawed;
|
||||
|
||||
public ValidationsTablePanel(EventBus eventBus) {
|
||||
super();
|
||||
this.eventBus = eventBus;
|
||||
forceLayoutOnResize = true;
|
||||
retrieveCurrentTR();
|
||||
|
||||
}
|
||||
|
||||
|
||||
public ValidationsTablePanel(TRId trId, EventBus eventBus) {
|
||||
super();
|
||||
this.trId = trId;
|
||||
this.eventBus = eventBus;
|
||||
forceLayoutOnResize = true;
|
||||
draw();
|
||||
}
|
||||
|
||||
protected void draw() {
|
||||
drawed = true;
|
||||
init();
|
||||
create();
|
||||
}
|
||||
|
||||
|
||||
protected void init() {
|
||||
setWidth(WIDTH);
|
||||
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();
|
||||
}
|
||||
|
||||
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