« Return to Thread: Global Application Name

Re: Global Application Name

by Richard East :: Rate this Message:

Reply to Author | View in Thread

Hi Bryan,

I'm not sure if Topica is sending emails in the right order, but...
This line from my previous email in the onQueueComplete in
Controller.cfc puts the constant into the view state:
<cfset arguments.event.setValue("siteDetails",
variables._sitedetails.getConfig()) />

Regards,

Richard


My last message:
Bryan,

If you put this in the Controller.cfc, it should work:

<cffunction name="setSiteDetails" access="public" returnType="void"
hint="I get the constants of this site">
              <cfargument name="siteDetails" />
              <cfset variables._siteDetails = arguments.siteDetails />
      </cffunction>

And change the onQueueComplete function in the Controller.cfc:
<cffunction name="onQueueComplete" access="public" returnType="void"
output="false">
    <cfargument name="event" type="any" />
     <cfset arguments.event.setValue("siteDetails",
variables._sitedetails.getConfig()) />
</cffunction>

Regards,

Richard

On 11/28/06, Richard East <richard.east@...> wrote:

> Bryan,
>
> If you put this in the Controller.cfc, it should work:
>
> <cffunction name="setSiteDetails" access="public" returnType="void"
> hint="I get the constants of this site">
>                <cfargument name="siteDetails" />
>                <cfset variables._siteDetails = arguments.siteDetails />
>        </cffunction>
>
> And change the onQueueComplete function in the Controller.cfc:
> <cffunction name="onQueueComplete" access="public" returnType="void"
> output="false">
>      <cfargument name="event" type="any" />
>       <cfset arguments.event.setValue("siteDetails",
> variables._sitedetails.getConfig()) />
> </cffunction>
>
> Regards,
>
> Richard
>
> On 11/28/06, Richard East <richard.east@...> wrote:
> > Hi Bryan,
> >
> > I'm away from my office pc, so cannot quickly answer this. The bean
> > needs to be initiated in the main controller cfc you use. I can't give
> > you the exact code at the moment, but I will forward it as soon as I
> > can unless someone else on the list can beat me to it.
> >
> > Sorry,
> >
> > Richard
> >
> >
> >
> > On 11/28/06, Bryan S <bryansgroups@...> wrote:
> > > On 11/28/06, Richard East <richard.east@...> wrote:
> > > > > I hope this helps.
> > >
> > >
> > > Richard
> > >
> > > It was very helpful, sort of. :-) It showed me that I was on the right path
> > > with what I was trying to do. Unfortunately it doesn't work.
> > >
> > > The view says
> > > "You have attempted to dereference a scalar variable of type class
> > > java.lang.String as a structure with members."
> > >
> > > with this code.
> > >
> > > in my view
> > > <cfoutput>#viewState.GetValue("siteDetails").siteName#</cfoutput>
> > >
> > > in coldspring.xml
> > >     <bean id="siteDetails"
> > > class="ModelGlue.Bean.CommonBeans.SimpleConfig">
> > >     <property name="config">
> > >         <map>
> > >             <entry key="favicon"><value> favicon.ico</value></entry>
> > >             <entry
> > > key="siteName"><value>MySite</value></entry>
> > >             <entry
> > > key="siteStyleSheet"><value>/css/v3/eurstart.css</value></entry>
> > >         </map>
> > >     </property>
> > >     </bean>
> > >
> > > The object isn't showing up when I dump this either.
> > > <cfdump var="#viewstate.getAll()#" label="viewstate.getAll()">
> > > <cfdump var="#viewcollection#" label="viewcollection">
> > >
> > >
> >
> >
> >
>
>
>

--^----------------------------------------------------------------
This email was sent to: lists@...

EASY UNSUBSCRIBE click here: http://topica.com/u/?b1drHn.bSZygJ.bGlzdHNA
Or send an email to: modelglue-unsubscribe@...

For Topica's complete suite of email marketing solutions visit:
http://www.topica.com/?p=TEXFOOTER
--^----------------------------------------------------------------

 « Return to Thread: Global Application Name