Lockable List and Tree
Anyone that knows me knows that I like making little test cases and components. Before I start showing off some of my custom spark components I wanted to make sure and share this custom component that I call the Lockable List. But, as every developer knows, when you have a list it is almost assured that you will need a tree. So I followed up with the list and built the Lockable Tree.
I have left the source code and everything available for these components, but wanted to draw people’s attention to the itemrenderers here. This is where the real magic is. Yes there is some functionality to List and Tree components that I have added, but the item renderers are really what make things possible. The List and Tree mainly add a wrapper to the data that is set (so the itemrenderers can work off the data provided) and retreive the data back in it’s original manner. Pretty simple.
The itemrenderers are nice. Lightweight. Definitely check out the itemrenderer’s code. Very simple.
What these components do is “hold” or “lock” a selection. In these examples you may say “well that is similar to shift/ctrl select”. Yes and no. If you need to hold nodes that may become difficult in large lists and in my apps I do lots of list filtering and sorting, so now I can filter for a specific node AND keep locked nodes. Very helpful.
Special thank you to John Gorena who already pointed out that this is something helpful for mobile development. Enjoy!




