|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.zkoss.zk.ui.AbstractComponent
org.zkoss.zk.ui.HtmlBasedComponent
org.zkoss.zul.impl.XulElement
org.zkoss.zul.Tree
public class Tree
A container which can be used to hold a tabular or hierarchical set of rows of elements.
Event:
Default getZclass()
: z-tree, and an other option is z-dottree. (since 3.5.0)
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.zkoss.zk.ui.HtmlBasedComponent |
---|
HtmlBasedComponent.ExtraCtrl |
Nested classes/interfaces inherited from class org.zkoss.zk.ui.AbstractComponent |
---|
AbstractComponent.Children |
Field Summary |
---|
Fields inherited from class org.zkoss.zk.ui.HtmlBasedComponent |
---|
_height, _left, _top, _width, _zclass |
Fields inherited from class org.zkoss.zk.ui.AbstractComponent |
---|
_visible |
Fields inherited from interface org.zkoss.zk.ui.Component |
---|
APPLICATION_SCOPE, COMPONENT_SCOPE, DESKTOP_SCOPE, PAGE_SCOPE, REQUEST_SCOPE, SESSION_SCOPE, SPACE_SCOPE |
Fields inherited from interface org.zkoss.zk.ui.sys.ComponentCtrl |
---|
CE_BUSY_IGNORE, CE_DUPLICATE_IGNORE, CE_IMPORTANT, CE_NON_DEFERRABLE, CE_REPEAT_IGNORE |
Constructor Summary | |
---|---|
Tree()
|
Method Summary | |
---|---|
void |
addItemToSelection(Treeitem item)
Selects the given item, without deselecting any other items that are already selected.. |
void |
addItemToSelectionApi(Treeitem itemApi)
Selects the given item, without deselecting any other items that are already selected.. |
void |
beforeChildAdded(Component newChild,
Component refChild)
Default: does nothing. |
void |
clear()
Clears all child tree items ( Treeitem . |
void |
clearSelection()
Clears the selection. |
java.lang.Object |
clone()
Clones the component. |
int |
getActivePage()
Returns the active page (starting from 0). |
protected java.lang.Object |
getAssociatedNode(Treeitem ti,
Tree t)
Return a node which is an associated Treeitem ti in a Tree tree |
protected Component |
getChildByNode(java.lang.Object node)
Return the Tree or Treeitem component by a given associated node in model. |
java.util.Collection |
getHeads()
Returns a collection of heads, including getTreecols()
and auxiliary heads (Auxhead ) (never null). |
java.lang.String |
getInnerWidth()
Returns the inner width of this component. |
int |
getItemCount()
Returns the number of child Treeitem . |
java.util.Collection |
getItems()
Returns a readonly list of all descending Treeitem
(children's children and so on). |
TreeModel |
getModel()
Returns the list model associated with this tree, or null if this tree is not associated with any tree data model. |
java.lang.String |
getName()
Returns the name of this component. |
int |
getPageCount()
Returns the number of pages. |
int |
getPageSize()
Returns the page size, aka., the number items per page. |
Paginal |
getPaginal()
Returns the paging controller, or null if not available. |
Paging |
getPagingChild()
Returns the child paging controller that is created automatically, or null if mold is not "paging", or the controller is specified externally by setPaginal(org.zkoss.zul.ext.Paginal) . |
Paging |
getPagingChildApi()
Returns the child paging controller that is created automatically, or null if mold is not "paging", or the controller is specified externally by setPaginal(org.zkoss.zul.ext.Paginal) . |
java.lang.String |
getPagingPosition()
Returns how to position the paging of tree at the client screen. |
int |
getRows()
Returns the rows. |
int |
getSelectedCount()
Returns the number of items being selected. |
Treeitem |
getSelectedItem()
Returns the selected item. |
Treeitem |
getSelectedItemApi()
Returns the selected item. |
java.util.Set |
getSelectedItems()
Returns all selected items. |
java.lang.String |
getSeltype()
Returns the seltype. |
Treechildren |
getTreechildren()
Returns the treechildren that this tree owns (might null). |
Treechildren |
getTreechildrenApi()
Returns the treechildren that this tree owns (might null). |
Treecols |
getTreecols()
Returns the treecols that this tree owns (might null). |
Treecols |
getTreecolsApi()
Returns the treecols that this tree owns (might null). |
Treefoot |
getTreefoot()
Returns the treefoot that this tree owns (might null). |
Treefoot |
getTreefootApi()
Returns the treefoot that this tree owns (might null). |
TreeitemRenderer |
getTreeitemRenderer()
Returns the renderer to render each item, or null if the default renderer is used. |
java.lang.String |
getZclass()
Returns the ZK Cascading Style class(es) for this component. |
boolean |
insertBefore(Component newChild,
Component refChild)
Inserts a child before the reference child. |
boolean |
isCheckmark()
Returns whether the check mark shall be displayed in front of each item. |
boolean |
isFixedLayout()
Deprecated. since 5.0.0, use ! isSizedByContent() instead |
boolean |
isMultiple()
Returns whether multiple selections are allowed. |
boolean |
isSizedByContent()
Returns whether sizing tree grid column width by its content. |
boolean |
isVflex()
Returns whether to grow and shrink vertical to fit their given space, so called vertial flexibility. |
void |
onChildAdded(Component child)
Default: does nothing. |
void |
onChildRemoved(Component child)
Default: does nothing. |
protected void |
redrawChildren(java.io.Writer out)
Redraws childrens (and then recursively descandants). |
void |
removeItemFromSelection(Treeitem item)
Deselects the given item without deselecting other items. |
void |
removeItemFromSelectionApi(Treeitem itemApi)
Deselects the given item without deselecting other items. |
void |
renderItem(Treeitem item)
Renders the specified Treeitem , if not loaded yet,
with getTreeitemRenderer() . |
void |
renderItem(Treeitem item,
java.lang.Object node)
Renders the specified Treeitem , if not loaded yet,
with getTreeitemRenderer() . |
void |
renderItemApi(Treeitem itemApi)
Renders the specified Treeitem , if not loaded yet,
with getTreeitemRenderer() . |
void |
renderItemApi(Treeitem itemApi,
java.lang.Object node)
Renders the specified Treeitem , if not loaded yet,
with getTreeitemRenderer() . |
Treeitem |
renderItemByPath(int[] path)
Load treeitems through path path Note: By using this method, all treeitems in path will be rendered and opened ( Treeitem.setOpen(boolean) ). |
Treeitem |
renderItemByPathApi(int[] path)
Load treeitems through path path Note: By using this method, all treeitems in path will be rendered and opened ( Treeitem.setOpen(boolean) ). |
void |
renderItems(java.util.Set items)
Renders the specified Treeitem if not loaded yet,
with getTreeitemRenderer() . |
protected void |
renderProperties(ContentRenderer renderer)
Renders the content of this component, excluding the enclosing tags and children. |
void |
selectAll()
Selects all items. |
void |
selectItem(Treeitem item)
Deselects all of the currently selected items and selects the given item. |
void |
selectItemApi(Treeitem itemApi)
Deselects all of the currently selected items and selects the given item. |
void |
service(AuRequest request,
boolean everError)
Processes an AU request. |
void |
setActivePage(int pg)
Sets the active page (starting from 0). |
void |
setActivePage(Treeitem item)
Sets the active page in which the specified item is. |
void |
setActivePageApi(Treeitem itemApi)
Sets the active page in which the specified item is. |
void |
setCheckmark(boolean checkmark)
Sets whether the check mark shall be displayed in front of each item. |
void |
setFixedLayout(boolean fixedLayout)
Deprecated. since 5.0.0, use setSizedByContent(boolean) (!fixedLayout) instead |
void |
setInnerWidth(java.lang.String innerWidth)
Sets the inner width of this component. |
void |
setModel(TreeModel model)
Sets the tree model associated with this tree. |
void |
setMold(java.lang.String mold)
Sets the mold to render this component. |
void |
setMultiple(boolean multiple)
Sets whether multiple selections are allowed. |
void |
setName(java.lang.String name)
Sets the name of this component. |
void |
setPageSize(int pgsz)
Sets the page size, aka., the number items per page. |
void |
setPaginal(Paginal pgi)
Specifies the paging controller. |
void |
setPagingPosition(java.lang.String pagingPosition)
Sets how to position the paging of tree at the client screen. |
void |
setRows(int rows)
Sets the rows. |
void |
setSelectedItem(Treeitem item)
Deselects all of the currently selected items and selects the given item. |
void |
setSelectedItemApi(Treeitem itemApi)
Deselects all of the currently selected items and selects the given item. |
void |
setSeltype(java.lang.String seltype)
Sets the seltype. |
void |
setSizedByContent(boolean byContent)
Sets whether sizing tree grid column width by its content. |
void |
setTreeitemRenderer(TreeitemRenderer renderer)
Sets the renderer which is used to render each item if getModel() is not null. |
void |
setVflex(boolean vflex)
Sets whether to grow and shrink vertical to fit their given space, so called vertial flexibility. |
protected void |
smartUpdate(java.lang.String attr,
java.lang.Object value)
Smart-updates a property of the peer widget associated with the component, running at the client, with the specified value. |
void |
toggleItemSelection(Treeitem item)
If the specified item is selected, it is deselected. |
void |
toggleItemSelectionApi(Treeitem itemApi)
If the specified item is selected, it is deselected. |
Methods inherited from class org.zkoss.zul.impl.XulElement |
---|
getAction, getContext, getCtrlKeys, getPopup, getTooltip, setAction, setContext, setContext, setCtrlKeys, setPopup, setPopup, setTooltip, setTooltip |
Methods inherited from class org.zkoss.zk.ui.HtmlBasedComponent |
---|
focus, getDraggable, getDroppable, getHeight, getHflex, getLeft, getSclass, getStyle, getTooltiptext, getTop, getVflex, getWidth, getZindex, getZIndex, newExtraCtrl, setClass, setDraggable, setDroppable, setFocus, setHeight, setHflex, setLeft, setSclass, setStyle, setTooltiptext, setTop, setVflex, setWidth, setZclass, setZindex, setZIndex |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.zkoss.zul.impl.api.XulElement |
---|
getAction, getContext, getCtrlKeys, getPopup, getTooltip, setAction, setContext, setContext, setCtrlKeys, setPopup, setPopup, setTooltip, setTooltip |
Methods inherited from interface org.zkoss.zk.ui.api.HtmlBasedComponent |
---|
focus, getHeight, getLeft, getSclass, getStyle, getTooltiptext, getTop, getWidth, getZindex, getZIndex, setDraggable, setDroppable, setFocus, setHeight, setLeft, setSclass, setStyle, setTooltiptext, setTop, setWidth, setZclass, setZindex, setZIndex |
Methods inherited from interface org.zkoss.zk.ui.ext.Scope |
---|
addScopeListener, getAttribute, hasAttribute, removeAttribute, removeScopeListener, setAttribute |
Constructor Detail |
---|
public Tree()
Method Detail |
---|
public void setMold(java.lang.String mold)
Component
setMold
in interface Component
setMold
in class AbstractComponent
mold
- the mold. If null or empty, "default" is assumed.ComponentDefinition
public void setPagingPosition(java.lang.String pagingPosition)
setPagingPosition
in interface Tree
pagingPosition
- how to position. It can only be "bottom" (the default), or
"top", or "both".public java.lang.String getPagingPosition()
getPagingPosition
in interface Paginated
public Paginal getPaginal()
AbstractComponent.getMold()
is "paging".
If mold is "paging", this method never returns null, because
a child paging controller is created automcatically (if not specified
by developers with setPaginal(org.zkoss.zul.ext.Paginal)
).
If a paging controller is specified (either by setPaginal(org.zkoss.zul.ext.Paginal)
,
or by setMold(java.lang.String)
with "paging"),
the tree will rely on the paging controller to handle long-content
instead of scrolling.
getPaginal
in interface Tree
public void setPaginal(Paginal pgi)
Tree
Component.getMold()
is "paging".
It is OK, though without any effect, to specify a paging controller even if mold is not "paging".
setPaginal
in interface Tree
pgi
- the paging controller. If null and Component.getMold()
is
"paging", a paging controller is created automatically as a
child component (see Tree.getPagingChildApi()
).public Paging getPagingChild()
setPaginal(org.zkoss.zul.ext.Paginal)
.
public Paging getPagingChildApi()
setPaginal(org.zkoss.zul.ext.Paginal)
.
getPagingChildApi
in interface Tree
public int getPageSize()
getPageSize
in interface Tree
java.lang.IllegalStateException
- if getPaginal()
returns null,
i.e., mold is not "paging" and no external controller is specified.public void setPageSize(int pgsz) throws WrongValueException
Note: mold is not "paging" and no external controller is specified.
setPageSize
in interface Tree
WrongValueException
public int getPageCount()
getPageCount
in interface Tree
public int getActivePage()
getActivePage
in interface Tree
public void setActivePage(int pg) throws WrongValueException
setActivePage
in interface Tree
WrongValueException
public void setFixedLayout(boolean fixedLayout)
setSizedByContent(boolean)
(!fixedLayout) instead
Tree
You can also specify the "fixed-layout" attribute of component in lang-addon.xml directly, it's a top priority.
setFixedLayout
in interface Tree
fixedLayout
- true to outline this grid by browserpublic boolean isFixedLayout()
isSizedByContent()
instead
Tree
Default: false.
Note: if the "fixed-layout" attribute of component is specified, it's prior to the original value.
isFixedLayout
in interface Tree
public void setSizedByContent(boolean byContent)
You can also specify the "sized-by-content" attribute of component in lang-addon.xml directly, it will then take higher priority.
setSizedByContent
in interface Tree
byContent
- public boolean isSizedByContent()
Note: if the "sized-by-content" attribute of component is specified, it's prior to the original value.
isSizedByContent
in interface Tree
setSizedByContent(boolean)
public Treecols getTreecols()
public Treecols getTreecolsApi()
getTreecolsApi
in interface Tree
public Treefoot getTreefoot()
public Treefoot getTreefootApi()
getTreefootApi
in interface Tree
public Treechildren getTreechildren()
public Treechildren getTreechildrenApi()
getTreechildrenApi
in interface Tree
public java.util.Collection getHeads()
getTreecols()
and auxiliary heads (Auxhead
) (never null).
getHeads
in interface Tree
public int getRows()
Default: 0.
getRows
in interface Tree
public void setRows(int rows) throws WrongValueException
Note: if both HtmlBasedComponent.setHeight(java.lang.String)
is specified with non-empty,
setRows(int)
is ignored
setRows
in interface Tree
WrongValueException
public java.lang.String getName()
Default: null.
The name is used only to work with "legacy" Web application that handles user's request by servlets. It works only with HTTP/HTML-based browsers. It doesn't work with other kind of clients.
Don't use this method if your application is purely based on ZK's event-driven model.
getName
in interface Tree
public void setName(java.lang.String name)
The name is used only to work with "legacy" Web application that handles user's request by servlets. It works only with HTTP/HTML-based browsers. It doesn't work with other kind of clients.
Don't use this method if your application is purely based on ZK's event-driven model.
setName
in interface Tree
name
- the name of this component.public boolean isCheckmark()
Default: false.
public void setCheckmark(boolean checkmark)
The check mark is a checkbox if isMultiple()
returns
true. It is a radio button if isMultiple()
returns false.
setCheckmark
in interface Tree
public boolean isVflex()
Note: this attribute is ignored if setRows(int)
is specified
Default: false.
public void setVflex(boolean vflex)
Note: this attribute is ignored if setRows(int)
is specified
setVflex
in interface Tree
public void setInnerWidth(java.lang.String innerWidth)
Application developers rarely call this method, unless
they want to preserve the widths of sizable columns
changed by the user.
To preserve the widths, the developer have to store the widths of
all columns and the inner width (getInnerWidth()
),
and then restore them when re-creating this component.
setInnerWidth
in interface Tree
innerWidth
- the inner width. If null, "100%" is assumed.public java.lang.String getInnerWidth()
Default: "100%"
getInnerWidth
in interface Tree
setInnerWidth(java.lang.String)
public java.lang.String getSeltype()
Default: "single".
getSeltype
in interface Tree
public void setSeltype(java.lang.String seltype) throws WrongValueException
setSeltype
in interface Tree
WrongValueException
public boolean isMultiple()
Default: false.
isMultiple
in interface Tree
public void setMultiple(boolean multiple)
setMultiple
in interface Tree
public void setActivePage(Treeitem item)
item
- the item to show. If the item is null, invisible, or doesn't belong
to the same tree, nothing happens.public void setActivePageApi(Treeitem itemApi)
setActivePageApi
in interface Tree
itemApi
- assume as a Treeitem
public java.util.Collection getItems()
Treeitem
(children's children and so on).
Note: the performance of the size method of returned collection is no good.
getItems
in interface Tree
public int getItemCount()
Treeitem
.
The same as getItems()
.size().
Note: the performance of this method is no good.
getItemCount
in interface Tree
public void selectItem(Treeitem item)
It is the same as setSelectedItem(org.zkoss.zul.Treeitem)
.
item
- the item to select. If null, all items are deselected.public void selectItemApi(Treeitem itemApi)
It is the same as setSelectedItem(org.zkoss.zul.Treeitem)
.
selectItemApi
in interface Tree
itemApi
- assume as a Treeitem
public void addItemToSelection(Treeitem item)
public void addItemToSelectionApi(Treeitem itemApi)
addItemToSelectionApi
in interface Tree
itemApi
- assume as a Treeitem
public void removeItemFromSelection(Treeitem item)
public void removeItemFromSelectionApi(Treeitem itemApi)
removeItemFromSelectionApi
in interface Tree
itemApi
- assume as a Treeitem
public void toggleItemSelection(Treeitem item)
public void toggleItemSelectionApi(Treeitem itemApi)
toggleItemSelectionApi
in interface Tree
itemApi
- assume as a Treeitem
public void clearSelection()
clearSelection
in interface Tree
public void selectAll()
selectAll
in interface Tree
public Treeitem getSelectedItem()
public Treeitem getSelectedItemApi()
getSelectedItemApi
in interface Tree
public void setSelectedItem(Treeitem item)
It is the same as selectItem(org.zkoss.zul.Treeitem)
.
public void setSelectedItemApi(Treeitem itemApi)
It is the same as selectItem(org.zkoss.zul.Treeitem)
.
setSelectedItemApi
in interface Tree
itemApi
- assume as a Treeitem
public java.util.Set getSelectedItems()
getSelectedItems
in interface Tree
public int getSelectedCount()
getSelectedCount
in interface Tree
public void clear()
Treeitem
.
Note: after clear, getTreechildren()
won't be null, but
it has no child
clear
in interface Tree
public java.lang.String getZclass()
HtmlBasedComponent
Default: null (the default value depends on element).
HtmlBasedComponent.setZclass(java.lang.String)
) will completely replace the default style
of a component. In other words, the default style of a component
is associated with the default value of HtmlBasedComponent.getZclass()
.
Once it is changed, the default style won't be applied at all.
If you want to perform small adjustments, use HtmlBasedComponent.setSclass(java.lang.String)
instead.
getZclass
in interface HtmlBasedComponent
getZclass
in class HtmlBasedComponent
HtmlBasedComponent.getSclass()
protected void smartUpdate(java.lang.String attr, java.lang.Object value)
AbstractComponent
The second invocation with the same property will replace the previous call. In other words, the same property will be set only once in each execution.
This method has no effect if AbstractComponent.invalidate()
is ever invoked
(in the same execution), since AbstractComponent.invalidate()
assumes
the whole content shall be redrawn and all smart updates to
this components can be ignored,
Once AbstractComponent.invalidate()
is called, all invocations to AbstractComponent.smartUpdate(java.lang.String, java.lang.Object)
will then be ignored, and AbstractComponent.redraw(java.io.Writer)
will be invoked later.
It can be called only in the request-processing and event-processing phases; excluding the redrawing phase.
There are two ways to draw a component, one is to invoke
Component.invalidate()
, and the other is AbstractComponent.smartUpdate(java.lang.String, java.lang.Object)
.
While Component.invalidate()
causes the whole content to redraw,
AbstractComponent.smartUpdate(java.lang.String, java.lang.Object)
let component developer control which part
to redraw.
smartUpdate
in class AbstractComponent
value
- the new value.
If it is DeferredValue
, the value
will be retrieved (by calling DeferredValue.getValue()
)
in the rendering phase. It is useful if the value can not be determined now.
For some old application servers (example, Webshpere 5.1),
Execution.encodeURL(java.lang.String)
cannot be called in the event processing
thread. So, the developers have to use DeferredValue
or disable the use of the event processing thread
(by use of disable-event-thread
in zk.xml).
In addition, the value can be any kind of objects that the client accepts (marshaled by JSON).
AbstractComponent.updateByClient(java.lang.String, java.lang.Object)
public void beforeChildAdded(Component newChild, Component refChild)
AbstractComponent
beforeChildAdded
in interface ComponentCtrl
beforeChildAdded
in class AbstractComponent
newChild
- the child to be added (never null).refChild
- another child component that the new child
will be inserted before it. If null, the new child will be the
last child.ComponentCtrl.beforeChildAdded(org.zkoss.zk.ui.Component, org.zkoss.zk.ui.Component)
public boolean insertBefore(Component newChild, Component refChild)
Component
You could use Component.setParent(org.zkoss.zk.ui.Component)
or Component.appendChild(org.zkoss.zk.ui.Component)
instead of this method, unless
you want to control where to put the child.
Note: Component.setParent(org.zkoss.zk.ui.Component)
always calls back Component.insertBefore(org.zkoss.zk.ui.Component, org.zkoss.zk.ui.Component)
and/or Component.removeChild(org.zkoss.zk.ui.Component)
,
while Component.insertBefore(org.zkoss.zk.ui.Component, org.zkoss.zk.ui.Component)
and Component.removeChild(org.zkoss.zk.ui.Component)
always calls back Component.setParent(org.zkoss.zk.ui.Component)
,
if the parent is changed. Thus, you don't need to override
both Component.insertBefore(org.zkoss.zk.ui.Component, org.zkoss.zk.ui.Component)
and Component.setParent(org.zkoss.zk.ui.Component)
, if you want
to customize the behavior.
insertBefore
in interface Component
insertBefore
in class AbstractComponent
newChild
- the new child to be inserted.refChild
- the child before which you want the new child
being inserted. If null, the new child is append to the end.
public void onChildAdded(Component child)
AbstractComponent
onChildAdded
in interface ComponentCtrl
onChildAdded
in class AbstractComponent
ComponentCtrl.onChildAdded(org.zkoss.zk.ui.Component)
public void onChildRemoved(Component child)
AbstractComponent
onChildRemoved
in interface ComponentCtrl
onChildRemoved
in class AbstractComponent
ComponentCtrl.onChildRemoved(org.zkoss.zk.ui.Component)
public java.lang.Object clone()
Component
clone
in interface Component
clone
in class AbstractComponent
protected Component getChildByNode(java.lang.Object node)
TreeModel.getPath(java.lang.Object, java.lang.Object)
method to locate assoicated
Treeitem (or Tree) via path. You can override this method to speed up
performance if possible.
Return null, if the Tree or Treeitem is not yet rendered.
Author: jeffliu
public void setModel(TreeModel model)
Note: changing a render will not cause the tree to re-render.
If you want it to re-render, you could assign the same model again
(i.e., setModel(getModel())), or fire an TreeDataEvent
event.
Author: jeffliu
setModel
in interface Tree
model
- the tree model to associate, or null to dis-associate
any previous model.
UiException
- if failed to initialize with the modelpublic TreeModel getModel()
Author: jeffliu
getModel
in interface Tree
public void setTreeitemRenderer(TreeitemRenderer renderer)
getModel()
is not null.
Note: changing a render will not cause the tree to re-render.
If you want it to re-render, you could assign the same model again
(i.e., setModel(getModel())), or fire an TreeDataEvent
event.
Author: jeffliu
setTreeitemRenderer
in interface Tree
renderer
- the renderer, or null to use the default.
UiException
- if failed to initialize with the modelpublic TreeitemRenderer getTreeitemRenderer()
getTreeitemRenderer
in interface Tree
public void renderItem(Treeitem item)
Treeitem
, if not loaded yet,
with getTreeitemRenderer()
.
It does nothing if getModel()
returns null.
To unload treeitem, use Treeitem.unload()
.
renderItems(java.util.Set)
public void renderItemApi(Treeitem itemApi)
Treeitem
, if not loaded yet,
with getTreeitemRenderer()
.
It does nothing if getModel()
returns null.
To unload treeitem, use Treeitem.unload()
.
renderItemApi
in interface Tree
itemApi
- assume as a Treeitem
renderItems(java.util.Set)
public void renderItem(Treeitem item, java.lang.Object node)
Treeitem
, if not loaded yet,
with getTreeitemRenderer()
.
It does nothing if getModel()
returns null.
Note: Since the corresponding node is given, This method has better performance than renderItem(Treeitem item) due to not searching for its corresponding node.
To unload treeitem, use Treeitem.unload()
.
renderItems(java.util.Set)
public void renderItemApi(Treeitem itemApi, java.lang.Object node)
Treeitem
, if not loaded yet,
with getTreeitemRenderer()
.
It does nothing if getModel()
returns null.
Note: Since the corresponding node is given, This method has better performance than renderItem(Treeitem item) due to not searching for its corresponding node.
To unload treeitem, use Treeitem.unload()
.
renderItemApi
in interface Tree
itemApi
- assume as a Treeitem
renderItems(java.util.Set)
public void renderItems(java.util.Set items)
Treeitem
if not loaded yet,
with getTreeitemRenderer()
.
It does nothing if getModel()
returns null.
To unload treeitem, with Treeitem.unload()
.
renderItems
in interface Tree
renderItem(org.zkoss.zul.Treeitem)
protected java.lang.Object getAssociatedNode(Treeitem ti, Tree t)
public Treeitem renderItemByPath(int[] path)
Treeitem.setOpen(boolean)
). If you want to visit the rendered
item in paging mold, please invoke setActivePage(Treeitem)
.
path
- - an int[] path, see TreeModel.getPath(java.lang.Object, java.lang.Object)
public Treeitem renderItemByPathApi(int[] path)
Treeitem.setOpen(boolean)
). If you want to visit the rendered
item in paging mold, please invoke setActivePage(Treeitem)
.
renderItemByPathApi
in interface Tree
path
- - an int[] path, see TreeModel.getPath(java.lang.Object, java.lang.Object)
protected void redrawChildren(java.io.Writer out) throws java.io.IOException
AbstractComponent
Default: it invokes AbstractComponent.redraw(java.io.Writer)
for all its children.
If a derived class renders only a subset of its children
(such as paging/cropping), it could override AbstractComponent.redrawChildren(java.io.Writer)
.
redrawChildren
in class AbstractComponent
java.io.IOException
AbstractComponent.redraw(java.io.Writer)
protected void renderProperties(ContentRenderer renderer) throws java.io.IOException
HtmlBasedComponent
See also Render Special Properties
renderProperties
in class XulElement
java.io.IOException
public void service(AuRequest request, boolean everError)
Default: in addition to what are handled by HtmlBasedComponent.service(org.zkoss.zk.au.AuRequest, boolean)
,
it also handles onSelect.
service
in interface ComponentCtrl
service
in class HtmlBasedComponent
everError
- whether any error ever occured before
processing this request.AbstractComponent.setAuService(org.zkoss.zk.au.AuService)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |