Here you go...

 <cfset var communityID = 0 />
<cfset var ScopeFacade = "" />
    <!--- Create CommunityProfile --->
    <cfif arguments.event.GetValue("ReloadProfile") eq 1 OR arguments.event.GetValue("communityID",0) neq 0>
        <cfset communityID = arguments.event.GetValue("communityID",0) />
        <cfset communityProfile = reactor.createRecord("CommunitySessionProfile").load(id=communityID) />
        <cfset ScopeFacade.SetValue("communityProfile", communityProfile) />
    <cfelse>
        <cfset arguments.event.SetValue("ScopeFacade",ScopeFacade) />
    </cfif>

Thanks for the help.

- JS

------------------------------------------------

Joshua Scott

Resonant Media Technologies, LLC.

www.resonantmedia.com | blog.resonantmedia.com

 

"It is impossible to get out of a problem by using the same type of thinking that it took to get into the problem." -- Albert Einstein

 

 



Dave Ross wrote:
where/how does communityProfile get created?

On 2/16/07, Joshua Scott <[EMAIL PROTECTED]> wrote:

 I just do this:

 <cfset ScopeFacade.SetValue("communityProfile", communityProfile) />

 CommunityProfile contains the ID.

 Thanks for the help.

 - JS




------------------------------------------------

Joshua Scott

Resonant Media Technologies, LLC.

www.resonantmedia.com | blog.resonantmedia.com



"It is impossible to get out of a problem by using the same type of thinking
that it took to get into the problem." -- Albert Einstein





 Dave Ross wrote:
Are you putting the community id into the session or setting it as a
 instance variable of the SessionFacade itself?

 On 2/16/07, Joshua Scott <[EMAIL PROTECTED]> wrote:


  All,

  I have a ModelGlue application that allows users in our organization to
 have small microsites.
 (http://community.caminternational.org)

  I use a simple ScopeFacade object (originally used by Doug Hughes in a
 sample application) to manage / abstract my session usage. I have defined
 this object in ColdSpring as:

       <bean id="SessionScopeFacade"
 class="SymphonyCore.model.util.ScopeFacade">
          <constructor-arg
name="scopeName"><value>session</value></constructor-arg>
      </bean>

  I am using that in my modelglue controllers and in my service objects. It
 has worked like a champ.

  Now in this application, each site is identified by a CommunityID which is
 initially passed in as a URL variable and then added to the ScopeFacade
that
 is injected into the bean.

  What is happening is for some reason if multiple users are using the site.
 The first CommunityID that is set is the one that is returned every time
 getValue is called on the ScopeFacade. If I reinit the ModelGlue
 application, this problem goes away.

  What am I doing wrong?

  - JS




 ------------------------------------------------

 Joshua Scott

 Resonant Media Technologies, LLC.

 www.resonantmedia.com | blog.resonantmedia.com



 "It is impossible to get out of a problem by using the same type of
thinking
 that it took to get into the problem." -- Albert Einstein









Reply via email to