On Tue, 24 Jun 2008 05:22:30 +0000 (UTC), athanasiusrc wrote:
> Okay, I figured out the problem but don't know the
answer. I am getting this
> problem when I try to bind the cfc in a grid because the
grid is binding a new
> copy of the cfc instead of the one created in the
application scope:
>
> <cfgrid format="html" name="getCouponList"
pagesize="#attributes.pageSize#"
> selectmode="row"
>
>
bind="cfc:cfcs.coupon.getCouponList({cfgridpage},{cfgridpagesize},{cfgridsort
> column},{cfgridsortdirection},{active})">
>
> It works if I call it through an invoke command.
>
> The problem I have now is, how can I bind a cfc in a
scope?
I'm not sure how to use a variable instead of a CFC in a bind
statement (I
don't do much UI type development, so have never needed to
know); however
your init() method in your CFC could look to see if there's
an instance of
itself in the application scope and if so return that instead
of a new
instance of itself. Then you chain your method call thus:
cfcs.coupon.init().getCouponList(etc...)
--
Adam