On 9/20/07, Vince Collins <[EMAIL PROTECTED]> wrote:
> So Rick, because it's scoped to application, if a user calls something
> like application.inventory.addInventory() to add a new record, at the
> end of the addInventory() method, I would just need to what?
>
> Do something like this?
>
> <cfset application.inventory = createObject("component",
> cfcs.inventory").init(request.dsn) />
No you wouldn't reinit. You might do this...
<cffunction name="addInventory">
<cfargument ...>
<cfquery ...>
insert into inventory ...
</cfquery>
<cfset this.inventory = this.updateInventoryList()>
<cfreturn>
</cffunction>
<cffunction name="updateInventoryList" hint="updates the locally
stored version of the inventory">
<cfquery name="qry">
select * from inventory
</cfquery>
<cfset this.inventory = qry>
</cffunction>
Any function that modified the inventory in the database would call
the updateInventoryList() method.
--
Rick Root
Check out CFMBB, BlogCFM, ImageCFC, ImapCFC, CFFM, and more at
www.opensourcecf.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Enterprise web applications, build robust, secure
scalable apps today - Try it now ColdFusion Today
ColdFusion 8 beta - Build next generation apps
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:288976
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4