ColdFusion Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming Languages - MoreColdFusion Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old March 7th, 2012, 08:29 AM
swansong swansong is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2012
Posts: 12 swansong User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 13 m 55 sec
Reputation Power: 0
Adding html, formatting or "includes" on application.cfm kills my grid. Please assist

I have a CFGRID that works fine if I put html on the page that the grid is on or if I use cfinclude on that page. If I put any html or "cfincludes" in my application.cfm page... it kills my grid and I get an "Exception thrown and not caught" error.

Does anyone have a suggestion on how I can address this? I'd like to put all of my formatting/includes in the application.cfm page so any other cfm pages created on my website automatically load these things.

Thank you.

Reply With Quote
  #2  
Old March 7th, 2012, 08:43 AM
kiteless kiteless is offline
Moderator
Dev Shed God (5000 - 5499 posts)
 
Join Date: Jun 2002
Location: Raleigh, NC
Posts: 5,100 kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level) 
Time spent in forums: 2 Weeks 5 Days 4 h 29 m 54 sec
Reputation Power: 966
Sorry, I'm not sure what's going on. You can definitely have HTML or cfincludes in an Application.cfm file.

Reply With Quote
  #3  
Old March 7th, 2012, 09:05 AM
swansong swansong is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2012
Posts: 12 swansong User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 13 m 55 sec
Reputation Power: 0
Quote:
Originally Posted by kiteless
Sorry, I'm not sure what's going on. You can definitely have HTML or cfincludes in an Application.cfm file.


Yes, it works fine with all other cold fusion stuff on my pages but it breaks my cfgrid. I believe this explains my issue but I am not having any luck with implementing it: http://forums.forta.com/messages.cfm?threadid=10C19539-E898-C4C8-5F32EBA5B054C3D6

Reply With Quote
  #4  
Old March 7th, 2012, 09:15 AM
swansong swansong is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2012
Posts: 12 swansong User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 13 m 55 sec
Reputation Power: 0
This person is having the same issue that I am talking about. I find many people with this issue but no solutions that I can make work or understand. Can anyone assist?
http://www.coldfusionjedi.com/forum...455CBB4F778AF#8

Reply With Quote
  #5  
Old March 7th, 2012, 09:24 AM
kiteless kiteless is offline
Moderator
Dev Shed God (5000 - 5499 posts)
 
Join Date: Jun 2002
Location: Raleigh, NC
Posts: 5,100 kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level) 
Time spent in forums: 2 Weeks 5 Days 4 h 29 m 54 sec
Reputation Power: 966
I've certainly never heard of this, but without more information I can't really tell you what's going on because I have no idea what you're doing.

As an aside, most CF developers don't just throw a ton of output code in their Application.cfm/Application.cfc file. They use an MVC framework like FW/1 or Model-Glue that supports layouts and templates. It's probably been 10 years since I put output code in an Application.cfc. Keep in mind that if you put output code in an Application.cfm/cfc file, it will add that output to EVERY request, including AJAX requests. Same with debugging info appended to the end of a request. Either of which will obviously make any JSON or XML returned unusable.

Reply With Quote
  #6  
Old March 7th, 2012, 09:27 AM
swansong swansong is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2012
Posts: 12 swansong User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 13 m 55 sec
Reputation Power: 0
Quote:
Originally Posted by kiteless
Keep in mind that if you put output code in an Application.cfm/cfc file, it will add that output to EVERY request, including AJAX requests. Same with debugging info appended to the end of a request. Either of which will obviously make any JSON or XML returned unusable.


Yes, that is my issue and that is what is breaking my cfgrid. It is sending the formatting etc with my ajax requests. Do you have a recommendation on how I can accomplish the same type of thing as putting html in my application.cfm? I don't have control at the server level so all of my formatting etc has to be done on my "web" space. Am I forced to add includes to the .cfm page itself?

Thanks again.

Reply With Quote
  #7  
Old March 7th, 2012, 12:34 PM
kiteless kiteless is offline
Moderator
Dev Shed God (5000 - 5499 posts)
 
Join Date: Jun 2002
Location: Raleigh, NC
Posts: 5,100 kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level) 
Time spent in forums: 2 Weeks 5 Days 4 h 29 m 54 sec
Reputation Power: 966
Well like I said it's really been 10 or more years since I had to deal with this, long before AJAX. That said, one thing you might try is adding another Application.cfm file in the root directory of the CFCs you are binding to from your grid. Copy anything relevant from your main Application.cfm to this child Application.cfm. If you use cfapplication, make sure they use the same application name. But do not copy any layout code or layout includes. To be safe, wrap the whole file in cfsilent tags.

Since the CF server starts at the target folder and then works back up the folder hierarchy looking for an Applicaiton.cfm file to run, it should run your new one instead of the root one. Your child Application.cfm should have no output in it, especially if it is wrapped by cfsilent (which suppresses all output inside it).

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreColdFusion Development > Adding html, formatting or "includes" on application.cfm kills my grid. Please assist

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap