I was asking for a value out of the wrong table. Just to clarify. You can call GetValueList() on an empty bean with NO PROBLEM. It just returns an empty string.
Thanks,
Josh
Sorry,
I should have explained better. This is for a form. On form entry the object is empty. Once the record is saved I want to use the value list to "check" some check boxes, similar to the way Doug uses it in the blog.
The probleme is this when you have an bean that has not values the getValueList should just return an empty list. the GetQuery() call on the iterator simply returns an empty query when the bean is empty. It is simply just not to ask for this list if the id field is not populated, but I would have expected the return value for GetValueList() on an empty bean, to be the same as GetQuery() and GetArray() which both simply return empty values even if the bean/object is empty.
Thanks,
JoshOn 6/21/06, Teddy Payne < [EMAIL PROTECTED]> wrote:Go Joao go. He is quite right.
You need to load the record object prior to getting addition methods from it.
You would need something to the effect of:
<cfset PQ = Reactor.CreateRecord("PQ").load(id=5) />
"id" would be your column name of your primary column key or identifier.
Did you included a load method?
TeddyOn 6/21/06, João Fernandes <[EMAIL PROTECTED]> wrote:Maybe I'm misunderstanding but how do you want to have anything in your iterator if your record is empty?
João Fernandes
Dep. Informática - Área de Desenvolvimento
Cofina media
Avenida João Crisóstomo, Nº 72 . 1069-043 Lisboa PORTUGAL
Tel (+351) 213 185 200 . Fax (+351) 213 540 370
[EMAIL PROTECTED]
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Joshua Scott
Sent: quarta-feira, 21 de Junho de 2006 15:29
To: [email protected]
Subject: Re: [Reactor for CF] Iterator GetValueList() Error
Any ideas? I am build 281, if that helps.
Thanks guys.
- JSOn 6/20/06, Joshua Scott <[EMAIL PROTECTED] > wrote:
All,
I have an interesting problem.
I created a new record object that is empty. Then called the getValueList() off of one of the iterators on the record object and I get the following error.
Message
The ValueList() function has an invalid parameter: query.id.
Detail
Parameter 1 of function ValueList which is now (query.id) must be pointing to a valid query name.
Extended Info
Tag Context
(1)
C:\Inetpub\wwwroot\FRAMEWORKS\Reactor_v281\reactor\iterator\iterator.cfc (248)
C:\Inetpub\wwwroot\_CAM-SYMPHONY\trunk\views\inc\inc41b.cfm (8)
C:\Inetpub\wwwroot\_CAM-SYMPHONY\trunk\views\dsp\bodyIncluder.cfm (5)
C:\Inetpub\wwwroot\FRAMEWORKS\Model-Glue_v20161\ModelGlue\unity\view\ViewRenderer.cfm (3)
C:\Inetpub\wwwroot\FRAMEWORKS\Model-Glue_v20161\ModelGlue\unity\view\ViewRenderer.cfc (31)
C:\Inetpub\wwwroot\FRAMEWORKS\Model-Glue_v20161\ModelGlue\unity\framework\ModelGlue.cfc (368)
C:\Inetpub\wwwroot\FRAMEWORKS\Model-Glue_v20161\ModelGlue\unity\framework\ModelGlue.cfc (278)
C:\Inetpub\wwwroot\FRAMEWORKS\Model-Glue_v20161\ModelGlue\unity\framework\ModelGlue.cfc (241)
C:\Inetpub\wwwroot\FRAMEWORKS\Model-Glue_v20161\ModelGlue\unity\ModelGlue.cfm (47)
C:\Inetpub\wwwroot\FRAMEWORKS\Model-Glue_v20161\ModelGlue\ModelGlue.cfm (1)
C:\Inetpub\wwwroot\_CAM-SYMPHONY\trunk\index.cfm (27)
I am calling it like this:
<cfset PQ = Reactor.CreateRecord("PQ") />
<cfset ValueList = PQ.getMinistryIterator ().getValueList("id") />
Any help would be greatly appreciated.
Thanks,
Josh-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- ----
<cf_payne />
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

