House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home /  Groups /  ColdFusion Talk (CF-Talk)

CFCONTENT does not reset

  << Previous Post |  RSS |  Sort Oldest First |  Sort Latest First |  Subscribe to this Group Next >> 
Hi,
Claude_Schnéegans
08/06/12 05:52 P
>>Once you use any
Claude_Schnéegans
08/06/12 10:27 P
>>Once you use any
Claude_Schnéegans
08/06/12 10:34 P
Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Claude_Schnéegans
08/06/2012 05:52 PM

Hi, I came across a problem with CFCONTENT. Even if the attribute RESET="yes" is used, the content which was previously set by <cfhtmlhead  is not reset. Ex 1: <cfhtmlhead text = 'This is in the head section'> <cfcontent type="text/html; charset=ISO-8859-1" RESET="yes"> This shouldn't have the head section. </cfcontent> Ex 2: <head>This is in the head section</head> <cfcontent type="text/html; charset=ISO-8859-1" RESET="yes"> This shouldn't have the head section. </cfcontent> In Ex 1, the text "This is in the head section" still appears in the page. In the ex 2 it does not. Is this a bug, or an undocumented feature ? Anyway, is there some way I could clear what was previously set with <cfhtmlhead ? Thanks.

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Dave Watts
08/06/2012 09:47 PM

----- Excess quoted text cut - see Original Post for more ----- I believe this is the expected behavior. Once you use any functionality that explicitly writes part of the response (CFHTMLHEAD, CFHEADER, etc) you can't use functionality that lets you manipulate the storage buffer (CFCONTENT, CFFLUSH). Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite.

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Claude_Schnéegans
08/06/2012 10:27 PM

>>Once you use any functionality that explicitly writes part of the response (CFHTMLHEAD, CFHEADER, etc) you can't use functionality that lets you manipulate the storage buffer (CFCONTENT, CFFLUSH). Not so sure about this. I've noticed that the effect of CFHTMLHEAD is to find the <HEAD>...</HEAD> pair in the output at the end of the output creation and simply insert the text right before the </HEAD> tag. If no <HEAD> tag is found, the text will be added at the beging of the output buffer. You may use <HEAD>...</HEAD> after <CFHTMLHEAD, even as the last line in your template, and text added by <CFHTMLHEAD will still be inserted inside the <HEAD>...</HEAD> pair which proves that the action is performed at time the output buffer is sent and not at the moment <CFHTMLHEAD is executed. My understanding is that the RESET action is executed first, then the <CFHTMLHEAD action. This last operation shoud be canceled by the RESET and it is not. IMHO it is definitely a bug.

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Claude_Schnéegans
08/06/2012 10:34 PM

>>Once you use any functionality that explicitly writes part of the response (CFHTMLHEAD, CFHEADER, etc) you can't use functionality that lets you manipulate the storage buffer (CFCONTENT, CFFLUSH). I think it is actually the opposite: Once you have used CFCONTENT, CFFLUSH, you cannot use any functionality that explicitly writes part of the response (CFHTMLHEAD, CFHEADER, etc), simply because the output buffer is already gone. Look at the docs for CFHTMLHEAD: "If you use this tag after the cfflush tag on a page, an error is thrown."


<< Previous Thread Today's Threads Next Thread >>

Search cf-talk

May 23, 2013

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
       1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31   

Designer, Developer and mobile workflow conference