myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From De Marco Steven <>
Subject Trinidad Question about component extension
Date Sun, 08 Apr 2012 00:23:09 GMT
i'm sorry if it's not the right place to ask this question but i found 
nowhere else to ask (and have a relevant answer)

I'm starting to work with adf and also with the trinidad components 
One of my test case is to build a page where a user can see a list of 
project. Each project can have sub-Projects and so on...

Example :

  * Project 1
      o SubProject 1
  * Project 2
      o SubProject 2
          + SubSubProject 3
          + SubSubProject 4
  * Project 3

And of course i can't know the depth of all of that (so i can't use the 
bad pattern of nesting af:iterator)

For me it's a question in recursivity.
I can't use the af:tree component because i don't want that my user 
could show/hide projects like with the af:tree

So i looked into your source files and try to learn how you did it.
Looked into the af:iterator to try to use a TreeModel instead of a 
Looked into the af:tree to try to change the TreeRenderer.
Looked into the CollectionModel trying to override some properties with 
goal to simulate the depth of my projects (and then in the view add some 
spacer to push the subprojects to the rights, but too hackish for me...)

After several days trying to learn your code, trying extending or 
building my own code, i came to the result that a lot of your
functionnalities are package protected and that i can't easily extend 
the UIXIterator or even the UIXHierarchy or the UIXCollection without 
losing lot of good pattern and code. (and i haven't a good understanding 
of the concepts)

The rewriting of the TreeRenderer was unsuccesful too. Too many concepts 
that i don't understand. Too many things that i don't know if i can 
safely ignore. And not even sure how to (and if i can) tell adf to use 
my Renderer only for that page for the af:tree component.

The other solution (some found on the net) seem to hackish and absolutly 
not safe, so don't want to go that way

Please, could you tell me the right way (patterns or concepts) to do that.
Which direction can i take to achieve my requierement. Is there 
somewhere a good documentation where i could find some answers.

I know it's certainly not the good place to ask, and it's a very long 
mail but please could you take some time to explain me how to handle the 
trinidad (and adf) framework.

Thanks for your time and i hope you could help.


View raw message