private void updateTableDetails( final ProjectDetailsDto projectDetailsDto, final TableEntry tableEntry, final String value) { String key = tableEntry.getElementName(); System.out.println(key + "value : " + value); if (PROJECT_NAME.equals(key)) { projectDetailsDto.setProjectName(value); changeRootNodeName(value); } else if (PROJECT_SHORT_NAME.equals(key)) { projectDetailsDto.setProjectShortName(value); } else if (PROJECT_DETAILS.equals(key)) { projectDetailsDto.setProjectDescription(value); } CommonUiActions.projectChanged(); }
public void populateDataTableModel(final ProjectDetailsDto projectDetailsDto) { removeEntries(); TableEntry projectName = new TableEntry(PROJECT_NAME, projectDetailsDto.getProjectName()); TableEntry projectShortName = new TableEntry(PROJECT_SHORT_NAME, projectDetailsDto.getProjectShortName()); TableEntry projectDescription = new TableEntry(PROJECT_DETAILS, projectDetailsDto.getProjectDescription()); dataTable.getItems().add(projectName); dataTable.getItems().add(projectShortName); dataTable.getItems().add(projectDescription); elementValue.setCellFactory(TextFieldTableCell.forTableColumn()); elementValue.setOnEditCommit( (final TableColumn.CellEditEvent<TableEntry, String> t) -> { updateTableDetails( projectDetailsDto, t.getTableView().getItems().get(t.getTablePosition().getRow()), t.getNewValue()); }); }