[ 
https://issues.apache.org/jira/browse/TOMAHAWK-1526?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Leonardo Uribe resolved TOMAHAWK-1526.
--------------------------------------

         Assignee: Leonardo Uribe  (was: Jakob Korherr)
    Fix Version/s: 1.1.10-SNAPSHOT
       Resolution: Fixed

I committed an implementation of those methods. 

The only thing that bothers me about this commit is how invokeOnComponent 
works. It requires to traverse the whole model using TreeWalker, because tree2 
model don't have a clean way to handle node ids. 

In UIData, the rowIndex is appened to the clientId, but for calls like 
invokeOnComponent, this fact is used to call setRowIndex without traverse the 
whole model. 

The problem is we can't extract the nodeId from the clientId, because the model 
never specified how this id should looks like. So the only way is use 
TreeWalker interface, but with this one we can't customize how it should scan 
the tree model to find the nodeId to set in few steps.

The things get worse when you try to extend the model. There exists the 
following interfaces (on tree2 package)

- TreeModel
- TreeNode
- TreeState
- TreeWalker

All of  them are interfaces, so we can't add methods without break existing 
code.  Note javax.faces.model.DataModel is an abstract class instead, so it is 
possible to add new methods without break anything.

> Implement visitTree and invokeOnComponent for t:tree2
> -----------------------------------------------------
>
>                 Key: TOMAHAWK-1526
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1526
>             Project: MyFaces Tomahawk
>          Issue Type: Task
>    Affects Versions: 1.1.9
>            Reporter: Jakob Korherr
>            Assignee: Leonardo Uribe
>             Fix For: 1.1.10-SNAPSHOT
>
>
> While working on MYFACES-2744 I noticed that t:tree2 does not provide 
> visitTree() and invokeOnComponent(), however those two methods should be 
> implemented, because the standard impl from UIComponent does not work in this 
> case.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to