--
You received this message because you are subscribed to the Google Groups "ColdFusion on Wheels" group.
To view this discussion on the web visit https://groups.google.com/d/msg/cfwheels/-/mkXjFv6S7GsJ.
To post to this group, send email to cfwh...@googlegroups.com.
To unsubscribe from this group, send email to cfwheels+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cfwheels?hl=en.
The getCart function puts together the client's shopping cart by making calls to various functions within the cart controller. I guess I really just want to be able to group things together instead of putting things that need to be shared in some obscure place (ie, base controller, functions.cfm, etc)
On Thu, Jul 26, 2012 at 4:17 PM, Andy Bellenie <andybe...@gmail.com> wrote:
Why can't the getCart() method go in the base controller? And what does it do?
On 26 July 2012 22:14, Tim Badolato <t...@dreamstonemedia.com> wrote:
The reason I'd like call from other controllers is readability. Let me explain:
Say I have a getCart function inside of a Cart controller. This function needs to be accessible from everywhere so I move it to the functions.cfm file. Months later I come back and say "Hey, where'd I put that pesky getCart function". Well logically I would go "Oh, of couse it's probably in the cart controller with the rest of the cart functions". But when I don't find it I do I search and finally find it in the functions.cfm file with a mish mash of a bunch of other random functions.
The above is my current thinking on this. My understanding of wheels controllers is probably the culprit here but I am learning so please set me straight :)
Thanks!
On Thu, Jul 26, 2012 at 4:05 PM, Andy Bellenie <andybe...@gmail.com> wrote:
You never have no choice... if the function is required from a different controller, it's probably in the wrong place.If you really need to call the same function from multiple controllers... put in in the base controller.cfc
On 26 July 2012 22:03, Tim B <t...@dreamstonemedia.com> wrote:
Well I've searched and even found the question but no answer.
Say you absolutely had no choice but to call a function from another controller. How would you do it?
Also, I thought I heard that public functions were accessible from anywhere in the application.
As always help is very much appreciated.
Thanks, Tim
--
You received this message because you are subscribed to the Google Groups "ColdFusion on Wheels" group.
To view this discussion on the web visit https://groups.google.com/d/msg/cfwheels/-/mkXjFv6S7GsJ.
To post to this group, send email to cfwh...@googlegroups.com.
To unsubscribe from this group, send email to cfwheels+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cfwheels?hl=en.
--
You received this message because you are subscribed to the Google Groups "ColdFusion on Wheels" group.
To post to this group, send email to cfwh...@googlegroups.com.
To unsubscribe from this group, send email to cfwheels+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cfwheels?hl=en.
--
You received this message because you are subscribed to the Google Groups "ColdFusion on Wheels" group.
To post to this group, send email to cfwh...@googlegroups.com.
To unsubscribe from this group, send email to cfwheels+unsubscribe@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "ColdFusion on Wheels" group.
To post to this group, send email to cfwh...@googlegroups.com.
To unsubscribe from this group, send email to cfwheels+unsubscribe@googlegroups.com.
Agreed. Inject a service into both controllers and let the service do the work.
To view this discussion on the web visit https://groups.google.com/d/msg/cfwheels/-/csVaaJApQ1QJ.
To post to this group, send email to cfwh...@googlegroups.com.
To unsubscribe from this group, send email to cfwheels+u...@googlegroups.com.
To unsubscribe from this group, send email to cfwheels+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cfwheels?hl=en.
--
You received this message because you are subscribed to the Google Groups "ColdFusion on Wheels" group.
To post to this group, send email to cfwh...@googlegroups.com.
To unsubscribe from this group, send email to cfwheels+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cfwheels?hl=en.
--
You received this message because you are subscribed to the Google Groups "ColdFusion on Wheels" group.
To post to this group, send email to cfwh...@googlegroups.com.
To unsubscribe from this group, send email to cfwheels+unsubscribe@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "ColdFusion on Wheels" group.
To post to this group, send email to cfwh...@googlegroups.com.
To unsubscribe from this group, send email to cfwheels+unsubscribe@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "ColdFusion on Wheels" group.
To post to this group, send email to cfwh...@googlegroups.com.
To unsubscribe from this group, send email to cfwheels+unsubscribe@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "ColdFusion on Wheels" group.
To post to this group, send email to cfwh...@googlegroups.com.
To unsubscribe from this group, send email to cfwheels+unsubscribe@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "ColdFusion on Wheels" group.
To post to this group, send email to cfwh...@googlegroups.com.
To unsubscribe from this group, send email to cfwheels+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cfwheels?hl=en.
--
You received this message because you are subscribed to the Google Groups "ColdFusion on Wheels" group.
To post to this group, send email to cfwh...@googlegroups.com.
To unsubscribe from this group, send email to cfwheels+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/cfwheels/-/6qxsnXYFnK4J.
To unsubscribe from this group, send email to cfwheels+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/cfwheels/-/pBrx2YSTz5gJ.
To post to this group, send email to cfwh...@googlegroups.com.
To unsubscribe from this group, send email to cfwheels+u...@googlegroups.com.