You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Robert Lario <la...@mindspring.com> on 2004/01/20 22:00:42 UTC
[jelly] formatting out issue
I have a simple script that checks if an attribute is in a set and if so prints the name. I am having trouble with the output format. when the condition is false I don't want any output, even a blank line. Here is the script, sample data and output. thanks
<j:forEach items="${object.allAttributes}" var="attribute" trim="false">
start
<j:if test="${attribute.set}" trim="true">
attribute.name
</j:if>
end
</j:forEach>
given allAttributes returns:
((set:true,name:one)
(set:false,name:two)
(set:false,name:three)
(set:true,name:four)
(set:false,name:five)
(set:true,name:six))
the output is :
start
one
four
six
end
What I expected and need is :
Start
one
four
six
end
anybody have a suggestion on what I need to do.
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org