Use of bean in view

9 views
Skip to first unread message

Tom McNeer

unread,
Dec 5, 2013, 4:47:27 PM12/5/13
to model...@googlegroups.com
Hi,

Before you say "you shouldn't be doing that," I know.

I could spend a long time explaining why it would be most expeditious in this particular, narrow case. But it would just confuse things.

So my question is, is there a practical way to access a service bean created from ColdSpring inside a view?

I understand the way "helpers" work, but the bean in question is actually a Java library instantiated with Javaloader via ColdSpring, so it's not as simple as a normal CFC.

I also understand that I could create a parent bean factory with ColdSpring and point M-G to it, and then be able to access beans through something like application.beanFactory.getBean(). But again, there are reasons why I'm trying to avoid that.


Thanks for any suggestions.

--
Thanks,

Tom

Tom McNeer
MediumCool
http://www.mediumcool.com
1735 Johnson Road NE
Atlanta, GA 30306
404.589.0560

Dan Wilson

unread,
Dec 5, 2013, 5:04:17 PM12/5/13
to model...@googlegroups.com
Set the ColdSpring bean into the event scope and it'll be there.

DW

Thursday, December 05, 2013 4:47 PM
--
--
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 model...@googlegroups.com
To unsubscribe from this group, send email to
model-glue+...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/model-glue?hl=en
---
You received this message because you are subscribed to the Google Groups "model-glue" group.
To unsubscribe from this group and stop receiving emails from it, send an email to model-glue+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Tom McNeer

unread,
Dec 5, 2013, 6:31:41 PM12/5/13
to model...@googlegroups.com
Hi Dan,

That makes perfect sense. And it was the first thing I tried.

Why didn't it work? Because I made a mistake I've made many, many times since MG 1.0:

I wrote "argument.event.setValue()" -- "argument," singular, not plural.

I'm still getting errors, but they revolve around some pathing issues and the use of Javaloader and JavaloaderFactory. Sorry to have bothered you.

Dan Wilson

unread,
Dec 5, 2013, 7:03:33 PM12/5/13
to model...@googlegroups.com

No problem. We all need a second pair of eyes from time to time.

--
Reply all
Reply to author
Forward
0 new messages