CheckboxTree does not have the features you mentioned however its
rendering is fine grained so you could override the methods you need
and render appropriately. One thing which won't work is "mouseOver" on
TreeListener. TreeListener fires server side events and mouseOver is
more of a client side need.
That said if the component you need does not collapse and is always
expanded why not use an HTML list instead:
<ul>
<li>checkbox</li>
<ul>
<li>checkbox</li>
</ul>
</ul>
Seems much simpler than coercing Tree into a mutli select.
Using a JS library such as JQuery you could easily register mouseOver
events to any part of the tree:
$(document).ready(function() {
// iterate all <li> elements and register mouseOver event
$("#multiselect").find("li").each(function(i) {
$(this).mouseover(function(){
$(this).attr("style", "background:yellow");
}).mouseout(function() {
$(this).attr("style", "background:none");
});
});
});
regards
bob
Demetrios Kyriakis wrote:
Hi,
In many applications a Select with "multiple" option is used, plus
"spacing" and unselectable items to "simulate" the concept of a hierarchy .
This approach however is very user unfriendly (at least for simple users).
I know that in Click there's the PickList component, but it has the same
"hierarchy" problem.
One solution might be to use the CheckboxTree, but it looks like it's
missing a set of features:
- the possibility to force the tree to remain expanded (e.g. boolean
forceExpanded). In this case the + and - should simply dissapear from
parent nodes.
- the root to render nicely like other tree components do it (right now
it has an ugly "- leaf line".
- TreeNode to have a "title" (hint).
- TreeListener to have a "mouseOver" event too.
Are the above already possible (I couldn't find the API) to achieve them.
Thank you,
Demetrios.