So far you got everything right except for one important part. Ditch the
cfreturn or rather replace it with this line and you are all set:<cfset
arguments.event.setValue("bookList", bookList)>What this is doing is adding the
bookList query variable to the event object. So now when you are in your
viewState that variable will exist. In this case its a query so do a cfdump on
it and you will see your query data. Good luck!
Javier JulioWeb Developer, AboutWeb LLCwww.javier-julio.com> Subject: ModelGlue
viewState.getValue problems> From: [EMAIL PROTECTED]> To:
[email protected]> Date: Fri, 30 Mar 2007 13:39:54 -0400> > I am just
trying out MG and pretty much I am stumped. I am trying to make a sooo simple
page that lists data, with links to detail. Seems like there would be an
example of that somewhere but if there is I cannot find it. (yes I downloaded
Ray's example, the MG docs, yadda yadda and I have pored over them but still I
can't show a little list of links!)> > I am calling a very basic controller.cfc
that is returning 6 records (based on CF debug):> > <cffunction
name="GetMyBooks" access="public" returnType="query" output="false">>
<cfargument name="event" type="any">> <cfset var bookList=""> >
<cfquery name="q" datasource="BooksDB">> select title from books
order by 1> </cfquery>> <cfreturn bookList>> </cffunction>> > > I have
a view page that should be returning the data. But, on this page,>
viewState.getValue("bookList","No data!")> always returns "No data". So no
data is getting returned?> > Any suggestions, ideas, or sample code would be
greatly appreciated, thanks!> >
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7
The most significant release in over 10 years. Upgrade & see new features.
http://www.adobe.com/products/coldfusion?sdid=RVJR
Archive:
http://www.houseoffusion.com/groups/CF-Newbie/message.cfm/messageid:2664
Subscription: http://www.houseoffusion.com/groups/CF-Newbie/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15