Highlighted

Coldfusion 11 error with cflayout

Explorer ,
Aug 17, 2014

Copy link to clipboard

Copied

0 down vote  favorite  

I have some applications developed on older CF versions (9&10) and in anticipation of a hosting system migrating to CF11 and started doing some

testing with a CF development platform on Windows 8 with Apache 2.4. I have found that in CF11 pages using cflayout and cflayoutarea does not work

correctly when collapsed with javascript:ColdFusion.Layout.collapseArea.  Firebug does flag an error in the CF javascript. Wondering if anyone else

has seen a problem like this and if there is a circumvention I could use to get this working.

A very simple example (complements of the Chapter 2 cflayout example demonstrated in Dan Short's video on Ajax & Coldfusion) fails as well on

CF11 but works in CF9 & CF10. 

main.cfm

<!doctype html> <html> <head> <meta charset="utf-8"> </head> <body> <cflayout name="borderLayout" type="border" fittowindow="true"> <cflayoutarea name="header" position="top" size="75">This is the header<br /> <a href="javascript:ColdFusion.Layout.collapseArea('borderLayout', 'left');">Collapse Left Column</a><br> </cflayoutarea> <cflayoutarea name="centerColumn" position="center" source="content.cfm?pageName=Header 1" /> <cflayoutarea name="rightColumn" position="right" style="width: 100px;">This is the right column</cflayoutarea> <cflayoutarea name="leftColumn" position="left" title="Left Column" style="width: 250px;" collapsible="true" splitter="true" minsize="200"> This is the left column<br /> <a href="javascript:ColdFusion.navigate('content.cfm?pagename=Header 2', 'centerColumn');">Load Header 2</a> </cflayoutarea> <cflayoutarea name="footer" position="bottom">This is a footer &copy; 2010</cflayoutarea> </cflayout> </body> </html>

content.cfm

<cfsilent> <cfparam name="URL.pageName" default="Default header" /> </cfsilent> <!doctype html> <html> <head> <meta charset="utf-8"> </head> <body> <cfoutput><h2>#URL.pageName#</h2></cfoutput> <p>This is the text content from content.cfm</p> </body> </html>   

Views

640

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Coldfusion 11 error with cflayout

Explorer ,
Aug 17, 2014

Copy link to clipboard

Copied

0 down vote  favorite  

I have some applications developed on older CF versions (9&10) and in anticipation of a hosting system migrating to CF11 and started doing some

testing with a CF development platform on Windows 8 with Apache 2.4. I have found that in CF11 pages using cflayout and cflayoutarea does not work

correctly when collapsed with javascript:ColdFusion.Layout.collapseArea.  Firebug does flag an error in the CF javascript. Wondering if anyone else

has seen a problem like this and if there is a circumvention I could use to get this working.

A very simple example (complements of the Chapter 2 cflayout example demonstrated in Dan Short's video on Ajax & Coldfusion) fails as well on

CF11 but works in CF9 & CF10. 

main.cfm

<!doctype html> <html> <head> <meta charset="utf-8"> </head> <body> <cflayout name="borderLayout" type="border" fittowindow="true"> <cflayoutarea name="header" position="top" size="75">This is the header<br /> <a href="javascript:ColdFusion.Layout.collapseArea('borderLayout', 'left');">Collapse Left Column</a><br> </cflayoutarea> <cflayoutarea name="centerColumn" position="center" source="content.cfm?pageName=Header 1" /> <cflayoutarea name="rightColumn" position="right" style="width: 100px;">This is the right column</cflayoutarea> <cflayoutarea name="leftColumn" position="left" title="Left Column" style="width: 250px;" collapsible="true" splitter="true" minsize="200"> This is the left column<br /> <a href="javascript:ColdFusion.navigate('content.cfm?pagename=Header 2', 'centerColumn');">Load Header 2</a> </cflayoutarea> <cflayoutarea name="footer" position="bottom">This is a footer &copy; 2010</cflayoutarea> </cflayout> </body> </html>

content.cfm

<cfsilent> <cfparam name="URL.pageName" default="Default header" /> </cfsilent> <!doctype html> <html> <head> <meta charset="utf-8"> </head> <body> <cfoutput><h2>#URL.pageName#</h2></cfoutput> <p>This is the text content from content.cfm</p> </body> </html>   

Views

641

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Aug 17, 2014 0
Community Beginner ,
Aug 19, 2014

Copy link to clipboard

Copied

I tried your code and received an "h.substr is not a function" from extjs.  I don't know why.  I do know that a lot of the extjs based tags broke in Coldfusion 11.  They upgraded to extjs 4.1 and did not do their testing.  I would log this as a bug in the Adobe bug base.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 19, 2014 0
Explorer ,
Aug 20, 2014

Copy link to clipboard

Copied

Thanks for taking the time to check it out for me. I was expecting similar results.    I have run my tests with the un-minified javascript which gives a little clearer, but equally useless detail:  "collapseDir,substr is not a function"  The message shows the error is on line 49878 of the debug version of ext-all.js.

The rumblings I have seen online are that the cflayout feature is not robust enough to be depended upon.  Moreover, I cannot wait holding my breath in hopes that it might be fixed.  I will have to look for other ways to accomplish what I need to do without using cflayout.   It had the potential to be a very useful feature.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 20, 2014 0
Explorer ,
Aug 25, 2014

Copy link to clipboard

Copied

use <CFAJAXIMPORT tag and make sure you have the CFIDE folder as a virtual directory in your IIS local or server machine. if the "cfajaximport" tag alone didn't work, try using it in little more details to the path of CFIDE folder and specify cflayout within the cfajaximport tag as follows:

<CFAJAXIMPORT

    CSSSRC = "CFIDE/scripts/ajax/"

    SCRIPTSRC = "/CFIDE/scripts"

    TAGS = "cfdiv,cfform,cfgrid,cfinput-autosuggest,cfinput-datefield,cflayout-border,cflayout-tab,cfmenu,cftextarea,cftooltip,cftree,cfwindow">


Normally, you shouldn't need all these specifications in the cfajaximport but in case you may try it in more detail as shown above.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 25, 2014 0
dha2 LATEST
Explorer ,
Aug 27, 2014

Copy link to clipboard

Copied

Thanks for an idea.   I did try this, with a number of variations, with the same error results.   

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 27, 2014 1