Hi,
Thank all 3 of you for
your quick and clear answers. And it could be true that this problem is caused
by the developer, because i’m a newbie
So here is my facelet:
<html
xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:c="http://java.sun.com/jstl/core"
xmlns:t="http://myfaces.apache.org/tomahawk"
xmlns:d="http://www.donaldson.be/facelets">
<!--
PARAMETERS NEEDED:
- entity: the entity containing the collection used for
the data-table
- isOrderItem: boolean to indicate if it is a datatable
for order-items
-->
<ui:composition>
<t:dataTable
var="item"
value="#{ (isOrderItem==true) ?
entity.orderItems : entity.subWorkorders }"
preserveDataModel="false"
rowIndexVar="rowIndex"
style="width: 100%;">
<h:column>
<t:div style="#{ (isOrderItem==true) ? 'padding:0px
0px 0px 25px;' : '' }">
<t:div styleClass="#{ (rowIndex%2==0) ? 'evenRow' :
'oddRow' }" style="padding:3px 0px 3px 0px;" >
<input type="checkbox" name="selectedItems" value="#{item.nodeId}" />
<h:outputLink value="_javascript_:toggleLayer('div_#{item.nodeId}');"
rendered="#{item.orderItemsCount != 0}">
LINK
</h:outputLink>
<h:outputLabel rendered="#{item.orderItemsCount ==
0}">
NO LINK
</h:outputLabel>
</t:div>
<div id="div_#{item.nodeId}" style="display:none; padding:0px 0px
10px 0px;">
<d:workorder-tree entity="#{item}" isOrderItem="true" />
</div>
</t:div>
</h:column>
</t:dataTable>
</ui:composition>
</html>
And in another
xhtml-page I have
<d:workorder-tree entity="#{WorkorderBean.woEntity}" isOrderItem="false" />
Some more explanation:
-
the first call to this fragment displays the sub-workorders
-
each sub-workorder can contain a list of order-items
-
each order-item can contain a list of order-items
-
if an order-item contains an empty list, the div with id="div_#{item.nodeId}" must be
empty or not rendered
So could someone help to
determine what’s wrong with the use and reference my own el variables
which causes recursion not to work.
Any help greatly
appreciated
Many thanks
Kind Regards
Roel
Roel De Nijs
Consultant
Business Solutions
& Development
E-mail adres: Roel.DeNijs@xxxxxx
MSP n.v.
Veldkant 7
2550 Kontich
Tel : +32 (0)3 454 27 28
Fax :+32 (0)3 454 27 88
http://www.msp.be - info@msp. be
Ondernemingsnummer:
BTW-BE-0870.749.501
The information
contained in this transmission is proprietary and confidential and is intended
only for the use of the individual or entity named above. If the reader of this
message is not the intended recipient, the reader is notified that any
consideration, dissemination or duplication of this communication is strictly
prohibited.
From:
jacob@xxxxxxxxxx [mailto:jacob@xxxxxxxxxx]
Sent: maandag 21 mei 2007 19:49
To: users@xxxxxxxxxxxxxxxxxxxxx
Subject: RE: JSF, Facelets &
Recursion
Everytime this issue has
come up, it's been traced back to a developer issue with how they were
referencing their own EL variables, nothing to do with Facelets/EL/JSF itself.
|
|
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 :censored:
any tips, hints and/or suggestions are more than welcome
thanks in advance
Roel
|
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxxxxxxx