Can someone please help me to get the print to work. I keep trying to use the fmt, or the c:out tags, but nothing is actually printing the value of ${product} as converted from the ApplicationResources value.
-------------------- Mick Knutson Wells Fargo Business Direct (415) 222-1020 "This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation." -------------------- -----Original Message----- From: Kishore Senji [mailto:[EMAIL PROTECTED] Sent: Thursday, February 03, 2005 1:23 PM To: Struts Users Mailing List Subject: Re: Help with logic tags, and commas please. > <c:out > value="${creditApplicationListDto.displayProducts[${key}]}"/>, I would return a collection from teh DTO for only true values. The reason is JSTL cannot invoke the keySet() method on the Map (Since the method doesn't confine to JavaBean specification) public Collection getDisplayProducts() { Collection c = new ArrayList(); if(Boolean.TRUE.equals(this.getBusinessLine())){ c.add("label.applist.bln"); } if(Boolean.TRUE.equals(this.getBusinessCard())){ c.add("label.applist.bcard"); } if(Boolean.TRUE.equals(this.getSecuredCard())){ c.add("label.applist.seccard"); } if(Boolean.TRUE.equals(this.getEquipmentExpress())){ c.add("label.applist.equipmentExpress"); } if(Boolean.TRUE.equals(this.getSbaLineOfCredit())){ c.add("label.applist.sBALineOfCredit"); } if(Boolean.TRUE.equals(this.getSbaTermLoan())){ c.add("label.applist.sBATermLoan"); } if(Boolean.TRUE.equals(this.getBusinessLoan())){ c.add("label.applist.BusinessLoan"); } if(c.size() < 1 ) { c.add("label.applist.NoProducts"); } return c; } <c:forEach items="${creditApplicationListDto.displayProducts}" var="product" varStatus="status"> <c:choose> <c:when test="${not status.last}"> <c:out value="${product}"/>, </c:when> <c:otherwise> <c:out value="${product}"/> </c:otherwise> </c:choose> </c:forEach> Assuming that "label.applist.*" is only a key to the actual label in the properties file you might want to use <fmt:message/> to render the actual label --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]