org.zkoss.zkex.zul
Class SimpleListModelSharer
java.lang.Object
org.zkoss.zkex.zul.SimpleListModelSharer
- All Implemented Interfaces:
- ListModelSharer
public class SimpleListModelSharer
- extends java.lang.Object
- implements ListModelSharer
SimpleListModelSharer is a simple implementation of ListModelSharer
To use this class, you should create a global ListModel first,
and then create SimpleListModelSharer with the global list model.
ListModel globalModel = new ListModelList();
SimpleSharedListModel sharedModel = new SimpleSharedListModel(globalModel);
Then, in each desktop, you get a proxy by call getProxy(Desktop) and associate it to listbox or gird.
ListModel model = sharedModel.getProxy(desktop);
listbox.setModel(model);
- Since:
- 3.0.0
- Author:
- Dennis.Chen
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimpleListModelSharer
public SimpleListModelSharer(ListModel model)
- Parameters:
model - the model to be shared to different desktop.
getProxy
public ListModel getProxy(Desktop desktop)
- Get a proxy which is to be used in listbox or grid of a desktop.
- Specified by:
getProxy in interface ListModelSharer
- Parameters:
desktop - a desktop
- Returns:
- a ListModel proxy
getProxyCount
public int getProxyCount()
- Get the count of created proxy.
- Specified by:
getProxyCount in interface ListModelSharer
- Returns:
- the created proxy count
Copyright © 2005-2009 Potix Corporation. All Rights Reserved.