You are using getUsers for your query results. In order to use it in your
view, you need to add it to the event structure (which corresponds to the
attributes structure in the display)
Instead of
<cfset getUsers = myFusebox.do( action="usermanager.qryUsers") />
Do
<cfset qry_getUsers = getUsers.qryUsers()>
<cfset event.setValue("qry_getUsers", qry_getUsers)>
Then in your display. Reference it with attributes.qry_getUsers Since you
are creating the component getusers in your controller, you shouldn't be
trying to call it as a fuseaction, simply reference it as an object itself.
Sandra Clark
=============
http://www.shayna.com
Training and Consulting in CSS and Accessibility
Team Fusebox
-----Original Message-----
From: Eclectic User [mailto:[EMAIL PROTECTED]
Sent: Monday, August 04, 2008 2:31 PM
To: CF-Talk
Subject: Re: how to access the query
I am trying to cfdump the values on a page that's supposed to display the
users in the system and that file is dspUsres.cfm inside users/view/display
but it says qryUsers is not available. Thanks for any help you provide in
advance.
>Eclectic,
>
>You might get a better response posting this to a fusebox forum. I haven't
>used fusebox in years, but I'll take a stab.
>
>You said, " Now I am trying to display the results of qryUsers but qryUsers
>is not available there. I am creating an object but I don't know how to use
>it to access the results of the query. Please guide me."
>
>When you said "there", where do you mean? Also, how are you trying to
>display the 'results' of qryUsers? You said you are creating an object,
but
>don't know how to use it. If you can provide more code showing what you
are
>doing, that would be helpful.
>
>Again, I'm not sure - I'm just guessing because no one has responded yet,
>and I hate it when that happens to me. ;-) I hope someone on here who is
>more familiar with current fusebox can respond.
>
>Dave
>
>I am new to cfc's and I am having trouble in accessing query results in
>fusebox 5.5.
>I have app.cfc in users/controller and the code in it is following:
>
><cfcomponent output="false">
><cffunction name="dspUsers">
> <cfargument name="myFusebox" />
> <cfargument name="event" />
> <cfset getUsers = CreateObject ("component","users.model.usermanager") />
> <cfset getUsers = myFusebox.do( action="usermanager.qryUsers") />
> <cfset myFusebox.do( action="display.dspUsers", contentvariable="body" )
>/>
></cffunction>
></cfcomponent>
>
>and I have usermanager.cfc in the users/model :
>
><cfcomponent output="false" hint="manage users">
>
><cffunction name="init" returntype="usermanager" access="public"
>output="false">
> <cfargument name="dsn" type="string" required="yes" />
> <cfargument name="dbUser" type="string" required="yes" />
> <cfargument name="dbPass" type="string" required="yes" />
> <cfset variables.dsn = arguments.dsn />
> <cfset variables.dbUser = arguments.dbUser />
> <cfset variables.dbPass = arguments.dbPass />
> <cfreturn this />
></cffunction>
>
><cffunction name="qryUsers" returntype="Query" access="public"
>output="false">
> <cfset var qryUsers = "">
> <cfquery name="qryUsers" datasource="pumas">
> SELECT persons.person_id,
> persons.person_firstname,
> persons.Person_lastname,
> persons.person_membership_type,
> users.user_email,
> users.created_on,
> emails.email_confirmed_on
> FROM persons INNER JOIN
> users ON persons.person_id = users.person_id
>LEFT OUTER JOIN
> emails ON persons.person_id = emails.person_id
> ORDER BY persons.person_firstname, persons.person_lastname
> </cfquery>
> <cfreturn qryUsers>
></cffunction>
>
></cfcomponent>
>
>Now I am trying to display the results of qryUsers but qryUsers is not
>available there. I am creating an object but I don't know how to use it to
>access the results of the query. Please guide me.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:310164
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4