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(); }
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; }
private void saveStudentDetailsModel() { studentDetailsModel = studentDataForm.getStudentDetails(); StudentService.Util.getInstance() .saveStudentDetails(studentDetailsModel, studentDetailsSaverAsyncCallback); }