As other people have described, the "arg0" attribute is taken as a literal value, or
as a scriptlet value. It isn't interpreted as a bean property.
This is a good reason to use Struts-EL and the JSTL. Your example would look like
this, using Struts-EL:
<logic-el:iterate id="item" name="myForm" property="x">
<bean-el:message key="somevalue" arg0="${item}"/>
</logic-el:iterate>
Or even more JSTL'ish:
<c:forEach var="item" collection="${myForm.x}">
<bean-el:message key="somevalue" arg0="${item}"/>
</c:forEach>
> -----Original Message-----
> From: Mohan Radhakrishnan [mailto:[EMAIL PROTECTED]]
>
> I am trying to iterate over values in my form bean.
>
> <logic:iterate id="item" name="myForm" property="x">
> <bean:message key="somevalue" arg0="item"/>
> </logic:iterate>
>
> The above prints the string "item" for the replacement value.
>
> Shouldn't it print the value iterated over the String[]
> which is the type
> of the property in my form bean ?
>
> Even bean:write throws " bean not found in scope null " error.
>
> "myForm" is in the session scope according the config file.
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>