我有這樣的代碼:文本菜單操作後的數據表未更新
<p:contextMenu for="customersTable">
<p:menuitem value="Delete" update="customersTable" icon="ui-icon-close" actionListener="#{customerbean.onDeleteCustomer}"/>
</p:contextMenu>
<p:dataTable id="customersTable" var="customer" widgetVar="customerTable" value="#{customerbean.customerList}" paginator="true" rows="20" paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}" rowsPerPageTemplate="10,20,50,100" emptyMessage="#{text['table.customer.filter.notfound']}" filteredValue="#{customerbean.filteredCustomers}" editable="true" draggableColumns="true" rowKey="#{customer.id}" selection="#{customerbean.selectedCustomer}" selectionMode="single">
我的問題是,當我點擊的文本菜單的「刪除」,一切都在這個意義上做工精細的記錄/行正在通過bean方法調用從後端擦除,但是表未反映新數據的更新。
您必須爲更新屬性的數據表提供完整的組件ID,例如update =「formid:datatableid」 – PermGenError