Thanks Cody! I tried your suggestion, but the component is then executed without any application.cfc "context", so my session vars are still not available :-(
: I am not sure what the best practice is, but the following setup may solve : your issues: : Components\MyComponent.cfm : Site1\application.cfm (-> this.name = "site1";) : Site1\Components ... this is an IIS virtual directory that points to > : Components : Site1\UseComponentToShowSiteNameOnSite1.cfm : : Site2\application.cfm (-> this.name = "site2";) : Site2\Components ... this is an IIS virtual directory that points to > : Components : Site2\UseComponentToShowSiteNameOnSite2.cfm : This way if there is no application.cfm in the Components directory then I : would think it would jump to Site1 or Site2 respectively. : Cody : -----Original message----- : From: Mischa Uppelschoten ext 10 [EMAIL PROTECTED] : Date: Tue, 18 Mar 2008 12:04:29 -0400 : To: Web Site [email protected] : Subject: [ACFUG Discuss] Using components on different websites : > All, : > I'm running into an issue with CF8 and how components are bound to form > : controls. Proper execution of one of my components depends on a value in the : > session scope. : > : > Site1\application.cfm (-> this.name = "site1";) : > Site1\Components\MyComponent.cfm : > Site1\UseComponentToShowSiteNameOnSite1.cfm : > : > Site2\application.cfm (-> this.name = "site2";) : > Site2\Components ... this is an IIS virtual directory that points to > : Site1\Components : > Site2\UseComponentToShowSiteNameOnSite2.cfm : > : > The purpose of the above setup is to share a set of common cfc's between the : > two sites. If an object is instantiated through CreateObject via the > : UseComponentToShowSiteNameOnSite2.cfm template, the virtual directory is > : honored and the application.cfm from site2 is used. : > : > However, if I use CFGRID with a > : bind="cfc:Site2.Components.MyComponent.TestFunction... I can see that the > : application.cfm from Site1 is used. : > : > This breaks my application because the required session variables are not > : available for the user in Site1. : > : > Is there a better way to share common cfc's and have different > : application.cfc's apply depending on how they are called? : > : > (The above is a simplification, let me know if you need code). : > Thanks! : > Mischa. : > : > : > : > ------------------------------------------------------------- : > Annual Sponsor FigLeaf Software - http://www.figleaf.com : > : > To unsubscribe from this list, manage your profile @ : > http://www.acfug.org?fagin.edituserform : > : > For more info, see http://www.acfug.org/mailinglists : > Archive @ http://www.mail-archive.com/discussion%40acfug.org/ : > List hosted by http://www.fusionlink.com : > ------------------------------------------------------------- : > : > : > : ------------------------------------------------------------- : Annual Sponsor FigLeaf Software - http://www.figleaf.com : To unsubscribe from this list, manage your profile @ : http://www.acfug.org?fa=login.edituserform : For more info, see http://www.acfug.org/mailinglists : Archive @ http://www.mail-archive.com/discussion%40acfug.org/ : List hosted by http://www.fusionlink.com : ------------------------------------------------------------- Mischa Uppelschoten The Banker's Exchange, LLC. 4200 Highlands Parkway SE Suite A Smyrna, GA 30082-5198 Phone: (404) 605-0100 ext. 10 Fax: (404) 355-7930 Web: www.BankersX.com Follow this link for Instant Web Chat: http://www.bankersx.com/Contact/chat.cfm?Queue=MUPPELSCHOTEN ---------- Original Message ---------- FROM: [EMAIL PROTECTED] <[EMAIL PROTECTED]> TO: [email protected], Web Site <[email protected]> DATE: Tue, 18 Mar 2008 12:22:47 -0500 SUBJECT: Re: [ACFUG Discuss] Using components on different websites I am not sure what the best practice is, but the following setup may solve your issues: Components\MyComponent.cfm Site1\application.cfm (-> this.name = "site1";) Site1\Components ... this is an IIS virtual directory that points to > Components Site1\UseComponentToShowSiteNameOnSite1.cfm Site2\application.cfm (-> this.name = "site2";) Site2\Components ... this is an IIS virtual directory that points to > Components Site2\UseComponentToShowSiteNameOnSite2.cfm This way if there is no application.cfm in the Components directory then I would think it would jump to Site1 or Site2 respectively. Cody -----Original message----- From: Mischa Uppelschoten ext 10 [EMAIL PROTECTED] Date: Tue, 18 Mar 2008 12:04:29 -0400 To: Web Site [email protected] Subject: [ACFUG Discuss] Using components on different websites > All, > I'm running into an issue with CF8 and how components are bound to form > > controls. Proper execution of one of my components depends on a value in the > > session scope. > > Site1\application.cfm (-> this.name = "site1";) > Site1\Components\MyComponent.cfm > Site1\UseComponentToShowSiteNameOnSite1.cfm > > Site2\application.cfm (-> this.name = "site2";) > Site2\Components ... this is an IIS virtual directory that points to > > Site1\Components > Site2\UseComponentToShowSiteNameOnSite2.cfm > > The purpose of the above setup is to share a set of common cfc's between the > > two sites. If an object is instantiated through CreateObject via the > > UseComponentToShowSiteNameOnSite2.cfm template, the virtual directory is > > honored and the application.cfm from site2 is used. > > However, if I use CFGRID with a > > bind="cfc:Site2.Components.MyComponent.TestFunction... I can see that the > > application.cfm from Site1 is used. > > This breaks my application because the required session variables are not > > available for the user in Site1. > > Is there a better way to share common cfc's and have different > > application.cfc's apply depending on how they are called? > > (The above is a simplification, let me know if you need code). > Thanks! > Mischa. > > > > ------------------------------------------------------------- > Annual Sponsor FigLeaf Software - http://www.figleaf.com > > To unsubscribe from this list, manage your profile @ > http://www.acfug.org?fagin.edituserform > > For more info, see http://www.acfug.org/mailinglists > Archive @ http://www.mail-archive.com/discussion%40acfug.org/ > List hosted by http://www.fusionlink.com > ------------------------------------------------------------- > > > ------------------------------------------------------------- Annual Sponsor FigLeaf Software - http://www.figleaf.com To unsubscribe from this list, manage your profile @ http://www.acfug.org?fa=login.edituserform For more info, see http://www.acfug.org/mailinglists Archive @ http://www.mail-archive.com/discussion%40acfug.org/ List hosted by http://www.fusionlink.com ------------------------------------------------------------- ------------------------------------------------------------- Annual Sponsor FigLeaf Software - http://www.figleaf.com To unsubscribe from this list, manage your profile @ http://www.acfug.org?fa=login.edituserform For more info, see http://www.acfug.org/mailinglists Archive @ http://www.mail-archive.com/discussion%40acfug.org/ List hosted by http://www.fusionlink.com -------------------------------------------------------------
