Here's a tutorial explaining this in greater detail.
http://www.nodans.com/index.cfm/2007/1/26/So-you-want-to-create-a-ModelGlueUnity-application--Part-5-

That's the MG 2 perspective.

If you are using MG 3, look at using beans injection like this:
http://docs.model-glue.com/wiki/HowTos/HowToUseBeanInjection#BeanInjection

That'll replace the getModelGlue().getBean() bit in the code above. It'll
also help you document your controller dependencies in a more
straightforward manner.

I noticed some interesting bits in the code you posted earlier. For example,
your bean code snippet used the THIS scope. Using the THIS scope is not a
recommended way of sharing variables. I assume you are ramping up on Model
Glue, ColdSpring and OO in general. In that case, you might find it very
helpful to go through our training. This training material is free,
self-guided and will walk you through the main concepts and techniques in
building a modern Model Glue application.
http://docs.model-glue.com/wiki/Training#WelcometoModel-Glue3Training

Keep asking questions on the list. We like them :)


DW


DW


On Fri, Jan 28, 2011 at 10:01 AM, Nathan Stanford II <[email protected]>wrote:

> No problem :-)
>
> I was worried that might be the case. Ok here we go, I have a model
> object called layoutGateway, and what I want is in a method called
> getAll_Paged to pass it an instance of the layout bean. I am just
> unsure how to go about this the coldspring way, and this question may
> be more appropriate for a coldspring form, not sure. Anyway here is
> how I would normally call the bean:
>
> <cfset obj = new mv2.model.layout.layout() />
>
> But I want to do that the ColdSpring MG way, while at the same time
> not tying my model to MG. I hope that makes sense, not sure exactly
> how to word it :-/
>
> Thanks for any help.
>
> Nathan Stanford II
>
> --
> Model-Glue Sites:
> Home Page: http://www.model-glue.com
> Documentation: http://docs.model-glue.com
> Bug Tracker: http://bugs.model-glue.com
> Blog: http://www.model-glue.com/blog
>
> You received this message because you are subscribed to the Google
> Groups "model-glue" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]<model-glue%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/model-glue?hl=en
>



-- 
Plutarch - "The mind is not a vessel to be filled but a fire to be kindled."

-- 
Model-Glue Sites:
Home Page: http://www.model-glue.com
Documentation: http://docs.model-glue.com
Bug Tracker: http://bugs.model-glue.com
Blog: http://www.model-glue.com/blog

You received this message because you are subscribed to the Google
Groups "model-glue" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/model-glue?hl=en

Reply via email to