-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I can see one easy one:
<html>
<head>
<title>Untitled</title>
</head>
<body>
<cfa_userGet
userDirectory="UserDirectory"
username="#request.cfa.activeuser#"
r_stUser="stUser">
- ----> THIS SHOULD BE:
<cfset typeid="#request.stUserProfile.preferences.favoriteSection#">
NOT
<cfset typeid="request.stUserProfile.preferences.favoriteSection">
<cfa_ContentObjectGetMultiple
datasource="suntimes"
typeid="#typeid#"
r_stobjects="stObjects">
<cfa_contentObject
dataSource="#request.cfa.objectstore.dsn#"
stObjects="#stObjects#"
method="teaser"
>
</body>
Aaron
- -----Original Message-----
From: Laura McReynolds [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 07, 2001 11:52 AM
To: Spectra-Talk
Subject: Re: Need Help With Displaying Objects
I think I am close to figuring out where the problem is but I might
need a
little more help. I understand I have a lot to learn and probably
could
benefit from some professional training. However, it will be some
time
before I can attend a class and I need this problem solved now so I
can go
ahead with my application. So, if you know what my problem is, please
give
me a hint!
Remember back when I said that some of the code works and some
doesn't?
I created a separate test file to isolate what is working and what is
not.
The following code works:
<html>
<head>
<title>Untitled</title>
</head>
<body>
<cfset typeid="DA432A6C-BA91-11D4-BA0900C04FA358B2">
<cfa_ContentObjectGetMultiple
datasource="suntimes"
typeid="#typeid#"
r_stobjects="stObjects">
<cfa_contentObject
dataSource="#request.cfa.objectstore.dsn#"
stObjects="#stObjects#"
method="teaser"
>
</body>
</html>
However when I add in the userGet statement and I set the typeid to
request.stUserProfile.preferences.favoriteSection, the code doesn't
work:
<html>
<head>
<title>Untitled</title>
</head>
<body>
<cfa_userGet
userDirectory="UserDirectory"
username="#request.cfa.activeuser#"
r_stUser="stUser">
<cfset typeid="request.stUserProfile.preferences.favoriteSection">
<cfa_ContentObjectGetMultiple
datasource="suntimes"
typeid="#typeid#"
r_stobjects="stObjects">
<cfa_contentObject
dataSource="#request.cfa.objectstore.dsn#"
stObjects="#stObjects#"
method="teaser"
>
</body>
</html>
As you can see the only real difference between the two code samples
is that
I set typeid to a static UUID in one example and a dynamic value in
another.
Also, when I try to output the value of
request.stUserProfile.preferences.favoriteSection, the UUID does
output
successfully, as in the following example:
<cfa_userGet
userDirectory="UserDirectory"
username="#request.cfa.activeuser#"
r_stUser="stUser">
<cfoutput>#request.stUserProfile.preferences.favoriteSection#
</cfoutput>
Well, I will continue to test my code to try to find an answer. If
someone
has any idea how to fix this, it would be much appreciated.
Thanks again,
Laura
- ----- Original Message -----
From: "Aaron Johnson" <[EMAIL PROTECTED]>
To: "Spectra-Talk" <[EMAIL PROTECTED]>
Sent: Tuesday, February 06, 2001 9:40 PM
Subject: RE: Need Help With Displaying Objects
> No, here's the original code:
>
> <!---Assign the value of the favoriteSection preference (Type UUID)
> to variable section1--->
> <CFSET section1 =
> request.stUserProfile.preferences.favoriteSection>
>
> <td>
> <!---display user's preferential headline color and welcome
> user---> <div align="center"><font face="Arial"
> color="#headlinecolor#"><h3>Welcome #request.cfa.activeuser#!
> <p>Here are the top stories in your favorite areas for
> #today#.</p></h3></font></div>
>
> <!---Get Objects of type #section1#--->
> <cfa_contentObjectGetMultiple
> dataSource="suntimes"
> typeID="#section1#"
> r_stObjects="section1"
> >
>
>
>
> You can see that Laura took my advice to rename her first variable
> "section1" to "typeid" and then to also name r_stObjects to
> "stObjects"... voila, code works. Laura, take the class. You have
> a lot to learn! :)
And
> we'll all help you along, but it'd be much easier on you if you or
> your
boss
> invested a week of your time into the Spectra class. The time
> you're out
of
> office and the cost of the class will be paid back in no time.
>
>
> Aaron Johnson, MCSE, MCP+I
> Allaire Certified ColdFusion Developer
> MINDSEYE, Inc.
> <phn>617.350.0339
> <fax>617.350.8884
> <icq>66172567
> [EMAIL PROTECTED]
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
------------------------------------------------------------------------------
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/spectra_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.