Hey,

I was wondering why name is a required attribute in the constructor-arg tag. I prefer using <constructor-arg/> over <property/> (especially when the components already exist) but I'm uncomfortable binding the ColdSpring XML to the names of Init()'s arguments since I always call functions as an ordered list and usually consider the argument names to be hidden from the user.

Why not just call the Init() with the arguments in the order as they are defined in the XML file? This is supported in Spring and according to the Spring docs it is the preferred method of using constructor-arg. (they actually recommend specifying the optional index attribute on constructor-arg - e.g. index="0"). See http://static.springframework.org/spring/docs/1.1.5/reference/beans.html#d0e745

Would this just be too messy to implement in CF? I imagine it could be done with Evaluate() or with a switch statement for every possible length of arguments (e.g. 1-argument Init(), 2-argument Init(), etc.).

Thanks!
Jon



Reply via email to