org.zkoss.zkplus.databind
Class ListModelConverter

java.lang.Object
  extended by org.zkoss.zkplus.databind.ListModelConverter
All Implemented Interfaces:
TypeConverter

public class ListModelConverter
extends java.lang.Object
implements TypeConverter

The TypeConverter implmentation for converting collection to ListModel and vice versa.

Author:
Henri Chen

Constructor Summary
ListModelConverter()
           
 
Method Summary
 java.lang.Object coerceToBean(java.lang.Object val, org.zkoss.zk.ui.Component comp)
          Convert a BindingListModel to Set, Map, List, or BindingListModel (itself).
 java.lang.Object coerceToUi(java.lang.Object val, org.zkoss.zk.ui.Component comp)
          Convert a Set, Map, List, Object[], Enum, or other kind of BindingListModel to associated BindingListModel.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ListModelConverter

public ListModelConverter()
Method Detail

coerceToUi

public java.lang.Object coerceToUi(java.lang.Object val,
                                   org.zkoss.zk.ui.Component comp)
Convert a Set, Map, List, Object[], Enum, or other kind of BindingListModel to associated BindingListModel.

Specified by:
coerceToUi in interface TypeConverter
Parameters:
val - must be instanceof Set, Map, List, Object[], Enum Class, or other kind of BindingListModel implementation.
comp - associated component

coerceToBean

public java.lang.Object coerceToBean(java.lang.Object val,
                                     org.zkoss.zk.ui.Component comp)
Convert a BindingListModel to Set, Map, List, or BindingListModel (itself).

Specified by:
coerceToBean in interface TypeConverter
Parameters:
val - must be BindingListModelSet, BindingListModelList, BindingListModelMap, or other kind of BindingListModel
comp - associated component


Copyright © 2005-2007 Potix Corporation. All Rights Reserved.