constructor-arg / value elements

251 views
Skip to first unread message

Gavin Baumanis

unread,
Oct 10, 2013, 10:35:24 PM10/10/13
to coldspri...@googlegroups.com
I am not sure if this is a bug or just me using it wrong;

I tried the following in the coldspring.xml;

<bean id="physician" class="com.orm.physiciansingleton="false">
    <!-- physician is usertype 4 -->
    <constructor-arg name="userType"><value="4" /></constructor-arg>
</bean

and I got this error;
Element type "value" must be followed by either attribute specifications, ">" or "/>".

which is weird because it is set as self-closing element.

I found I had to use;

<constructor-arg name="userType"><value>4</value></constructor-arg>



Mark Mandel

unread,
Oct 10, 2013, 10:58:13 PM10/10/13
to coldspri...@googlegroups.com
If you're using CS2, you can also do 

<constructor-arg name="userType" value="4" />


If you are using an XML editor with XSD support, it should show you all this.

Mark


--
You received this message because you are subscribed to the Google Groups "ColdSpring-Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to coldspring-use...@googlegroups.com.
To post to this group, send email to coldspri...@googlegroups.com.
Visit this group at http://groups.google.com/group/coldspring-users.
For more options, visit https://groups.google.com/groups/opt_out.



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

2 Devs from Down Under Podcast

Gavin Baumanis

unread,
Oct 11, 2013, 1:47:08 AM10/11/13
to coldspri...@googlegroups.com
Thanks Mark,
I am using CS 1.2 - Unfortunately I cannot use CS 2.0

Chris Blackwell

unread,
Oct 11, 2013, 3:51:15 AM10/11/13
to coldspring-users
Its not weird, <value="4" /> is invalid xml

<node attribute=value /> 
not 
<node=value />


Reply all
Reply to author
Forward
0 new messages