우리는 웹 사이트 (Vaadin 테이블)에서 많은 테이블을 사용하지만, 고객은 방금 테이블 내부에서 편집 할 수 있다고 말했습니다. 자, 나는 테이블에서 가능하다는 것을 알고 있습니다. (이미 작동하도록했습니다.) 그리드의 편집 메카니즘과 비슷합니다. Vaadin Table을 Vaadin Grid로 변환하는 쉬운 방법이 있습니까? 그리드는 교체가 필요하지 않기 때문에 변환 작업이 필요하다는 것을 알고 있습니다. 사람들이 그것을 얼마나 열심히 찾았는지 궁금하고, 그러한 변환을하는 데 필요한 문서가 있다면 궁금합니다.Vaadin 테이블을 Vaadin 그리드로 변환
가 여기에 우리의 일반 테이블의 사용이다 :
public final class ReplenishmentOrderMgmtView extends VerticalLayout implements View {
private final Table table;
private static final String[] DEFAULT_COLLAPSIBLE = {
"contactFirstName",
"contactLastName",
"supplierName",
"carrier", "carrierService", "trackingNumber"
};
private static final Object[] VISIBLE_COLUMNS = {
"barcode",
"contactUserId",
"contactFirstName",
"contactLastName",
"PO",
"orderId",
"cellId",
"cellName",
"wmsItem",
"description",
"supplierId",
"supplierName",
"statusDesc",
"resizedBinQty",
"expectedOnDockDate",
"shipQuantity",
"receivedQty",
"lastReceiptDate",
"carrier",
"carrierService",
"trackingNumber",
"creationDate"
};
private static final String[] COLUMN_NAMES = {
"Barcode",
"Contact User",
"First Name",
"Last Name",
"PO Number",
"Replenishment Order Id",
"Cell Id",
"Cell Name",
"Part",
"Description",
"Supplier Id",
"Supplier Name",
"Status",
"Resized Bin Qty",
"Expected On Dock Date",
"Ship Quantity",
"Received Qty",
"Last Receipt Date",
"Carrier",
"Carrier Service",
"Tracking Number",
"Creation Date"
};
private Table buildTable() {
final Table table = new Table();
table.setSizeFull();
table.addStyleName(ValoTheme.TABLE_BORDERLESS);
table.addStyleName(ValoTheme.TABLE_NO_HORIZONTAL_LINES);
table.addStyleName(ValoTheme.TABLE_COMPACT);
table.setSelectable(true);
table.setColumnCollapsingAllowed(true);
table.setColumnReorderingAllowed(true);
updateList(table);
table.setSortContainerPropertyId("creationDate");
table.setSortAscending(true);
table.setColumnHeaders(COLUMN_NAMES);
// Allow dragging items to the reports menu
// table.setDragMode(TableDragMode.MULTIROW);
table.setMultiSelect(false);
table.addActionHandler(new ReplenishmentOrdersActionHandler());
table.addValueChangeListener(event -> this.selectItemFromTable());
table.setImmediate(true);
return table;
}
}
일부가 거기에 참여 바인딩이 - 내 데이터 소스 자바 콩입니다. 분명히, 나는 테이블 자체에 영향을 줄 코드 만 포함하고있다. 어떤 조언이나 의견이라도 대단히 감사하겠습니다.