> -----Original Message-----
> From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
> Sent: Monday, May 20, 2002 6:37 PM
> To: 'Struts Users Mailing List'
> Subject: RE: dynamic index in indexed property
>
>
> Looks okay, except Struts is looking for double quotes
> enclosing the attribute values and an array index is an int
> (you are passing a String). You could try:
>
> <bean:write name="analysisWizard"
> property="analysisCriteria[<%= new Integer(
> request.getParameter('listID')).intValue()%>].name"/>
I don't think you can use single quotes around the arg to
getParameter(). That's java code and Java wants double qoutes on
strings.
Do you really need to convert to Integer? Say I was just using a number
as the index: property="analysisCriteria[1]". Isn't "1" just part of the
string and not a number?
>
> Mark
>
> -----Original Message-----
> From: Dennis Doubleday [mailto:[EMAIL PROTECTED]]
> Sent: Monday, May 20, 2002 6:01 PM
>
> Shouldn't this work? (Struts 1.1b, Tomcat 4.0.4)
>
> <bean:write name="analysisWizard"
> property='analysisCriteria[<%=
> request.getParameter("listID")%>].name'/>
>
> I get:
>
> java.lang.IllegalArgumentException: Invalid indexed property
> 'analysisCriteria[<%= request'
>
> --
> To unsubscribe, e-mail:
> <mailto:struts-user-> [EMAIL PROTECTED]>
> For
> additional commands,
> e-mail: <mailto:[EMAIL PROTECTED]>
>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>