Announcement Announcement Module
Collapse
No announcement yet.
Use JSTL <c:forEach with <spring:nestedPath Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Use JSTL <c:forEach with <spring:nestedPath

    The case is like this: A Spring Framework and Web Flow based J2EE web Application.

    a) The Action Class referred in the web flow is called TestFlowAction in which:

    setFormName('testFlowForm');
    setFormObject(TestFlowForm.class);


    b) In TestFlowForm.java, which has a List attribute:

    List lstDataResult;

    /* lstDataResult contains a result bean named ResultBean.java. This ResultBean has serveral attributes: name, title. */


    c) In the JSP page, I try to display the data using the JSTL's <c:forEach
    tag:

    <spring:nestedPath path="testFlowForm">

    <c:forEach var="Row" items="${testFlowForm.lstDataResult}" varStatus="status">
    >

    <spring:bind path="ResultBean">
    ???What should be here. I need to output .name
    </spring>

    </spring:nestedPath>

    Problem: When run, it seems ${testFlowForm.lstDataResult} always cause problem, which can not get resolved.

    Then what is the correct way to make the spring nestedPath tag and the JSTL foeRach tag work together?


    Thanks

    Scott
Working...
X