public class SelectedItemConverter extends Object implements TypeConverter, Serializable
Before ZK version 3.6.2(included), when use data binding with selectedItem attribute of Listbox and/or Combobox, data binder will fire "onSelect" event automatically when the page is first loaded or model is changed. This is not consistent with ZK specification: only user action shall trigger component event. So since version 3.6.3, no longer the "onSelect" event will be fired(refer to Bug 2728704). However, some already implemented application might count on such "side effects". User can specify in application's WEB-INF/zk.xml following library-property to true to make it backward compatible (i.e. still fire the "onSelect" event when page is first loaded or model is changed)
org.zkoss.zkplus.databind.onSelectWhenLoad
true
IGNORE| Constructor and Description |
|---|
SelectedItemConverter()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
coerceToBean(Object val,
org.zkoss.zk.ui.Component comp)
Deprecated.
Convert an value object to bean property type.
|
Object |
coerceToUi(Object val,
org.zkoss.zk.ui.Component comp)
Deprecated.
Convert an value object to UI component attribute type.
|
public Object coerceToUi(Object val, org.zkoss.zk.ui.Component comp)
TypeConvertercoerceToUi in interface TypeConverterval - the object to be coerced to UI component attribute type.comp - associated componentTypeConverter.IGNORE
if you want DataBinder to ignore the assignment.public Object coerceToBean(Object val, org.zkoss.zk.ui.Component comp)
TypeConvertercoerceToBean in interface TypeConverterval - the object to be coerced to backend bean property type.comp - associated componentTypeConverter.IGNORE
if you want DataBinder to ignore the assignment.Copyright © 2015. All rights reserved.