Thanks Sebastein for your reply.

Actually am having a scenario wherein i have a data table and each row of the data table has to have 3 columns with 1 of the cloumn having tree, as exaplined with the code in the previous post. Isnt there some workarounf to achive this..?


Sébastien Marin <[EMAIL PROTECTED]> wrote:
Why do you want to insert your treeTable on a DataTable ?
The treeTable component do it for you :


var="composite"
styleClass="tree"
nodeClass="treenode"
headerClass="treeHeader"
footerClass="treeFooter"
rowClasses="a, b"
columnClasses="col1, col2"
selectedNodeClass="treenodeSelected"
expandRoot="true">























On this exemple, the treeTable make a table with 3 columns. The tree is insert
on the second column.



Selon Nikita Shah :

-> Hello Sebastein,
->
-> Did you have a workaround for the problem you were facing of null child..?
-> I am also using the MyFaces treeTable component. I have a list of tasks
-> and their subtasks. I want to display task as the root node and sub-tasks
-> as its children.
->
-> Following is my jsp page -
->
->
-> rowClasses="taskTable_Row1,taskTable_Row2" var="task"
-> columnClasses="task_nodeColumn,task_groupColumn,task_weightColumn"
-> value="#{projectLeaf.tasks}">
->
->
->
-> var="treeItem" expandRoot="true">
->
->
->
->

->
->

->
->

->

->
-> Participants

->

->

->
-> The bean method is as below -
->
-> public DefaultTreeModel getSubTaskTree()
-> {
-> DefaultMutableTreeNode root = new DefaultMutableTreeNode(new
-> Task(1,"root"));
-> DefaultMutableTreeNode a = new DefaultMutableTreeNode(new Task(2,
-> "A"));
-> root.insert(a);
-> DefaultMutableTreeNode b = new DefaultMutableTreeNode(new Task(3,
-> "B"));
-> root.insert(b);
-> DefaultMutableTreeNode c = new DefaultMutableTreeNode(new Task(4,
-> "C"));
-> root.insert(c);
-> DefaultTreeModel treeModel = new DefaultTreeModel(root);
-> return treeModel;
-> }
->< br>-> I get the following error
-> Base is null: task
->
-> Wud appreciate your help if you have come across such error or have any
-> idea.
->
-> TIA
-> Nikita
->
->
->
-> ---------------------------------------------------------------------
-> Ability is what you're capable of.
-> Motivation determines what you do.
-> Attitude determines how well you do it.
->
-> ---------------------------------
-> Yahoo! Shopping
-> Find Great Deals on Holiday Gifts at Yahoo! Shopping


|Cordialement, Sébastien MARIN.|
|------------------------------|
|-> http://www.marin-s.com <-|
|------------------------------|



---------------------------------------------------------------------
Ability is what y ou're capable of.
Motivation determines what you do.
Attitude determines how well you do it.


Yahoo! Photos
Ring in the New Year with Photo Calendars. Add photos, events, holidays, whatever.

Reply via email to