Ignore this one,

It seems that Struts doesn't know to go into the Hashtable entry and just
get the value,

Very strange, but basically it was looking to cast the whole entry rather
than just the value.

Will have to convert it to use a list instead

STeve

-----Original Message-----
From: Steve Vanspall [mailto:[EMAIL PROTECTED]
Sent: Friday, 7 March 2003 10:08 AM
To: Struts User Mailing List
Subject: logic iterate with nested class (I think that's the term)


Hi there,

this  is my problem,

I hap a Map, namely a hashtable, that I want struts to iterate through,

Now the bean class of each entry in the map is
com.crm.util.TemplateBeans.IMGTemplateBean

where TemplateBeans is a class itself.

using the following tag

<logic:iterate name="RenderHTMLForm" id="imfFile"
type="com.crm.util.TemplateBeans.IMGTemplateBean" property="imageFields">

causes a ClassCastException, even though, I have checked and the object
class matches.

I then tried

<logic:iterate name="RenderHTMLForm" id="imfFile"
type="com.crm.util.TemplateBeans$IMGTemplateBean" property="imageFields">

this didn't work, I got a error stating that It was expecting a value of
class

com.crm.util.TemplateBeans.IMGTemplateBean but got one of type
java.lang.Object

If I can, I would like to keep these classes nested under
com.crm.util.TemplateBeans, just of eas of use and neatness. Is there a way
to properly reference these classes in the iterate tag??

Thaks in advance

Steve



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