databinder 1.1.1 is out with DataTree

Filed under: tech — Tags: , , , , — thomas11 @ 15:36

Recently, Nathan released databinder 1.1.1. I contributed the new DataTree component, which is a Wicket (and thus, Swing) tree with nodes backed by Hibernate-managed entities. It comes with a few AJAXified control links, for instance for adding and deleting nodes. Without Nathan’s substantial help and an addition he made to HibernateObjectModel, the tree wouldn’t be in the good shape it’s now, so thanks!

Your objects acting as tree nodes must implement an interface, but it’s really a minimal tree interface, so you should have those methods anyway:

public interface DataTreeObject<T> {
    public Collection<T> getChildren();
    public void addChild(T child);
    public T getParent();

[Added 2008-04-10] A live demo is up on the databinder site.

An additional tiny addition to the 1.1.1 release from me is that the RemoveRepeaterItemButton can now be configured with a minimum of elements which must remain in the collection. For instance, if you want to let users remove addresses in their profile while one must always be present, you instantiate the button with a minimum of one and when only one address remains, the button disables itself.

Blog at