Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /* BindingListModelSet.java
 
 {{IS_NOTE
 	Purpose:
 		
 	Description:
 		
 	History:
 		Mon Jan 29 21:07:15     2007, Created by henrichen
}}IS_NOTE
Copyright (C) 2007 Potix Corporation. All Rights Reserved.
{{IS_RIGHT
	This program is distributed under GPL Version 3.0 in the hope that
	it will be useful, but WITHOUT ANY WARRANTY.
}}IS_RIGHT
*/
package org.zkoss.zkplus.databind;
import  org.zkoss.zul.ListModelSet;

This is the BindingListModel as a java.util.Set to be used with org.zkoss.zul.Listbox, org.zkoss.zul.Grid, and DataBinder. Add or remove the contents of this model as a Set would cause the associated Listbox or Grid to change accordingly.

Make as public class since 3.0.5

Support BindingListModelEx since 3.1

Author(s):
Henri Chen
See also:
BindingListModel
org.zkoss.zul.ListModel
org.zkoss.zul.ListModelSet
public class BindingListModelSet extends ListModelSet
	private static final long serialVersionUID = 200808191422L;

Since:
3.0.5.
	public BindingListModelSet(Set setboolean live) {
		super(setlive);
	}
	//Set is naturally distinct
	public boolean isDistinct() {
		return true;
	}
	public int[] indexesOf(Object elm) {
		final int idx = indexOf(elm);
		return idx < 0 ? new int[0] : new int[] {idx};
	}
New to GrepCode? Check out our FAQ X