In Tapestry5 tree component allows a user to select multiple items. Each selected item looks colored in bold. How do I make a restriction on tree component so is possible to select one single item?
I’ve been checking TreeSelectionModel for this purpose, but all I can do is to store TreeNode values on a collection, but not to restrict user selection on client side.
Thanks.
That’s a tricky one. You have to place the tree component within a zone and update the zone when the selection changes.
Geoff Callender posted an example at jumpstart:
http://jumpstart.doublenegative.com.au/jumpstart/examples/ajax/treefromdatabasewithzones
Psydo-code example:
Tml:
Java: