James,

You cannot have 2 elements in the flash form with the same name.  If you
have that the form will not appear, hence the blank screen.  So you need
to make the names of the cfgrid, that is commented out right now,
dynamic.

Chuck

-----Original Message-----
From: James Schell [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 29, 2007 11:14 PM
To: CF-Newbie
Subject: Cfgrid and dynamic queries

Hello from a cfnewbie,

I have managed to generate a flash tab form based on a query. The query
is dynamic based on the data in the table. I have managed to create
subtabs that are dynamic and linked to a parent tab. Again the subtabs
like the parent tabs are dynamic based on teh data returned from the
table in the database.

I want to populate a cfgrid in the sub tab. This grid would be dynamic
as well. Problem is I cannot get the grid to be dynamic. I.E. when the
parent tab is populated, any number of sub tabs may appear based on the
data set returned from the query.

The grid gets its data from a query that has a where clause that is
linked to the sub tab name.

If I hard code a tab name in the parent tab query then the first tab
appears along with the first tab of the sub tab set and a cfgrid
populated with the correct data. 

When I try to make it dynamic by looping through the recordset the flash
tabnavigator form dies, if I comment out the cfgrid line then the tabs
and sub tabs work just fine.

Any Suggestions?

Here is my code so far:
<cfform format="flash">

<!--- Query for Parent tabs --->
<cfquery name = "GetParentTab" dataSource = "rules"> SELECT RMSTab from
Rules group by rmstab </cfquery>

<cfformgroup type="tabnavigator" query="GetParentTab">

<cfloop query="GetParentTab">

<cfformgroup type="page" label="#GetParentTab.RMSTab#">
 


<!---  Query for Sub tabs --->
<cfquery name = "GetChildTab" dataSource = "rules">
                                SELECT RMSSubTab
                                from Rules
                                where  RMSTab = '#GetParentTab.RMSTab#' 
                                group by rmssubtab
</cfquery>

<cfformgroup type="tabnavigator" query="GetChildTab">

<cfloop query="GetChildTab">
 
<cfformgroup type="page" label="#GetChildTab.RMSSubTab#">
 
 
 
<!--- Query for Rules --->
<cfquery name="GetRules" datasource="rules"> Select RuleFileName from
Rules where RMSSubTab ='#GetChildTab.RMSSubTab#'
</cfquery>

 
<!---  With the following three lines commented out the template work
but the grid does not work and I get a blank screen --->

<!--- <cfgrid name="rulegrid" query="getrules"> <cfgridcolumn
name="rulefilename" header="Rule"> </cfgrid>  --->
  
   
</cfformgroup>
</cfloop>
</cfformgroup>
  

</cfformgroup>
</cfloop>
</cfformgroup>
</cfform>

Thanks

Jim



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:2773
Subscription: http://www.houseoffusion.com/groups/CF-Newbie/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15

Reply via email to