2
TableQuery tq1 = new TableQuery("employee", connectionPool);
tq1.setVersionColumn("VERSION");
employeeContainer = new SQLContainer(tq1);
employeeTable = new Table();
employeeTable.setContainerDataSource(employeeContainer);
employeeTable.setVisibleColumns(new Object[]{
"firstname", "lastname", "address"});
employeeTable.setSelectable(true);
employeeTable.setImmediate(true);
해당 예제에서 Vaadin의 SQLContainer-Addon을 사용하고 있습니다. 다음 코드를 사용하여 모든 셀을 편집 가능으로 설정할 수 있습니다.데이터 원본이 SQLContainer 일 때 단 하나의 열만 편집하는 방법
employeeTable.setEditable(true);
하지만 하나의 열만 편집 가능하게하고 싶습니다. 주소는 편집 할 수있는 유일한 열이어야합니다.