I'm going to guess that you're using DefaultTreeModel. There are 2
constructors:

public DefaultTreeModel(ValueEncoder<T> encoder, TreeModelAdapter<T>
adapter, T root)
and
public DefaultTreeModel(ValueEncoder<T> encoder, TreeModelAdapter<T>
adapter, List<T> roots)

If your tree is null, then you have no roots. Don't pass null to the first
constructor because this will create a list with 1 null element in it (which
is probably causing your NPE). Instead, pass Collections.emptyList() (or
possibly null) to the second constructor.



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/NPE-in-Tree-when-I-dont-have-any-data-tp5720289p5720296.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to