org.zkoss.bind.converter.sys.ChildrenBindingConverter Maven / Gradle / Ivy
/* ChildrenBindingConverter.java
Purpose:
Description:
History:
2012/2/29 Created by Dennis Chen
Copyright (C) 2011 Potix Corporation. All Rights Reserved.
*/
package org.zkoss.bind.converter.sys;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import org.zkoss.bind.BindContext;
import org.zkoss.bind.Converter;
import org.zkoss.util.Maps;
import org.zkoss.zk.ui.Component;
import org.zkoss.zul.ListModelArray;
/**
* To converter items to List
* @author dennis
* @since 6.5.2
*/
public class ChildrenBindingConverter implements Converter, Serializable {
private static final long serialVersionUID = 1L;
@SuppressWarnings("unchecked")
public Object coerceToUi(Object val, Component component, BindContext ctx) {
if (val == null || val instanceof List) {
return val;
}
Collection