since the DynaActionForm is a Map you need to access the property name with
a key. In order to access a key value in a map with JSTL you need to use the
bracket/quote combo. I have never done this... but try the syntax i have
below.

<c:out value="${mapserviceSummaryForm['mapserviceList'][0].name}" />

Also, here are some jstl references:
http://www.manning.com/bayern/appendixA.pdf
http://rs1.vtu.lt:8080/jstl-examples/index.html

Brandon Goodin
Phase Web and Multimedia
PO Box 85
Whitefish MT 59937
P (406) 862-2245
F (406) 862-0354
[EMAIL PROTECTED]
http://www.phase.ws


-----Original Message-----
From: John C Cartwright [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 13, 2003 1:26 PM
To: [EMAIL PROTECTED]
Subject: JSTL and DynaActionForm


Hello All,

I'm trying to understand why I cannot access the properties in a
DynaActionForm bean via JSTL (e.g. <c:out>).  For example, given a
DynaForm configured thusly:

       <form-bean
          name="mapserviceSummaryForm"
          dynamic="true"
          type="org.apache.struts.action.DynaActionForm">
          <form-property name="mapserviceList" type="java.util.ArrayList"/>
       </form-bean>


I am trying to access the name property of one of the beans in the
ArrayList from JSP.  This works fine:

<bean:write name="mapserviceSummaryForm"
property="mapserviceList[0].name" />

but this does not:

<c:out value="${mapserviceSummaryForm.mapserviceList[0].name}" />

I don't think that it's a scope problem or the bean not being populated
because this:

<c:out value="${mapserviceSummaryForm}" />

produces this (there's only one bean in the ArrayList):

DynaActionForm[dynaClass=mapserviceSummaryForm,mapserviceList={basicworld3}]


Thanks for any help or clarification on what I'm doing wrong!

-- john




---------------------------------------------------------------------
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]

Reply via email to