When I have needed to do things like that, I use coldspring to setup a
remote proxy object, and make any service methods available directly
as-needed (bypassing model-glue's events / controllers)
For example, my userService has several methods I wanted to make use of via
ajax, so I setup this coldspring bean:

<!--// Remote functions defined //-->
<bean id="remoteUserService"
class="coldspring.aop.framework.RemoteFactoryBean" lazy-init="false">
<property name="target">
<ref bean="userService" />
</property>
<property name="serviceName">
<value>RemoteUserService</value>
</property>
<property name="relativePath">
<value>/ajax</value>
</property>
<property name="remoteMethodNames">
<value>doesUserExist</value>
</property>
<property name="beanFactoryName">
<value>coldspring.beanfactory.root</value>
</property>
</bean>

This will create a remoteUserService.cfc object inside of the /ajax path of
your web root, and it will pass any requests back to the singleton instance
of userService, only for the methods you define.

I like this method, because then my controller and other services can still
use doesUserExist(), and this simply adds a hook so I can get directly too
it.

Chris Peterson



On Thu, Sep 11, 2008 at 8:35 AM, cs01rsw <[EMAIL PROTECTED]> wrote:

>
> Hi
>
> we want to use jsmx in our software and just want to know if you guys
> would do it in the following way:
>
> jsmx must call a function in a cfc whereby that function would also
> send back a message to the client after it has finished processing. so
> we was thinking that when we need to call a cfc function through jsmx
> then we would call a function directly in the controller which would
> use the beans, service, dao, and gw in order to complete its task and
> then pass a message back to the client.
>
> this method completely bypasses the event handlers as it is our
> understanding that event handlers only listen to the url when the page
> is refreshed - and of course jsmx is an ajax call that therefore
> doesnt refresh the page or use the url
>
> does this sound right or would there be a better way?
>
> thanks
>
>
> richard
> >
>


-- 
Hey! I dont tell you how to tell me what to do, so dont tell me how to do
what you tell me to do! ~ Bender (Futurama)

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

For more about Model-Glue, check http://www.model-glue.com .
-~----------~----~----~----~------~----~------~--~---

Reply via email to