I would disagree that the facets are overkill. They allow complete control over the appearance of your tree without having to write a renderer. I would argue that its much more burdensome for the average user to write their own custom renderer then it is to use a facet.
In the initial design of tree2 I chose facets and other constructs that JSF users should be well familiar with. So if you know how to customize a table, you should be able to figure out how to customize the tree. Writing your own renderer requires more detailed knowledge of the component (not to mention access to the source, then chaning faces-config.xml, etc.) IMO its more important that you be able to handle 99% of the use cases simply (ie. add another facet) then it is to have a few less lines of code 99% of the time. Because when you want that extra flexability, you won't care how many extra lines you add. Also, if your tree is simple enough, you only need one facet and a couple of conditionally rendered tags. It doesn't have to be as complex as some of the examples shown. Those are the to illustrate the power you have in controlling the appearance. The 't' variable is a reference to the tree itself (technically the "node toggler". Yes it is declared by the component. Just like the var attribute is. Note, there is precedent for this in <h:dataTable>. Its designed to give the JSP author access to component information that might be useful. No big deal IMO. No offense taken. You are welcome to make suggestions/criticisms as long as they are not mean-spirited. I just happen to disagree with most of your points. sean On 10/4/05, Martin Marinschek <[EMAIL PROTECTED]> wrote: > Do you now that there is another tree-component available? the t:tree one? > > Maybe you want to give this one a try? > > And if you are not satisfied with either, you can always try to extend > those two, and send us any changes you implement when working on them. > > regards, > > Martin > > On 10/4/05, Marcel Ruff <[EMAIL PROTECTED]> wrote: > > Timo --Blazko-- Boewing wrote: > > > > >Hello all, > > > > > >After having read almost every discussion here on the tree2 component, I > > >am having some final thoughts :-) > > >I am trying since two days now to get the 99,9% common case working: > > >having a tree component and intercepting centrally a clicked ID > > >belonging to the selected node. > > > > > >First, I have no idea, why it takes quite much code to get this > > >component working, these f:facet stuff with manual h:commandLink etc. is > > >nice for customisation, but why not making this optional? I think most > > >people want to use the tree2 as it is in the examples. Everyone that > > >wants different style can write another renderer for this component, or > > >not? And most visual appearance can be achieved by using CSS and > > >exchanged images... > > >This would really cause much less coding in the frontend for users of > > >tree2 - I think it is way too much. > > > > > >Now, in order to find out an ID of my node selected, I have to query an > > >f:param the "old" style? Why that? Additionally, in every example you > > >can read that "t.setNodeSelected" shall be used as action event > > >listener. Okay, what is "t"? It is never set up as a managed bean, and > > >only digging example sources and messages here lead up to an idea that > > >this might be an instance of HtmlTree or so whose instance I cannot > > >define myself. Okay, how to implement that action event fired, t being > > >hard wired? Or not? I think that much confusing stuff can be avoided > > >when documentating the common case in the component overview of the > > >website and the wiki. No one knows what node and varNodeToggler exactly > > >can do and how to intercept fired events. > > > > > >Please, although between the lines that might sound that way, do not > > >feel offended! I am thankful for that wonderful stuff, especially > > >because it is an extra on top of JSF standard components. > > >However, please understand this as my way of constructive criticism that > > >may be well founded in my misunderstanding of something :-) > > >However, creating such a tree was very quickly done using tagfiles in > > >JSP 2.0, so I see less profit i using the tree2 component, that I would > > >like to use but causes much coding overhead in my POV. > > > > > > > > > > > + my 10 Cents, you express exactly my feelings. > > > > Marcel > > > > PS: What is POV? (for me it is POB = plain old brain) > > > > > -- > > http://www.irian.at > Your JSF powerhouse - > JSF Trainings in English and German >

