Author: steveh Date: Tue Jan 25 10:34:34 2005 New Revision: 126408 URL: http://svn.apache.org/viewcvs?view=rev&rev=126408 Log: Fix for BEEHIVE-132. (I applied Jeremiah's fix, included as an attachment to the bug.) Modified: incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/tree/Tree.java
Modified: incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/tree/Tree.java Url: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/tree/Tree.java?view=diff&rev=126408&p1=incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/tree/Tree.java&r1=126407&p2=incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/tree/Tree.java&r2=126408 ============================================================================== --- incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/tree/Tree.java (original) +++ incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/tree/Tree.java Tue Jan 25 10:34:34 2005 @@ -48,44 +48,51 @@ /** * Netui tag that renders a tree control represented by a set of * <code>TreeElement</code> objects. - * @jsptagref.tagdescription Renders a navigable tree of [EMAIL PROTECTED] TreeElement} tags. + * @jsptagref.tagdescription Renders a navigable tree of [EMAIL PROTECTED] TreeItem}/[EMAIL PROTECTED] TreeLabel} + * tags. * * <p>This tag can automatically handle display icons for the tree nodes - * through the <code>imageRoot</code> attribute. - * If you point the <code>imageRoot</code> attribute at a folder containing - * appropriately named image files, the correct - * images will be used for any given state of the tree's nodes. The image names should be: + * through the <code>imageRoot</code> attribute. If you point the + * <code>imageRoot</code> attribute at a folder containing appropriately + * named image files, the correct images will be used for any given state + * of the tree's nodes. The image names should be: * * <blockquote> * <ul> + * <li>folder_16_pad.gif</li> * <li>handledownlast.gif</li> * <li>handledownmiddle.gif</li> * <li>handlerightlast.gif</li> - * <li>handledownmiddle.gif</li> + * <li>handlerightmiddle.gif</li> * <li>linelastnode.gif</li> * <li>linemiddlenode.gif</li> * <li>linevertical.gif</li> + * <li>spacer.gif</li> * </ul> * </blockquote> - * @example The following example shows a <netui:tree> tag with a set of children <netui:node> tags that form the - * tree's navigational structure. The <code>tree</code> attribute stores the tree in the Session object, - * under the property "tree". The <code>imageRoot</code> attribute points to fa older of images - * relative to the - * Page Flow directory. + * @example The following example shows a <netui:tree> tag with a set of + * children <netui:treeLabel> and <netui:treeItem> tags that form the + * tree's navigational structure. The <code>dataSource</code> attribute + * identifies the [EMAIL PROTECTED] TreeElement} in the appropriate binding context; in this case, + * the page flow context is used. The <code>selectionAction</code> attribute + * is required so there can be a postback to the tree. <code>tagId</code> is + * used to uniquely identify a tree on the page. * * <pre> <netui:tree - * tree="{session.tree}" - * imageRoot="treeImages" - * style="tree-control" - * action="treeState"> - * <netui:node label="Root Folder" expanded="true" action="treeState" target="contentFrame"> - * <netui:node label="I" expanded="false" action="treeState" target="contentFrame"> - * <netui:node label="A" expanded="false" action="treeState" target="contentFrame"> - * <netui:node label="1" action="treeState" target="contentFrame"/> - * <netui:node label="2" action="treeState" target="contentFrame"/> - * </netui:node> - * </netui:node> - * </netui:node> + * dataSource="pageflow.myTree" + * selectionAction="postback" + * tagId="myTree"> + * <netui:treeItem expanded="true" action="postback"> + * <netui:treeLabel>Root Folder</netui:treeLabel> + * <netui:treeItem expanded="false" action="postback"> + * <netui:treeLabel>I</netui:treeLabel> + * <netui:treeItem expanded="false" action="postback"> + * <netui:treeLabel>A</netui:treeLabel> + * <netui:treeItem action="postback">1</netui:treeItem> + * <netui:treeItem action="postback">2</netui:treeItem> + * </netui:treeItem> + * </netui:treeItem> + * </netui:treeItem> * </netui:tree></pre> * @netui:tag name="tree" body-content="scriptless" description="Renders a tree control represented by a set of TreeElement objects." * @netui.tldx:tag renderer="workshop.netui.jspdesigner.tldx.TreeRenderer" whitespace="indent" @@ -159,7 +166,7 @@ * Sets the action used for expanding and contracting tree nodes. * @param action - the action * @netui:attribute required="true" rtexprvalue="true" - * description="Sets the action used for expanding and contracting tree nodes." + * description="Sets the action used when a tree node is selected." * @netui.tldx:attribute category="general" reftype="netui-action-url" */ public void setSelectionAction(String action) @@ -182,7 +189,7 @@ * Sets the action used for expanding and contracting tree nodes. * @param target - the target for expansion * @netui:attribute rtexprvalue="true" - * description="Sets the action used for expanding and contracting tree nodes." + * description="Sets the frame target used for expanding and contracting tree nodes." * @netui.tldx:attribute category="general" reftype="netui-action-url" */ public void setExpansionTarget(String target)
