Bug 41023 - forEach : items + first char upper case
Summary: forEach : items + first char upper case
Alias: None
Product: Taglibs
Classification: Unclassified
Component: Standard Taglib (show other bugs)
Version: 1.1
Hardware: PC Windows XP
: P5 enhancement (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
Depends on:
Reported: 2006-11-23 01:52 UTC by alexandre
Modified: 2006-12-06 07:39 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description alexandre 2006-11-23 01:52:28 UTC
using tomcat 5.5.17 + jstl 1.1 :
<c:out value="${requestScope.objectA.propertie1}" />
work. but,
<c:forEach var="foo" items="${requestScope.objectA.lPropertie2}">
doesn't work, i have to write (first char of List lPropertie2 to upper case)
<c:forEach var="foo" items="${requestScope.objectA.LPropertie2}">
Class A definition : {
  private String propertie1;
  private ArrayList lPropertie2;

  public String getPropertie1(){..}
  public ArrayList getLPropertie2(){..}
Comment 1 Henri Yandell 2006-11-29 10:19:33 UTC
I'm pretty sure this will turn out to be an issue with the bean spec rather than
a code bug. As far as I know, the bean spec views the L in 'setLProperties' as
an acronym rather than a word of single size. Therefore it keeps it capitalised.

I've seen similar bugs reported in Spring and BeanUtils.
Comment 2 Kris Schneider 2006-11-29 10:27:49 UTC
Henri's right. In accordance with the JavaBeans spec, the method:

public ArrayList getLPropertie2(){..}

exposes a property called "LPropertie2". You can either use that or create a
BeanInfo class if you'd like to change the property name. This has nothing to do
with the taglib.
Comment 3 alexandre 2006-12-06 07:39:34 UTC
thank you, the next time I will seek better before disturbing you.