Package org.zkoss.zkex.zul
Class SimpleListModelSharer<T>
- java.lang.Object
-
- org.zkoss.zkex.zul.SimpleListModelSharer<T>
-
- All Implemented Interfaces:
ListModelSharer<T>
public class SimpleListModelSharer<T> extends java.lang.Object implements ListModelSharer<T>
SimpleListModelSharer is a simple implementation ofListModelSharer
Available in ZK PE and ZK EE.
To use this class, you should create a global
ListModel
first, and then create SimpleListModelSharer with the global list model.
Then, in each desktop, you get a proxy by callListModel globalModel = new ListModelList(); SimpleSharedListModel sharedModel = new SimpleSharedListModel(globalModel);
getProxy(Desktop)
and associate it to listbox or gird.ListModel model = sharedModel.getProxy(desktop); listbox.setModel(model);
- Since:
- 3.0.0
- Author:
- Dennis.Chen
-
-
Constructor Summary
Constructors Constructor Description SimpleListModelSharer(ListModel<T> model)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ListModel<T>
getProxy(Desktop desktop)
Get a proxy which is to be used in listbox or grid of a desktop.int
getProxyCount()
Get the count of created proxy.
-
-
-
Method Detail
-
getProxy
public ListModel<T> getProxy(Desktop desktop)
Get a proxy which is to be used in listbox or grid of a desktop.- Specified by:
getProxy
in interfaceListModelSharer<T>
- Parameters:
desktop
- a desktop- Returns:
- a ListModel proxy
-
getProxyCount
public int getProxyCount()
Get the count of created proxy.- Specified by:
getProxyCount
in interfaceListModelSharer<T>
- Returns:
- the created proxy count
-
-