Announcement Announcement Module
Collapse
No announcement yet.
Bind Tag - Accessing list items by index - Websphere Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Bind Tag - Accessing list items by index - Websphere

    Below is a simplified version of the code that I have. It works fine for everyone on my team except for one developer.

    HTML Code:
    <c:forEach var="product" varStatus="counter" items="${wrapper.order.items}" >
    <s:bind path="wrapper.order.items[${counter.index}].quantity">
    </c:forEach>
    The error msg that he gets is:

    Error 500: org.springframework.beans.NotReadablePropertyExcep tion: Invalid property 'order.items[0]' of bean class [com.....model.Wrapper]: Bean property 'order.items[0]' is not readable or has an invalid getter method: Does the return type of the getter match the parameter type of the setter?
    It seems like the compiler does not understand the syntax for accessing a list item by index. It seems to think that 'items[0]' is a property of the order object. Again, there's only one guy who has this issue. It works fine for everyone else.

    What could be the reason for this error message? I'm guessing it's something with the JSP compiler, but I'm kind of new to the WebSphere, so I'm not sure where to look.

    We're using RAD 7.5.5.4 with WebSphere v7.0. J2EE v 1.4

  • #2
    try to use this
    Code:
    <c:forEach var="product" varStatus="counter" items="${wrapper.order.items}" >
    <s:bind path="product[${counter.index}].quantity">
    </c:forEach>

    Comment

    Working...
    X