org.zkoss.bind.converter.sys
Class RadiogroupModelConverter

java.lang.Object
  extended by org.zkoss.bind.converter.sys.RadiogroupModelConverter
All Implemented Interfaces:
java.io.Serializable, Converter

public class RadiogroupModelConverter
extends java.lang.Object

The Converter implementation of the radiogroup for converting collection to ListModel and vice versa.

Since:
6.0.0
Author:
dennis
See Also:
Serialized Form

Constructor Summary
RadiogroupModelConverter()
           
 
Method Summary
 java.lang.Object coerceToBean(java.lang.Object val, Component comp, BindContext ctx)
          Convert a ListModel to Set, Map, List, or ListModel (itself).
 java.lang.Object coerceToUi(java.lang.Object val, Component comp, BindContext ctx)
          Convert a Set, Map, List, Object[], Enum, or other kind of ListModel to associated ListModel.
protected  ListModel<?> getComponentModel(Component comp)
           
protected  ListModel<?> handleWrappedModel(BindContext ctx, Component comp, ListModel<?> model)
          post processing the wrapped model. default return original one
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RadiogroupModelConverter

public RadiogroupModelConverter()
Method Detail

getComponentModel

protected ListModel<?> getComponentModel(Component comp)
Parameters:
comp - the component that has listmodel
Returns:
null if no list model for the component

handleWrappedModel

protected ListModel<?> handleWrappedModel(BindContext ctx,
                                          Component comp,
                                          ListModel<?> model)
post processing the wrapped model. default return original one

Parameters:
ctx - the context
comp - the component of the converter
model - the wrapped model
Returns:
the list model

coerceToUi

public java.lang.Object coerceToUi(java.lang.Object val,
                                   Component comp,
                                   BindContext ctx)
Convert a Set, Map, List, Object[], Enum, or other kind of ListModel to associated ListModel.

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

coerceToBean

public java.lang.Object coerceToBean(java.lang.Object val,
                                     Component comp,
                                     BindContext ctx)
Convert a ListModel to Set, Map, List, or ListModel (itself).

Specified by:
coerceToBean in interface Converter
Parameters:
val - must be ListModelSet, ListModelList, ListModelMap, or other kind of ListModel
comp - associated component
ctx - bind context


Copyright © 2005-2011 Potix Corporation. All Rights Reserved. SourceForge.net Logo