Fixed tab order problem

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/admin/accounting-manager@135203 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2016-12-02 09:58:36 +00:00
parent 2565b445cf
commit d8d07438e5
1 changed files with 14 additions and 16 deletions

View File

@ -66,11 +66,7 @@ public class AccountingManagerController {
public AccountingManagerController() { public AccountingManagerController() {
eventBus = new SimpleEventBus(); eventBus = new SimpleEventBus();
accountingType = AccountingType.STORAGE;
accountingState = new AccountingClientState(); accountingState = new AccountingClientState();
AccountingClientStateData accountingStateData = new AccountingClientStateData(
accountingType, null, null, null);
accountingState.setState(accountingType, accountingStateData);
init(); init();
} }
@ -85,7 +81,7 @@ public class AccountingManagerController {
*/ */
private void sessionExpiredShow() { private void sessionExpiredShow() {
//CheckSession.showLogoutDialog(); // CheckSession.showLogoutDialog();
} }
/** /**
@ -155,10 +151,11 @@ public class AccountingManagerController {
private void doEnableTabs(EnableTabs enableTabs) { private void doEnableTabs(EnableTabs enableTabs) {
if (enableTabs == null || enableTabs.getTabs() == null if (enableTabs == null || enableTabs.getTabs() == null
|| enableTabs.getTabs().isEmpty()) { || enableTabs.getTabs().isEmpty()) {
UtilsGXT3.alert("Attention", UtilsGXT3
"You don't have permissions to see Accounting Information in this scope!"); .alert("Attention",
"You don't have permissions to see Accounting Information in this scope!");
} else { } else {
this.enableTabs=enableTabs; this.enableTabs = enableTabs;
EnableTabsEvent event = new EnableTabsEvent(enableTabs); EnableTabsEvent event = new EnableTabsEvent(enableTabs);
eventBus.fireEvent(event); eventBus.fireEvent(event);
} }
@ -290,7 +287,11 @@ public class AccountingManagerController {
} }
public void showDefault() { public void showDefault() {
createDefaultChart(enableTabs.getTabs().get(0).getAccountingType()); if (enableTabs != null && enableTabs.getTabs() != null
&& enableTabs.getTabs().size() > 0
&& enableTabs.getTabs().get(0) != null) {
createDefaultChart(enableTabs.getTabs().get(0).getAccountingType());
}
} }
private void createDefaultChart(AccountingType accountingType) { private void createDefaultChart(AccountingType accountingType) {
@ -353,11 +354,10 @@ public class AccountingManagerController {
} }
private void retrieveContext() { private void retrieveContext() {
AccountingManagerServiceAsync.INSTANCE.getContext( AccountingManagerServiceAsync.INSTANCE
new AsyncCallback<Context>() { .getContext(new AsyncCallback<Context>() {
@Override @Override
public void onFailure(Throwable caught) { public void onFailure(Throwable caught) {
@ -388,8 +388,7 @@ public class AccountingManagerController {
}); });
} }
private void callDefaultSeriesRequest() { private void callDefaultSeriesRequest() {
AccountingManagerServiceAsync.INSTANCE.getSeries(accountingType, AccountingManagerServiceAsync.INSTANCE.getSeries(accountingType,
@ -568,8 +567,7 @@ public class AccountingManagerController {
+ Constants.EXPORT_SERVLET_TYPE_PARAMETER + "=" + Constants.EXPORT_SERVLET_TYPE_PARAMETER + "="
+ event.getExportType().name() + "&" + event.getExportType().name() + "&"
+ Constants.EXPORT_SERVLET_ACCOUNTING_TYPE_PARAMETER + "=" + Constants.EXPORT_SERVLET_ACCOUNTING_TYPE_PARAMETER + "="
+ event.getAccountingType().name() + event.getAccountingType().name() + "&"
+ "&"
+ Constants.CURR_GROUP_ID + "=" + Constants.CURR_GROUP_ID + "="
+ GCubeClientContext.getCurrentContextId()); + GCubeClientContext.getCurrentContextId());