RE: [coldbox:10593] Re: Upgrade to CB 3.1 from 3.0 Wirebox dsl injection to setters seems to have changed

Luis uses the invokerMixin of the MixerUtil in WireBox which supports a single argument or an argument collection. However, I believe that WireBox always only passes in a single argument.

The invokerMixin uses cfinvoke and unfortunately I don’t think you can pass in un-named arguments with cfinvokeargument. He would probably have to use evaluate to do that.

I’m actually unsure of how you got that behavior on 3.0 since that’s the version I have in front of me right now, and it looks for all the world like it uses named arguments named after the property. Didn’t try it though, just reading the code…

~Brad

Luis, Ade’s question never really did get answered. What are your thoughts about:

  1. Allowing WireBox config to specify the argument name for a setter
  2. OR passing in the argument position so the name doesn’t matter.
    I’m not positive exactly what we changed from 3.0 to 3.1 that modified the behavior, but I think Ade has a decent point about using 3rd party libraries who may have setters he cannot or does not wish to change.

I know you’re following the standard “Java” way of doing things, but I can’t actually find any official web page that says the parameter name for a setter MUST be the name of the property.

Thanks!

~Brad

Yea seems the solution might be to add another argument to the setter method: argName.

Or just forget about the arg name and pass it positionally and changing to an evaluate.

can you guys create a ticket for this

Luis F. Majano
President
Ortus Solutions, Corp
www.ortussolutions.com

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Social: twitter.com/lmajano facebook.com/lmajano

Thanks guys, much appreciated.

http://www.assembla.com/spaces/coldbox/tickets/1250-allow-setter-injection-to-specify-argument-names-or-pass-positionally

~Brad