org.zkoss.zkplus.databind
Interface CollectionItem

All Known Subinterfaces:
CollectionItemExt

public interface CollectionItem

The CollectionItem is used by DataBinder and provides an interface for collection component to interact with the DataBinder such as Grid or Listbox.

Since:
3.0.0
Author:
jumperchen
See Also:
DataBinder

Method Summary
 Component getComponentAtIndexByOwner(Component comp, int index)
           Returns the component by the index in the comp's children.
 Component getComponentCollectionOwner(Component comp)
           Returns the component's owner.
 ListModel getModelByOwner(Component comp)
           Returns the component model as ListModel
 void setupBindingRenderer(Component comp, DataBinder binder)
           Sets the binding renderer for the template component such as Listitem or Row.
 

Method Detail

getComponentCollectionOwner

Component getComponentCollectionOwner(Component comp)

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.

Parameters:
comp - A component as Row or Listitem.
Returns:
Component the comp's owner.

getComponentAtIndexByOwner

Component getComponentAtIndexByOwner(Component comp,
                                     int index)

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

Parameters:
comp - Collection owner component such as Grid.
index - index of the element to return
Returns:
Component the component at the specified position in the list of comp's children.

getModelByOwner

ListModel getModelByOwner(Component comp)

Returns the component model as ListModel

Parameters:
comp - Collection owner component such as Grid.
Returns:
ListModel

setupBindingRenderer

void setupBindingRenderer(Component comp,
                          DataBinder binder)

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

Parameters:
comp - A component such as Row or Listitem.
binder - The associated DataBinder


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