Fixed refresh issue
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/data-miner-manager@147100 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
04867bfba0
commit
45e3e243a2
|
@ -16,6 +16,7 @@ import com.google.gwt.core.client.EntryPoint;
|
|||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.core.client.Scheduler;
|
||||
import com.google.gwt.core.client.Scheduler.ScheduledCommand;
|
||||
import com.google.gwt.user.client.Command;
|
||||
import com.google.gwt.user.client.ui.RootPanel;
|
||||
import com.sencha.gxt.core.client.util.Margins;
|
||||
import com.sencha.gxt.widget.core.client.container.BorderLayoutContainer;
|
||||
|
@ -57,36 +58,28 @@ public class DataMinerManager implements EntryPoint {
|
|||
// onModuleLoad2
|
||||
Scheduler.get().scheduleDeferred(new ScheduledCommand() {
|
||||
public void execute() {
|
||||
//loadScope();
|
||||
// loadScope();
|
||||
loadMainPanel();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/*private void loadScope() {
|
||||
ClientScopeHelper.getService().setScope(Location.getHref(),
|
||||
new AsyncCallback<Boolean>() {
|
||||
@Override
|
||||
public void onSuccess(Boolean result) {
|
||||
if (result) {
|
||||
loadMainPanel();
|
||||
} else {
|
||||
UtilsGXT3
|
||||
.info("Attention",
|
||||
"ClientScopeHelper has returned a false value!");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
UtilsGXT3.alert("Error", "Error setting scope: "
|
||||
+ caught.getLocalizedMessage());
|
||||
caught.printStackTrace();
|
||||
}
|
||||
});
|
||||
|
||||
}*/
|
||||
/*
|
||||
* private void loadScope() {
|
||||
* ClientScopeHelper.getService().setScope(Location.getHref(), new
|
||||
* AsyncCallback<Boolean>() {
|
||||
*
|
||||
* @Override public void onSuccess(Boolean result) { if (result) {
|
||||
* loadMainPanel(); } else { UtilsGXT3 .info("Attention",
|
||||
* "ClientScopeHelper has returned a false value!"); } }
|
||||
*
|
||||
* @Override public void onFailure(Throwable caught) {
|
||||
* UtilsGXT3.alert("Error", "Error setting scope: " +
|
||||
* caught.getLocalizedMessage()); caught.printStackTrace(); } });
|
||||
*
|
||||
* }
|
||||
*/
|
||||
|
||||
private void loadMainPanel() {
|
||||
dataMinerManagerController = new DataMinerManagerController();
|
||||
|
@ -98,7 +91,7 @@ public class DataMinerManager implements EntryPoint {
|
|||
bind();
|
||||
|
||||
// Layout
|
||||
BorderLayoutContainer mainPanelLayout = new BorderLayoutContainer();
|
||||
final BorderLayoutContainer mainPanelLayout = new BorderLayoutContainer();
|
||||
mainPanelLayout.setId("mainPanelLayout");
|
||||
mainPanelLayout.setBorders(false);
|
||||
mainPanelLayout.setResize(true);
|
||||
|
@ -120,21 +113,26 @@ public class DataMinerManager implements EntryPoint {
|
|||
mainPanelLayout.setNorthWidget(header, menuData);
|
||||
|
||||
//
|
||||
|
||||
|
||||
if (dataMinerManagerController.getOperatorId() != null
|
||||
&& !dataMinerManagerController.getOperatorId().isEmpty()){
|
||||
&& !dataMinerManagerController.getOperatorId().isEmpty()) {
|
||||
header.setMenu(MenuType.EXPERIMENT);
|
||||
centerPanel.add(experimentPanel);
|
||||
previousPanel = experimentPanel;
|
||||
|
||||
|
||||
} else {
|
||||
centerPanel.add(homePanel);
|
||||
previousPanel = homePanel;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
bindWindow(mainPanelLayout);
|
||||
mainPanelLayout.forceLayout();
|
||||
|
||||
Scheduler.get().scheduleDeferred(new Command() {
|
||||
public void execute() {
|
||||
mainPanelLayout.forceLayout();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue