I can't seem to find anything about this online so hope this is the
right place to ask
Is there a way with Lightwire that I can dynamically pass an argument
when the bean is called?
Scenario I have is I've got an Array Iterator and I want to pass in
the array on init().
Call the getPlugin('ioc') or getBean doesn't seem to give me any
option to do that.
As a workaround for now I've setup a new method called setArray() and
I'm passing it into that after I've called in the object. Not the way
I would do it if I wasn't using Lightwire but hey :-).
There is no way to do this right now via coldspring, or lightwire. You can however, via Model Integration, tell the getModel() call to NOT execute the init via the executeInit=false argument.
In the next release, once wirebox 1.0 is done, you will be able to pass in constructor arguments via the retrieval call like this: