Hmm, I guess I don't fully understand the question, but what I think you
want to do is deserialze the struct and pass in the individual elements to
the required listeners?  If that is the case here is what I might do....

Announce a derseialzeUser event, pass it the user struct.  
Desserialize the struct, and add the values returned from the deserialize to
new event args.
Announce a the event you listed.

Does that make sense, or even address what you are trying to do?

-----Original Message-----
From: Jeremy Bruck [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 18, 2003 9:38 AM
To: [EMAIL PROTECTED]
Subject: [CFCDev] How to pass in userData Arguments for CFCs?


Everyone,

Our site design is a little bit different out there (welcome to organic
growth over the last 3 years).  We have a really large site that made up of
LOTS of different "code/functionality areas" once a person logged in.  If
you were familiar with Fusebox 3, we have MANY circuits that  make up the
"member area" of our site.

I am in the process of re-writing several of those areas into Mach II and
have a question on passing in our "userData" into the CFC.  Once a user is
logged in, we create a structure of all his details (id, name, etc) and
store it in a client variable as a wddx object.  The call to get the
client.userData and deserialize it is in the header.cfm. The structure of
the new Mach II code will be:
        header.cfm
        machII.cfm (yes all events)
        footer.cfm

Would we rather re-write the whole app?  Yes, but we don't have that time
availability right now so we go in and rewrite those chunks of functionality
when we do an upgrade to the code with the goal in the end (about a year)
being an entire system in Mach II.


Here is the code if it is all a stand alone CF page:
<cfscript>
        Groups = createObject("component","app.com.supplierManagement");
        myGroups = groups.GetMyGroups(userData);
        myBlackList = groups.GetBlackList(userData);
        myPreferredSuppliers = groups.GetPreferredSuppliers(userData);
        myInvitedSuppliers = groups.GetInvitedSuppliers(userData);
</cfscript>
... all of my html/cf code that does the display ...


The challenge is I am trying to create this Mach II and am not sure of how
to pass in the "userData Structure" that is referenced in the CFC.  Here is
what I have so far for my event:
<event-handler event="ManageSuppliers" access="public">
        <notify listener="Suppliers" method="GetMyGroups"
resultKey="request.myGroups" />
        <notify listener="Suppliers" method="GetBlackList"
resultKey="request.myBlackList" />
        <notify listener="Suppliers" method="GetPreferredSuppliers"
resultKey="request.myPreferredSuppliers" />
        <notify listener="Suppliers" method="GetInvitedSuppliers"
resultKey="request.myInvitedSuppliers" />
        <view-page name="mySuppliers" />
</event-handler>

Thanks for your help!

Jeremy

Jeremy Bruck
::MfgQuote
www.mfgquote.com
[EMAIL PROTECTED]
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' 
in the message of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

An archive of the CFCDev list is available at
www.mail-archive.com/[EMAIL PROTECTED]
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' 
in the message of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]

Reply via email to