commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Lario <la...@mindspring.com>
Subject [jelly] formatting out issue
Date Tue, 20 Jan 2004 21:00:42 GMT
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


Mime
View raw message