|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ListitemRendererExt
Provides additional control to ListitemRenderer
.
ListitemRenderer
Field Summary | |
---|---|
static int |
DETACH_ON_RENDER
Returned by getControls() to indicate
that the list cells added by newListcell(org.zkoss.zul.Listitem) must be
detached before calling ListitemRenderer.render(org.zkoss.zul.Listitem, T, int) . |
Method Summary | |
---|---|
int |
getControls()
Returns how a listbox shall render the live data. |
Listcell |
newListcell(Listitem item)
Create an instance of Listcell that will be attached to the
unloaded listitem. |
Listitem |
newListitem(Listbox listbox)
Creates an instance of Listitem that will be attached to listbox. |
Field Detail |
---|
static final int DETACH_ON_RENDER
getControls()
to indicate
that the list cells added by newListcell(org.zkoss.zul.Listitem)
must be
detached before calling ListitemRenderer.render(org.zkoss.zul.Listitem, T, int)
.
Default: true.
If this interface is not specified, this flag is assumed
to be specified.
If you implement this interface and doesn't return this flag
in getControls()
, the implementation of
ListitemRenderer.render(org.zkoss.zul.Listitem, T, int)
must be aware of the existence of
the first cell (of the passed list item).
Method Detail |
---|
Listitem newListitem(Listbox listbox)
Listitem
that will be attached to listbox.
The created component will be passed to ListitemRenderer.render(org.zkoss.zul.Listitem, T, int)
to append the required information to show a row of the data.
Note: remember to invoke AbstractComponent.applyProperties()
to initialize
the properties, defined in the component definition, properly.
If null is returned, the default list item is created as follow.
final Listitem item = new Listitem();
item.applyProperties();
return item;
Note: DO NOT call AbstractComponent.setParent(org.zkoss.zk.ui.Component)
.
Listbox
to create it for youListcell newListcell(Listitem item)
Listcell
that will be attached to the
unloaded listitem.
By unloaded we mean the listitem that is not loaded with the data
retrieved from the model. That is, ListitemRenderer.render(org.zkoss.zul.Listitem, T, int)
is not called yet.
Notice that this callback shall generate an empty cell,
rather than showing the data retrieved from the model.
The showing of the data from model shall be done
in ListitemRenderer.render(org.zkoss.zul.Listitem, T, int)
.
If null is returned, the default list cell is created as follow.
final Listcell cell = new Listcell();
cell.applyProperties();
return cell;
Note: remember to invoke AbstractComponent.applyProperties()
to initialize
the properties, defined in the component definition, properly.
Note: DO NOT call AbstractComponent.setParent(org.zkoss.zk.ui.Component)
.
Don't create cells for other columns.
Note: DO NOT call AbstractComponent.setParent(org.zkoss.zk.ui.Component)
.
item
- the list item. It is the same as that is returned
by newListitem(org.zkoss.zul.Listbox)
Listbox
to create it for youint getControls()
Note: if this interface is not implemented, DETACH_ON_RENDER
is assumed.
DETACH_ON_RENDER
or 0 to indicate how to render
the live data.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |