ZK Listbox清除列表项

有个页面, 想在查询之后, 初始化列表,需要清空 Listbox ,在Zk中, 可以得到 Listbox 的items, 进行 clear 。

代码:

Listbox box = (Listbox) self.getFellowIfAny("searchResult");
		box.getItems().clear();
 

对于直接绑定 List 的 Listbox ,

<listbox fixedLayout="true" id="pilotSearchResult" model="@{controller.pilotList}">
 

可以直接清除绑定的列表。

pilotList.clear();

猜你喜欢

转载自jxdwuao.iteye.com/blog/1177096
zk