Now available: FlpTree 1.2.0

On September 16, 2008, Components,Flex - 2 Comments

Formerly known as the IKTree, FlpTree has an updated version. This new version has several bug fixes and the overall performance is improved. Changes since the last version include:

  • FindNode(s) works now properly;
  • Selection and multiselect now works
  • Performance tweaks
  • Other bugs which I forgot about
  • Added open on hover

The openOnHover functionality lets a user open a node while dragging another onto it. (as proposed by Jonas Windey). Just set openOnHover on ‘true’ and set a hoverDelay.

Things to do:

  • I still haven’t been able to find and fix the strange height bug. Sometimes, a node suddenly changes height, haven’t got a clue why.
  • Make the creation of a renderer more user friendly. Probably with interfaces.
  • Improve performance when working with huge datasets.

If you find any bugs or have feature requests or anything, just leave a comment below.

The tree now has a main download page, which can be found here. (This page is just an ad. :-P )

Example:



What others have to say:

1

Hello,

it seems as if the height problem occurs as soon as a branch is opened, closed and reopened.

But this is not my main problem. FlpTree is really great and looks and feels much better than the regular Flex Tree Component.
Unfortunately I can’t geht it to work as soon as the data comes from over AMF. AMF returns VO objects as array and I convert this to an array collection. This works with Flex Tree but not with FlpTree.
Inside my event handler I try to set the FlpTree dataProvider as ArrayCollection but nothing happens.

This is the code:
TreeMenu.dataProvider = new ArrayCollection(ArrayUtil.toArray(event.result));

Maybe anyone knows what I am doing wrong…

2

Instead of using the ArrayUtil class, you can just type:
TreeMenu.dataprovider = new ArrayCollection(event.result);
or (if it’s allready an array collection)
TreeMenu.dataprovider = event.result as ArrayCollection;

Note that the children property also has to be an array collection.

Do you see any nodes at all, or just the top level nodes?

Have you tried calling TreeMenu.refreshTree() ? This function forces the tree to rebuild. Not the most elegant way, I admit.

Also, you could try to use (mxml) binding for the dataprovider, instead of setting it in AS. Note that when you do use binding, it generally only works for top-level nodes in the arraycollection, updates of children do not trigger binding, so you have to call myArraycollection.refresh();.

Hope this helps!

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Submit comment