ref 12119:AccountingDashboard - Create a new Accounting Dashboard

https://support.d4science.org/issues/12119

Updated the date range in the default case

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/accounting-dashboard@169862 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2018-07-19 17:17:57 +00:00
parent 842d36cc93
commit 26968a4db2
1 changed files with 9 additions and 2 deletions

View File

@ -96,7 +96,14 @@ public class FilterAreaView extends ViewWithUiHandlers<FilterAreaPresenter>
yearStart.addItem(String.valueOf(i));
yearEnd.addItem(String.valueOf(i));
}
yearStart.setSelectedValue(String.valueOf(year));
String yearStartDefaultValue;
if(year==2015){
yearStartDefaultValue="2015";
} else {
yearStartDefaultValue=String.valueOf(year-1);
}
yearStart.setSelectedValue(yearStartDefaultValue);
yearEnd.setSelectedValue(String.valueOf(year));
yearStart.addChangeHandler(new ChangeHandler() {
@ -133,7 +140,7 @@ public class FilterAreaView extends ViewWithUiHandlers<FilterAreaPresenter>
String currentMonth = DateTimeFormat.getFormat(PredefinedFormat.MONTH).format(now);
monthStart.setSelectedValue(months[0]);
monthStart.setSelectedValue(currentMonth);
monthEnd.setSelectedValue(currentMonth);
monthStart.addChangeHandler(new ChangeHandler() {