Calling functions inside GW.cfc from Bean.cfc

5 views
Skip to first unread message

Clifford Moon

unread,
Apr 25, 2012, 10:15:56 AM4/25/12
to model-glue
Greetings,

Is there any way to call functions located in a file mySharesGW.cfc
from within mySharesBean.cfc.

I have the following setup in my coldspring.xml file:

<bean id="mysharesBean" class="it.myshares.model.mysharesBean"
singleton="true" />
<bean id="mysharesService" class="it.myshares.model.mysharesService">
<property name="mysharesDAO"><ref bean="mysharesDAO" /></
property>
<property name="mysharesGW"><ref bean="mysharesGW" /></
property>
</bean>
<bean id="mysharesDAO" class="it.myshares.model.mysharesDAO">
<property name="AppConfig"><ref bean="AppConfig" /></property>
</bean>
<bean id="mysharesGW" class="it.myshares.model.mysharesGW">
<property name="AppConfig"><ref bean="AppConfig" /></property>
</bean>

When i validate a form with the mySharesBean.cfc file, I want to test
the data being passed in against a function that I have defined within
mySharesGW.cfc (specifically AccountExists is the function name).

Is there a correct way of calling that function from within the
mySharesBean.cfc?

Thanks in Advance,

Cliff

Matt Quackenbush

unread,
Apr 25, 2012, 11:18:31 AM4/25/12
to model...@googlegroups.com
Assuming you have a getter and setter in place (either implicit or explicit)...

getMySharesGW().accountExists()


--
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

Reply all
Reply to author
Forward
0 new messages