Solved

cfdiv erratic bind

Posted on 2011-02-17
15
476 Views
Last Modified: 2012-05-11
When I first added the cfdiv (to display a grid-like table) it worked fine passing on variable in the URL scope.  I added a second variable and it worked fine.  I added a thrid variable and got an error saying the variable was not defined in the URL scope. I removed the third variable and got the error on the second variable. I remove the second variable and it worked again. I added the second variable back in and it worked.  I added the third variable back in and it worked.  I added a fourthe variable and it worked.  I added a fifth variable and it failed and continued to fail as I removed one variable at a time.

This appears to be a little know bug but there's not much info on it.
<tr>
<td valign="top" colspan="2">
<cflayout type="tab" name="Modify Job" style="width:1050px">
<cflayoutarea title="Modify Job">
<cfform action="" method="POST">
<cfinclude template="divSearchParms.cfm" />
<cfdiv bind="url:dspPagesDiv.cfm?selectJobID={selectJobID}&selectCompany_Name={selectCompany_Name}&selectJobTitle={selectJobTitle}&selectMarketer={selectMarketer}&board_type={board_type}" id="pageDiv" />

The included divSearchParms.cfm--------------------------------------
<div style="background-color:ebebeb; align:center;">
<table>
<tr><td><table  style="font-size:7;">
<tr><td align="center">Job ID:</td>
</tr><tr><td><cfinput type="text" name="selectJobID" size="8"></td></tr></table></td>	
<td><table style="font-size:7;">
<tr><td align="center">Company Name:</td></tr>
<tr><td><cfinput type="text" name="selectCompany_Name"></td></tr></table></td>
<td><table style="font-size:7;"><tr>				<td><strong>Job Title:</strong></td></tr>
<tr><td><cfinput type="text" name="selectjobTitle" /></td></tr>
</table></td>


The div--------------------------------------------------------
<cfinvoke component="cfc.basic" method="getPages" returnvariable="qPages">
<cfinvokeargument name="board_type" value="#url.board_type#">
<cfinvokeargument name="selectJobID" value="#url.selectJobID#">
<cfinvokeargument name="selectCompanyName" value="#url.selectCompany_Name#">
<cfinvokeargument name="selectJobTitle" value="#url.selectJobTitle#">
<cfinvokeargument name="selectMarketer" value="#url.selectMarketer#">
<cfinvokeargument name="sort_order" value="#attributes.sort_order#">
<cfinvokeargument name="sort_col" value="#attributes.sort_col#">
<cfinvokeargument name="start" value="#variables.start#">
<cfinvokeargument name="stop" value="#variables.stop#">
</cfinvoke>
<cfinvoke component="cfc.basic" method="getPagesCount" returnvariable="qPageCount">
<cfinvokeargument name="board_type" value="#url.board_type#">
<cfinvokeargument name="selectJobID" value="#url.selectJobID#">
<cfinvokeargument name="selectCompanyName" value="#url.selectCompany_Name#">
<cfinvokeargument name="selectJobTitle" value="#url.selectJobTitle#">
<cfinvokeargument name="selectMarketer" value="#url.selectMarketer#">
<cfinvokeargument name="sort_order" value="#attributes.sort_order#">
<cfinvokeargument name="sort_col" value="#attributes.sort_col#">
<cfinvokeargument name="start" value="#variables.start#">
<cfinvokeargument name="stop" value="#variables.stop#">
</cfinvoke>

<cfoutput>
<table id="articles" style="font-size:14;"><tr>
<th width="30px" style="text-align:center"><a href="" onClick="javascript: ColdFusion.navigate('dspPagesDiv.cfm?job_type=#attributes.board_type#&sort_col=id&sort_order=#attributes.sort_order#','pageDiv'); return false;">JobID</a></th>
<th ><a href="" onClick="javascript: ColdFusion.navigate('dspPagesDiv.cfm?job_type=#attributes.board_type#&sort_col=approvedbydate&sort_order=#attributes.sort_order#','pageDiv'); return false;">LiveDate</a></th>
<th ><a href="" onClick="javascript: ColdFusion.navigate('dspPagesDiv.cfm?job_type=#attributes.board_type#&sort_col=old_tt_id&sort_order=#attributes.sort_order#','pageDiv'); return false;">Old TT ID</a></th>
<th ><a href=""

Open in new window

0
Comment
Question by:lantervj
  • 11
  • 4
15 Comments
 
LVL 39

Expert Comment

by:gdemaria
ID: 34918880

Is the section you've called "The Div" supposed to be the "dspPagesDiv.cfm" file ?

At the beginning of that file you should place a cfparam tag for each url variable that you might pass

<cfparam name="url.board_type" default="">

That way if you don't pass it, it will not error
0
 

Author Comment

by:lantervj
ID: 34919252
I added a dump, after doing a cfparam of all the passed variables, of the URL scope and the selectJobTitle is in there but I still get an error

<cfparam name="url.board_type" default="2" />
<cfparam name="url.selectJobID" default="" />
<cfparam name="url.selectCompanyName" default="" />
<cfparam name="url.selectJobTitle" default="" />
<cfparam name="url.selectMarketer" default="" />

<cfdump var="#url#"><cfabort>

<cfinvoke component="cfc.basic" method="getPages" returnvariable="qPages">
      <cfinvokeargument name="board_type" value="#url.board_type#">
      <cfinvokeargument name="selectJobID" value="#url.selectJobID#">
      <cfinvokeargument name="selectCompanyName" value="#url.selectCompany_Name#">
      <cfinvokeargument name="selectJobTitle" value="#url.selectJobTitle#">
      <cfinvokeargument name="selectMarketer" value="#url.selectMarketer#">
      <cfinvokeargument name="sort_order" value="#attributes.sort_order#">
      <cfinvokeargument name="sort_col" value="#attributes.sort_col#">
      <cfinvokeargument name="start" value="#variables.start#">
      <cfinvokeargument name="stop" value="#variables.stop#">
</cfinvoke>


struct
SELECTCOMPANYNAME       [empty string]
_cf_clientid                               C240440137357E786B00CC5B5A8F468D
_cf_containerId                       pageDiv
_cf_nocache                       true
_cf_nodebug                       true
_cf_rc                                       0
board_type                               Custom
selectCompany_Name       [empty string]
selectJobID                               [empty string]
selectJobTitle                       [empty string]
selectMarketer                       0
0
 
LVL 39

Expert Comment

by:gdemaria
ID: 34919361
You also have attribute variables that may be undefined?

I'd like to pin down whether the error is in the code you are showing or the cfc

Let's comment out the cfc call and just cfoutput it (I intentionally removed the first < from each tag so it would just display to the screen).

Please show the error message if it happens..

<cfparam name="url.board_type" default="2" />
<cfparam name="url.selectJobID" default="" />
<cfparam name="url.selectCompanyName" default="" />
<cfparam name="url.selectJobTitle" default="" />
<cfparam name="url.selectMarketer" default="" />

<cfdump var="#url#"><cfabort>

<cfoutput>
cfinvoke component="cfc.basic" method="getPages" returnvariable="qPages">
      cfinvokeargument name="board_type" value="#url.board_type#">
      cfinvokeargument name="selectJobID" value="#url.selectJobID#">
      cfinvokeargument name="selectCompanyName" value="#url.selectCompany_Name#">
      cfinvokeargument name="selectJobTitle" value="#url.selectJobTitle#">
      cfinvokeargument name="selectMarketer" value="#url.selectMarketer#">
      cfinvokeargument name="sort_order" value="#attributes.sort_order#">
      cfinvokeargument name="sort_col" value="#attributes.sort_col#">
      cfinvokeargument name="start" value="#variables.start#">
      cfinvokeargument name="stop" value="#variables.stop#">
/cfinvoke>
</cfoutput>

<!--------
<cfinvoke component="cfc.basic" method="getPages" returnvariable="qPages">
      <cfinvokeargument name="board_type" value="#url.board_type#">
      <cfinvokeargument name="selectJobID" value="#url.selectJobID#">
      <cfinvokeargument name="selectCompanyName" value="#url.selectCompany_Name#">
      <cfinvokeargument name="selectJobTitle" value="#url.selectJobTitle#">
      <cfinvokeargument name="selectMarketer" value="#url.selectMarketer#">
      <cfinvokeargument name="sort_order" value="#attributes.sort_order#">
      <cfinvokeargument name="sort_col" value="#attributes.sort_col#">
      <cfinvokeargument name="start" value="#variables.start#">
      <cfinvokeargument name="stop" value="#variables.stop#">
</cfinvoke>
------->

Open in new window

0
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 

Author Comment

by:lantervj
ID: 34919620
cfinvoke component="cfc.basic" method="getPages" returnvariable="qPages">
 cfinvokeargument name="board_type" value="Custom">  
cfinvokeargument name="selectJobID" value="">  
cfinvokeargument name="selectCompanyName" value="">  
cfinvokeargument name="selectJobTitle" value="">  
cfinvokeargument name="selectMarketer" value="0">  
cfinvokeargument name="sort_order" value="Asc">  
cfinvokeargument name="sort_col" value="">  
cfinvokeargument name="start" value="0">  
cfinvokeargument name="stop" value="20">
 /cfinvoke>
0
 

Author Comment

by:lantervj
ID: 34919699
This popup error is not recorded in the cf log file
cfdiverror.bmp
0
 

Author Comment

by:lantervj
ID: 34919752
BTW;  the page does return data. It's just that the bind failed.  In fact, the original post from me meant I was getting an error page returned from the server.  This new error is just an AJAX popup error with very little to go on.  
0
 
LVL 39

Expert Comment

by:gdemaria
ID: 34919761
That error seems to be associated with this tag...

<cfdiv bind="url:dspPagesDiv.cfm?selectJobID={selectJobID}&selectCompany_Name={selectCompany_Name}&selectJobTitle={selectJobTitle}&selectMarketer={selectMarketer}&board_type={board_type}" id="pageDiv" />


selectJobTitle={selectJobTitle} <!===== this value

what is that pointing to?

Do you have a CFINPUT tag named "selectJobTitle" ?
0
 
LVL 39

Accepted Solution

by:
gdemaria earned 500 total points
ID: 34919780
> This new error is just an AJAX popup error with very little to go on.

add &cfdebug=1 to the end of your web browsers URL to see more info

0
 

Author Comment

by:lantervj
ID: 34920110
This is part of the divSearchParms.cfm that contains the cfinputs;

<div style="background-color:ebebeb; align:center;">
<table>

  <tr>
            <td>
                  <table  style="font-size:7;">
                        <tr>
                      <td align="center">Job ID:</td>
                      </tr>
                      <tr>
                      <td><cfinput type="text" name="selectJobID" size="8"></td>
                        </tr>
                  </table>
            </td>
            
            <td>
                  <table style="font-size:7;">
                        <tr>
                      <td align="center">Company Name:</td>
                      </tr>
                      <tr>
                      <td><cfinput type="text" name="selectCompany_Name"></td>
                        </tr>
                  </table>
            </td>
            <td>
                        <table style="font-size:7;">
                              <tr>
                                    <td><strong>Job Title:</strong></td>
                              </tr>
                              <tr>
                            <td><cfinput type="text" name="selectjobTitle" />
                                    </td>
                              </tr>
                        </table>                  
                  </td>
            <td>
                  <table style="font-size:7;">
                        <tr>
                              <td align="center">Marketer:</td>
                              </tr>
                              <tr>
                              <td><cfselect name="selectMarketer" size="1">
                                                <option value="0" selected>
                                                      All
                                                </option>
                                                <cfoutput>
                                                <cfloop query="getAdmins">
                                                      <option value="#getAdmins.adminid#">
                                                            #getAdmins.name#
                                                      </option>
                                                </cfloop>
                                                </cfoutput>
                                          </cfselect></td>
                        </tr>
                  </table>
            </td>
      
0
 

Author Comment

by:lantervj
ID: 34920186
URL variables from the debug output;
URL Parameters:
CFID=1001613
CFTOKEN=80089461
board_type=Custom    <----------  the only url param that was passed for the bind
cfdebug=1
comingfrom=modify
fa=home
0
 

Author Comment

by:lantervj
ID: 34920238
From the debug window;
info:widget: Selected tab, id: cf_layoutarea1297974020175 in tab container, id: Modify Job

info:http: HTTP GET dspPagesDiv.cfm?selectJobID=&selectCompany_Name=&selectJobTitle=&selectMarketer=0&board_type=Custom&_cf_containerId=pageDiv&_cf_nodebug=true&_cf_nocache=true&_cf_clientid=C240440137357E786B00CC5B5A8F468D&_cf_rc=0

info:http: Replacing markup for element: pageDiv from URL dspPagesDiv.cfm?selectJobID=&selectCompany_Name=&selectJobTitle=&selectMarketer=0&board_type=Custom with params _cf_containerId=pageDiv

error:bind: Element not found: selectJobTitle

error:bind: Bind failed, element not found: selectJobTitle

info:widget: Selected tab, id: cf_layoutarea1297974020173 in tab container, id: New Job

info:widget: Selected tab, id: cf_layoutarea1297974020169 in tab container, id: companySelect

info:widget: Firing selection change event for grid id: compGrid

info:widget: Created grid, id: compGrid

info:LogReader: LogReader initialized

info:global: Logger initialized
0
 

Author Comment

by:lantervj
ID: 34920683
0
 

Author Comment

by:lantervj
ID: 34920689
0
 

Author Comment

by:lantervj
ID: 34920697
0
 

Author Comment

by:lantervj
ID: 34923138
I wish I knew exactly what fixed the problem, but it works now.  One BIG problem was the spelling of the element name selectJobTitle.  I use a lower case "j" and that caused one of the 2 errors that the element could not be found.  But, after correcting the spelling I still got one error that the same element could not be found.  I renamed the passing variable name to xselectJobTitle and the error reflected that name so the error was directly related to the CFDIV statement.  I noticed that I had the element board_type defined twice in the bind string.  After fixing that and removing all use of cflayout,  the error went away.  Making one change at a time is the best debuggin technique, but we all fall prey to the frustration.  Anyway,  thanks for hanging in with me.
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

PROBLEM: How to add your own buttons to the bottom toolbar with paging info ( result count ). While creating a cfgrid, I ran into an issue where I wanted to embed my own custom buttons where the default ones ( insert / delete / etc… ) are for aes…
Recently while working on a project I got a very annoying cfdocument has no body error message. I had never seen this error before. So I checked the code. The code was pretty simple; it was Just showing me the cfdocumnt tag and inside that tag a …
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question