Thanks for the info Carlin. I have checked in the doc, please review. -steveh.
On 12/8/05, Carlin Rogers <[EMAIL PROTECTED]> wrote: > > Great, thanks for helping with this Steve. The people interested in > implementing a TreeRenderer want to change the white space like the > " " > entities, space characters, and line breaks used as formatting of the HTML > markup of our tree node. It's just some added control of how the anchors, > images, and text that make up a node are displayed in a browser. The dev > would extend our TreeRenderer and override some simple methods that write > out a prefix or suffix of formatting around a given HTML element in the > node > markup. > > Here's a simple example. It overrides the method > renderConnectionImageSuffix() so that a new line is not added after the > <img> element for the connetcting expand/collapse image and > renderSelectionLinkPrefix() so that no white space indentation is used > before the anchor used to select a node. Also, > renderItemIconPrefix()/Suffix > routines to wrap a span arround the <img> element for the node icon. A > span > might be used to incorporate CSS or a call to a JavaScript routine. > > A dev could do more complex work such as overriding the > renderIndentation() > method to change the markup for the images that create the leading > indentation for the given node. But, I think for now we should keep it > simple. > > Let me know if you want something different. > > Thanks, > Carlin > > /* > * Copyright 2005 The Apache Software Foundation. > * > * Licensed under the Apache License, Version 2.0 (the "License"); > * you may not use this file except in compliance with the License. > * You may obtain a copy of the License at > * > * http://www.apache.org/licenses/LICENSE-2.0 > * > * Unless required by applicable law or agreed to in writing, software > * distributed under the License is distributed on an "AS IS" BASIS, > * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. > * See the License for the specific language governing permissions and > * limitations under the License. > * > * $Header:$ > */ > package mytree.renderer; > > import org.apache.beehive.netui.tags.rendering.AbstractRenderAppender; > import org.apache.beehive.netui.tags.tree.TreeElement; > import org.apache.beehive.netui.tags.tree.TreeRenderer; > > public class TestTreeRenderer extends TreeRenderer > { > protected void renderConnectionImageSuffix(AbstractRenderAppender > writer, > TreeElement node) > { > } > > protected void renderSelectionLinkPrefix(AbstractRenderAppender > writer, > TreeElement node) > { > } > > protected void renderItemIconPrefix(AbstractRenderAppender writer, > TreeElement node) > { > writer.append("<span ID=\"myItemIcon\" > style=\"cursor:pointer;\""); > writer.append(" onClick=\"doSomething()\">"); > } > > protected void renderItemIconSuffix(AbstractRenderAppender writer, > TreeElement node) > { > writer.append("</span>"); > } > } > > On 12/8/05, Steve Hanson <[EMAIL PROTECTED]> wrote: > > > > Sounds like a good doc plan for the custom TreeRenderer, I will try to > get > > the doc in today. > > > > Carlin, could you send me a sample TreeRenderer impl class, if you have > > one > > lying around? > > > > On 12/7/05, Carlin Rogers <[EMAIL PROTECTED]> wrote: > > > > > > Steve, > > > > > > Here's an item I've thought of for your earlier query about doc needs. > I > > > think you already have this on your list. We now allow users to > > configure > > > a > > > custom TreeRenderer implementation (beehive-974). The way to configure > a > > > custom implementation of the TreeRenderer is through the beehive netui > > > config file. I put a note in the Javadoc at the top of the > TreeRenderer > > > class but for some new additional doc we could... > > > > > > - Comment on the ability to implement your own TreeRenderer by > extending > > > out > > > implementation and overriding any of the formatting methods desired > and > > > state how to configure NetUI. Maybe this would go in the > > tagsTree.htmlpage, > > > just following the "TreeElement Rendered Contents" section which > > describes > > > the markup used to render a node. I'm open to suggestions. > > > > > > - add information about the new <tree-renderer-class> element (in the > > > <jsp-tag-config> section) to the beehive-netui-config document. > > > > > > Thanks, > > > Carlin > > > > > > On 12/1/05, Eddie O'Neil <[EMAIL PROTECTED]> wrote: > > > > > > > > Steve-- > > > > > > > > Personally, I think that the Controls Tutorial will be more > > > > descriptive if it focuses solely on the end-to-end process of > writing > > > > a Control. For example: > > > > > > > > - authoring the Control's source artifacts > > > > - building the Control > > > > - packaging the Control into a JAR file > > > > - authoring a JUnit test for the Control > > > > - testing the Control > > > > > > > > Today, most of the Controls Tutorial is about how to setup, build, > and > > > > deploy a NetUI-enabled web application. While we should certainly > > > > have examples and documentation about how to use a Control from a > Page > > > > Flow, it's probably more interesting to focus on the end-to-end > cycle > > > > of building a Control JAR file. > > > > > > > > Note, this requires that I (finally!) commit the JUnit test > > > > container for Controls. Believe it or not, I've got that "svn > add"ed > > > > locally and should have that done soon. Then, it's just a matter of > > > > rewriting the tutorial. > > > > > > > > Thoughts? > > > > > > > > Eddie > > > > > > > > > > > > > > > > On 11/30/05, Steve Hanson <[EMAIL PROTECTED]> wrote: > > > > > Hi Eddie and all: > > > > > > > > > > Eddie, yesterday you mentioned to me privately that you'd like to > > see > > > > the > > > > > control tutorial not use a page flow as its > > > > testing environment. Instead, > > > > > the page flow should be replaced with some sort of unit testing. > > > > > > > > > > Could you say more about what you are looking for here? > > > > > > > > > > thanks, > > > > > steveh. > > > > > > > > > > > > > > > > > > > > On 11/29/05, Steve Hanson <[EMAIL PROTECTED]> wrote: > > > > > > > > > > > > Hi all: > > > > > > > > > > > > Seems like a good time to clean up and amend the 1.x docs. > > > > > > > > > > > > So here is a general call out for doc needs and wish lists for > > > Beehive > > > > 1.x > > > > > > . > > > > > > > > > > > > Are there any big, glaring problems with the current doc? > > > > > > Any little issues that have fallen through the cracks? > > > > > > > > > > > > Please respond with what you would like to see in the Beehive > > > 1.xdocs. > > > > > > > > > > > > thanks, > > > > > > Steve Hanson > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
