1

I'm using the PrimeFaces 3.5. I have p:dialog in which is p:dataTable. This is used to pick the item from filtered list.

After selecting the item I'm hiding the dialog and de-rendering the data table. But after showing the dialog again and re-rendering the data table, the data table contains the rows from previous filtering, but the filters themselves are clear.

I'm using the lazy data loading, so the values point to LazyDataModel, and the filteredValues are not set.

I would like to have the dataTable again in default state, so that both filters and selected rows would be empty. How to do that?

4

1 に答える 1

1

reset()ソースからは、インスタンスをorg.primefaces.component.datatable.Table呼び出すことができるようです。

  1. フィルタされた値をクリアする
  2. フィルターをクリアする
  3. 値をリセットする

したがって、クライアント側のデータテーブルへの参照を取得し(値をバインドするか、イベントからDOMをウォークすることにより)、を呼び出す必要があります。table.reset()

于 2013-03-05T14:44:19.287 に答える