All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.zkoss.zkplus.databind.CollectionItem Maven / Gradle / Ivy

There is a newer version: 10.0.0-jakarta
Show newest version
/* CollectionItem.java


 Purpose:
 
 Description:
 
 History:
 Jul 31, 2007 2:51:58 PM , Created by jumperchen


 Copyright (C) 2007 Potix Corporation. All Rights Reserved.

 {{IS_RIGHT
 This program is distributed under LGPL Version 2.1 in the hope that
 it will be useful, but WITHOUT ANY WARRANTY.
 }}IS_RIGHT
 */
package org.zkoss.zkplus.databind;

import org.zkoss.zk.ui.Component;
import org.zkoss.zul.ListModel;

/**
 * The CollectionItem is used by {@link DataBinder} and provides an
 * interface for collection component to interact with the DataBinder
 * such as Grid or Listbox.
 * 
 * @author jumperchen
 * @see DataBinder
 * @deprecated As of release 7.0.0, replace with new ZK binding.
 * @since 3.0.0
 */
public interface CollectionItem {
	/**
	 * 

* Returns the component's owner. *

* For example: if this comp is a Row component then this method will * return the associated Grid component of the Row. * * @param comp A component as Row or Listitem. * @return Component the comp's owner. */ public Component getComponentCollectionOwner(Component comp); /** *

* Returns the component by the index in the comp's children. *

* * @param comp Collection owner component such as Grid. * @param index index of the element to return * @return Component the component at the specified position in the list of * comp's children. */ public Component getComponentAtIndexByOwner(Component comp, int index); /** *

* Returns the component model as {@link ListModel} *

* * @param comp Collection owner component such as Grid. * @return ListModel */ public ListModel getModelByOwner(Component comp); /** *

* Sets the binding renderer for the template component such as Listitem * or Row. *

* * @param comp A component such as Row or Listitem. * @param binder The associated DataBinder */ public void setupBindingRenderer(Component comp, DataBinder binder); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy