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