Esempio n. 1
0
 /**
  * Gets the default view in user setting If the saved view is not in view types any more (for
  * example YearView is removed in PLF 4), this method returns DayView as default view and save
  * this view to the setting
  *
  * @return the view
  */
 public static String getViewInSetting() {
   CalendarSetting calendarSetting = getCurrentUserCalendarSetting();
   try {
     return UICalendarViewContainer.TYPES[Integer.parseInt(calendarSetting.getViewType())];
   } catch (ArrayIndexOutOfBoundsException e) {
     resetViewInSetting(calendarSetting);
     return UICalendarViewContainer.TYPES[0];
   } catch (NumberFormatException nfe) {
     resetViewInSetting(calendarSetting);
     return UICalendarViewContainer.TYPES[0];
   }
 }