RE: [coldbox:12870] getWireBox instance call from onLoad in a module

Should be something like this in your binder config:

map(“Transfer”).to(“model.com.transfer”).inCacheBox(timeout=0,provider=“default”,key=“Transfer”);

You can find more info here:

http://wiki.coldbox.org/wiki/WireBox.cfm

~Brad

OK. Yep… I knew that much.

The thing is I’ve been up and down the wirebox wiki page and I don’t see any reference as to where the binder config lives or how I tell ColdBox to look for a wirebox binder config.

When I look at what is available in the configuration method in the coldbox.cfc there is no map() object or method available, so that is not the right place to be putting this line of code.

When I map models in modules I use “binder.map()” in the moduleconfig.cfc, but I’m not sure where you’d put these things at an application level.

Also, once I’ve created this mapping how do I tell the object about the various config items that the transfer factory needs.

I’m really sorry if I’m being utterly dim, but I’m really struggling to find any comparative code for moving from ColdSpring set up, to interceptor version to using purely wirebox. The lines you suggest Brad just don’t, in my mind, equate to the loading and configuration that I’ve previous used with Transfer for the last 5 years or so, so I’m baffled and confused. :-/

Stephen

Sorry for the cranky email before. Rubbish morning…

Replying to my own email…

The bit I was missing (and perhaps could do with a line in the Wirebox wiki page) was the wirebox config section of the coldbox.cfc http://wiki.coldbox.org/wiki/ConfigurationCFC.cfm#wirebox
This mentions that the binder config setting points at the Wirebox.cfc file in the config folder by default. The default WireBox.cfc that I found there makes reference to all the bits I was missing/not completely understanding. (Perhaps a view of a complete default wirebox.cfc from the wirebox wiki page might be useful?)

Having found this I then found the mapped DSL example http://wiki.coldbox.org/wiki/WireBox.cfm#Mapping_DSL_Examples which contains Transfer-ORM config mapping as well as the Transfer mapping itself.

I haven’t tried it all yet, but these two bits do seem to fill in the blanks I had.

Thanks all for your help.

Stephen

Stephen,

I would really love a list from you of what we can improve in terms of your issues. I definitely understand frustrations and it is INCREDIBLY hard to cover all aspects of migrations, new startups, etc.

So I am really really interested in making this much easier for the next guy around (Sorry !) So what can we improve upon? What sections in the docs should we enhance for this?