Thanks for the info, Daryl. I think I am going to stick with escapeForHtml=true for the tree nodes to keep our node labels safe.
It looks like it may be a simple operation for me to extend the TreeRenderer and override the renderContent() method. I think we had wanted to get rid of some white space in the tree anyways...and now we will have a class that we can customize with little tweaks like this. I took a quick peek at the docs and didn't see instructions for plugging in a custom TreeRenderer....probably just haven't looked hard enough yet...any hints? I don't see anything in beehive-netui-config.xml or on the tree tag. Thanks. ------------------- Ture Hoefner WebLogic Portal Engineering BEA Systems, Inc. -----Original Message----- From: Daryl Olander [mailto:[EMAIL PROTECTED] Sent: Saturday, December 10, 2005 8:20 AM To: Beehive Users Subject: Re: Problem with TreeElement.content and tree renderer? Hi Ture, This is actually a feature. By default, the tree escapes it's content. The main reason for this is to prevent nodes from putting <script> into the content. To change the behavior just set the escapeForHtml attribute on the <netui:tree> to false and it will stop. You must have explicitly set this because the default is actually false. On 12/9/05, Ture Hoefner <[EMAIL PROTECTED]> wrote: > > Hi, > > I am using the TreeElement.setContent() method to set some extra HTML > markup for a tree node label when I need to make the label look a little > special under a certain condition. From the javadoc, it sounds like the > intent of the TreeElement.content property is to provide HTML markup > that is displayed to the right of the label: > > > > http://beehive.apache.org/docs/nightly/apidocs/classref_netui/org/apache > /beehive/netui/tags/tree/TreeElement.html#getContent() > > > > However, the string that I am setting in setContent() is getting > escaped when the tree is rendered, so It looks like this when I view the > HTML src of my page: > > > > <img src="/images/mypicture.gif " alt="asdf" > title="asdf" /> > > > > I want it to look like this so I have an HTML img tag that will show the > image I want to the right of the label: > > > > <img src="/images/mypicture.gif" alt="asdf" title="asdf" /> > > > > Is there a bug in the tree renderer? It seems like my > TreeElement.content string should be left alone, not escaped. > > > > Thanks. > > > > ------------------- > > Ture Hoefner > > WebLogic Portal Engineering > > BEA Systems, Inc. > > > > >
