Example #1
0
  private void refreshBindindSource() {
    try {
      bsCalendar.removeAllItems();
      bsCalendar.addAll(calendarService.getAll());

      bsCalendar.addNestedContainerProperty("calendarType.description");

    } catch (IllegalArgumentException e) {
      e.printStackTrace();
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
Example #2
0
  @Override
  public void downButtonClick(ClickNavigationEvent event) {
    Calendar calendarSelected = null;

    if (bsCalendar.getItemIds().size() > 0) {
      // get selected Organization
      calendarSelected = (Calendar) bsCalendar.getItemId();

      // inject the locations data from organization in the detail Location View
      CalendarCardView calendarDetailViewView = (CalendarCardView) viewContainer.getNext();
      calendarDetailViewView.setCalendar(calendarSelected);

      // roll to the detail Location View
      viewContainer.getSliderView().rollNext();
    }
  }
Example #3
0
  private void refreshDataGridView(Calendar calendarSaved) {
    if (bsCalendar.containsId(calendarSaved)) {
      Calendar previousCalendar = bsCalendar.prevItemId(calendarSaved);

      bsCalendar.removeItem(calendarSaved);
      bsCalendar.addItemAfter(previousCalendar, calendarSaved);
      bsCalendar.setItemId(calendarSaved);
    } else bsCalendar.addItem(calendarSaved);
  }