This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes JSF and the fly likes JSF, Facelets & Recursion Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "JSF, Facelets & Recursion" Watch "JSF, Facelets & Recursion" New topic

JSF, Facelets & Recursion

Roel De Nijs

Joined: Jul 19, 2004
Posts: 8419

Hello all,

I'm working with JSF (MyFaces) and Facelets. I've created a custom facelet (more precise: via a seperate xhtml-file), containing a tomahawk data-table

But one big problem: in this file there is a reference to itselfs, because i have to represent a custom tree structure (with checkboxes to delete and create new nodes/subtrees). so it's seems logical to solve this recursively, but if i do so, i get a stack-overflow-error.

I'm searching and surfing the net for 2-3 days looking for a solution to this problem, but apparently it doesn't exist (while in my opinion this is a very straight forward problem).

and i tried everything i know of:
- using the rendered-attribute as the step-out-endless-loop thing but i've read that the component tree contains all components and that afterwards the rendered ones are really rendered and the others aren't, so that's not a solution
- i also tried with some jstl and the ifhandler, but also learned that there is a big difference in when the expression is evaluated.
- also tried with some dynamic form of the jsfc-attribute, resulting in a "ui : remove" if the component hadn't to be rendered, but also no luck
- ...

So i was wondering: is there a solution for this or some other things i could try, because it's really frustrating me

any tips, hints and/or suggestions are more than welcome
thanks in advance

SCJA, SCJP (1.4 | 5.0 | 6.0), SCJD
Roel De Nijs

Joined: Jul 19, 2004
Posts: 8419

I made a work-around which is described (together with some basic fundamentals about JSF & facelets) @ link-to-nabble-forum
I agree. Here's the link:
subject: JSF, Facelets & Recursion
It's not a secret anymore!