incubator-adffaces-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jochen Traunecker <madnec...@yahoo.com>
Subject AW: handle selection state of treeTable
Date Tue, 03 Apr 2007 11:56:42 GMT
Hi Jens,

as far as I know: to select a node in the tree you need the node's tree path. The path is
a sequence of "index numbers" of your tree model (with Default TreeModel), starting at root
node and digging down the tree hierachy to the node of interest. 

To select / expand a node of interest you have to formulate the node's path by your own (I'm
not that kind of expert to be confident in that) or you have to implement your own treeModel
providing these kind of convenience.

Hope this helped a bit,
Jochen

----- Urspr√ľngliche Mail ----
Von: Jens Stegemann <jens.stegemann@gmx.de>
An: adffaces-user@incubator.apache.org
Gesendet: Montag, den 2. April 2007, 23:53:04 Uhr
Betreff: handle selection state of treeTable

Hi,

I have a treeTable based on a ChildPropertyTreeModel containing a set of beans 
of a custom type. I could get the treeTable to be rendered correctly. I can 
even select a row and write the underlying bean into a property by using the 
SelectionListener.

What I do not know is how to select a certain row in my tree programmatically. 
I would want to add the corresponding RowKey to the selectedRowKeys of the 
tree, but I do not know the RowKey but only the object (bean) I want to be 
selected (since I loaded it from a database for example).

Is there a way to do this. I think it has to be, but I am just not able to 
find out what to do...



Your's

Jens





		
___________________________________________________________ 
Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de

Mime
View raw message