コード例 #1
0
  private void showStudentAccountWindow(StudentDetailsModel studentDetailsModel) {
    this.studentDetailsModel = studentDetailsModel;
    setHeading("Данные студента: " + studentDetailsModel.getFullName());
    XTemplate template = XTemplate.create(getHeaderTemplate());

    prepareStudentDetail(studentDetailsModel);
    headerHtml.setHtml(template.applyTemplate(Util.getJsObject(studentDetailsModel, 1)));

    studentDataForm.addStyleName("studentDataForm");
    studentDataForm.setStudentDetails(studentDetailsModel);

    show();
  }
コード例 #2
0
  private TabItem createFaceTabItem() {
    Viewport viewport = new Viewport();
    viewport.setLayout(new VBoxLayout(VBoxLayout.VBoxLayoutAlign.STRETCH));

    headerHtml.setStyleName("studentAccount");
    viewport.add(headerHtml);

    VBoxLayoutData flex = new VBoxLayoutData(10, 0, 0, 0);
    flex.setFlex(1);
    studentDataForm.setScrollMode(Style.Scroll.AUTOY);
    viewport.add(studentDataForm, flex);

    TabItem faceTabItem = new TabItem("Учетная карточка студента");
    faceTabItem.setLayout(new FitLayout());
    faceTabItem.add(viewport);

    return faceTabItem;
  }
コード例 #3
0
 private void saveStudentDetailsModel() {
   studentDetailsModel = studentDataForm.getStudentDetails();
   StudentService.Util.getInstance()
       .saveStudentDetails(studentDetailsModel, studentDetailsSaverAsyncCallback);
 }