5 Replies Latest reply on Jun 23, 2009 5:54 AM by mtsinc

    Alternate Tree renderer

    mtsinc

      I'm about to go live with a RichFaces-based project, but I have one major stumbling block. The app is based on a 3-level sidebar menu structure with about 300 entries in it.

      The ideal view of this menu would be a RichFaces PanelMenu. However I cannot convince the PanelMenu to not download a massive amount of data (ca. 3MB) per page refresh, no matter what option I select. In IE 6 it's even worse, since apparently the AJAX functions are disabled, so every node open/close is another 3MB. From what I can tell, the PanelMenu's data model isn't supportive of partial access.

      The Tree control, on the other hand, does this sort of thing quite acceptably. However, the stock Tree leaf render is non-wrappable single-line text, so the more verbose menus slop out of their designated areas. Except in IE 6, where apparently a flaw in their CSS implementation allowed me to make the items wrap.

      It seems like the quickest way to resolve this conundrum would be to subclass the Tree control, replacing the stock renderer with something more like what panelMenu does. Problem is, I can't locate where the leaf table rendering is being done - if it's in the Tree/NodeRendererBase modules, it's well camouflaged and so far I haven't found any linkages to anything else.

      Can anyone tell me where to look?