You can cast the "id" element by using the "key=" attribute of <logic:iterate">. Use the fully qualified name of the actual object type.
HM -----Original Message----- From: Luca Zago [mailto:[EMAIL PROTECTED]] Sent: 17 September 2002 11:55 To: Struts Users Mailing List Subject: Scripting variables outside iterate tag Hi, probably it's a not so hard question, but really I cannot find a solution to this simple problem. This is the example of struts documentation: | <logic:iterate id="element" name="myhashtable"> Next element is <bean:write name="element" property="value"/> </logic:iterate> everything works fine. But I want to use the bean |with the key 'element', inside a scriptlet to do something like this: <html:select property='userUri'> | <logic:iterate id="element" name="myhashtable">| <html:option value='<%= |element|.getName()%>'><bean:write name='|element|' property='name'/></html:option> </|logic:iterate> </html:select>| but I got obviously an exception becaus java.lang.Object doesn't contain getName(). The problem is that even the explicit conversion to my bean, doesn't work.. Somebody has some ideas? Thank you in advance. Luca -- To unsubscribe, e-mail: <mailto:[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]>

