passing an array of structs as a contructor argument

51 views
Skip to first unread message

Chris Blackwell

unread,
Aug 30, 2012, 4:17:30 PM8/30/12
to coldspring-users
Hi all,

With CS2 and the util schema i'm trying to define a bean which has an array of structs as a constructor argument, here's the bean

<bean id="Config_ImageCache" class="model.config.Config_ImageCache">
<constructor-arg name="CacheUrl" value="//localhost/_product_image_cache" />
<constructor-arg name="CachePath" value="/_product_image_cache" />
<constructor-arg name="Sizes">
<util:list>
<util:map>
<entry key="id" value="large" />
<entry key="maxWidth" value="195" />
<entry key="maxHeight" value="" />
</util:map>
</util:list>
</constructor-arg>
</bean>


Which throws the error "No matching Method/Function for String.getValue() found"

does the xml look correct? is it a bug? might it be Railo related? (i'm using 4.0.1 beta)

Cheers, Chris

Mark Mandel

unread,
Aug 30, 2012, 7:25:54 PM8/30/12
to coldspri...@googlegroups.com
That is weird!

In theory that should work, lemme through together a test case, see if I can replicate it.

Mark

--
You received this message because you are subscribed to the Google Groups "ColdSpring-Users" group.
To post to this group, send email to coldspri...@googlegroups.com.
To unsubscribe from this group, send email to coldspring-use...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/coldspring-users?hl=en.



--
E: mark....@gmail.com
T: http://www.twitter.com/neurotic
W: www.compoundtheory.com

2 Devs from Down Under Podcast

Mark Mandel

unread,
Aug 30, 2012, 8:44:02 PM8/30/12
to coldspri...@googlegroups.com
A straight nested map works fine... on CF9 and Railo 3.x

<util:list id="nested-map">
<util:map>
<entry key="id" value="large" />
<entry key="maxWidth" value="195" />
<entry key="maxHeight" value="" />
</util:map>
</util:list>

Maybe as a nested map as a constructor arg?

Sounds like I may need to set up Railo4 as a test env.

Mark

Mark Mandel

unread,
Sep 4, 2012, 12:11:31 AM9/4/12
to coldspri...@googlegroups.com
Chris,

I'm struggling to reproduce this on my local environment, but haven't had time yet to get Railo 4 installed.

Is it possible for you to put together a small test bed for me to run on my environment that throws the exception you are getting?

Thanks,

Mark

Chris Blackwell

unread,
Sep 4, 2012, 2:43:13 PM9/4/12
to coldspri...@googlegroups.com

hi mark,
I will do, but won't be for a couple of weeks
cheers chris

Reply all
Reply to author
Forward
0 new messages