I may have found a bug in the Tree() widget or at least I found something that's unintuitive. I have a databound Tree that represents my left navigation and it works great.
I want to programmaticly access the nodes within my tree. On my first attempt I wrote some code to get the nodes and was getting a ClassCastException inside the _isc methods (smartGWT).
myNavTreeGrid.getTree().getAllNodes() -> ClassCastException
Something funky is going on there. After looking through the API a bit more I found an alternative way of doing this:
myNavTreeGrid.getData().getData() -> correctly returns ListGridRecord[]
however, the array of records is null when my tree is happily sitting on the screen and working fine.
So then i called myNavTreeGrid.getData().getRoot() which worked, however there's no getChildren() method so I can't loop over the child records.
Ultimately I just want to get at the ListGridRecords that are returned by the DataSource attached to my Tree.
Thoughts?
I want to programmaticly access the nodes within my tree. On my first attempt I wrote some code to get the nodes and was getting a ClassCastException inside the _isc methods (smartGWT).
myNavTreeGrid.getTree().getAllNodes() -> ClassCastException
Something funky is going on there. After looking through the API a bit more I found an alternative way of doing this:
myNavTreeGrid.getData().getData() -> correctly returns ListGridRecord[]
however, the array of records is null when my tree is happily sitting on the screen and working fine.
So then i called myNavTreeGrid.getData().getRoot() which worked, however there's no getChildren() method so I can't loop over the child records.
Ultimately I just want to get at the ListGridRecords that are returned by the DataSource attached to my Tree.
Thoughts?
Comment