Skip to main content
deepthit36620990
Participating Frequently
June 10, 2016
Question

ColdFusion 2016 Upgrade: CFLayoutarea content not displaying in UI

  • June 10, 2016
  • 5 replies
  • 1529 views

Hi,

We recently upgraded our Cf version 9 to Cf 2016. CFLayout with type= "tab" used to work prior. But stopped working immediately after upgrade.

Whenever user clicks on different cflayout tabs, source content is getting disappeared after fraction of seconds. If I validate the page source code using developer tools, these tabs markup (markup generated by the tab sourceurl)already exists in the markup. But something is stopping this markup from appearing in UI. Can anyone please help me solve this issue?

Source code:

<cflayout type="tab" >
<cflayoutarea title="Test1">
  
<cfinclude template="./grids/test1Grid.cfm">
</cflayoutarea>
<cfif valuationRuns.recordCount gt 0>
  
<cfif StructKeyExists(URL,'ID')>
  
<cfset variables.ID = '&ID='&URL.ID>
  
<cfelse>
  
<cfset variables.ID = ''>
  
</cfif>
  
<cflayoutarea title="Valuation Summary" source="./valuations.cfm?test_record_id=#testId#&test_name=#URLEncodedFormat(test_name)#&runId=summary"
  
refreshonactivate="true" overflow="hidden" style="height:570px;" ></cflayoutarea>
  
<cfloop query="valuationRuns">
  
<cfset RunID = valuationRuns.RunId[currentrow]>
  
<cfset RunName = valuationRuns.RunName[currentrow]>
  
<cflayoutarea title="Run #valuationRuns.RunId[currentrow]##IIF(Left(valuationRuns.RunName[currentrow],5) NEQ 'RunID',DE(' - #valuationRuns.RunName[currentrow]#'),DE(''))#" source="./valuations.cfm?test_record_id=#testId#&test_name=#URLEncodedFormat(test_name)#&runId=#RunId#&runName=#URLEncodedFormat(RunName)##IIF(StructKeyExists(URL,'ID'),DE('#variables.ID#'),DE(''))#"
  
refreshonactivate="true" overflow="hidden" style="height:570px;" ></cflayoutarea>
  
</cfloop>
</cfif>
</cflayout>

P.S: First tab (test1) data is working as expected. Other tabs content is always getting disappeared after some time.

This topic has been closed for replies.

5 replies

Participating Frequently
March 1, 2017

We experienced the same issue here. The fix for us was to add width and height to the tag:

<cflayoutarea style="width:1050;height:650;"title="Test1">

Known Participant
June 22, 2016

Same problem here.  I can't seem to get it to work with any source="" attribute.

<cflayout name="mainLayout" type="tab" >

      <cflayoutarea name="tab_mainTab" title="My Title" source="/temp.cfm" />

</cflayout>

Where temp.cfm contains simply "hello world".  The tab spins for a second and then goes blank.  If I point it to temp2.cfm (which doesn't exist), I get an error.  If I put a database call in temp.cfm, it gets executed, so I know it's being called correctly.  But, nothing showing up in the tab.

Known Participant
June 22, 2016

Looks like it is a bug, introduced in 2016 update 2:

Bug#4165704 - cflayoutarea>cflayout does not properly load source in IE11 (After CF2016 Update 2016.0.02.299200)

I reverted to update 1 and it is working as expected.

BKBK
Community Expert
Community Expert
June 21, 2016

Two suggestions which may or may not solve your problem, but will improve the code:

1) If the page valuations.cfm itself contains a Coldfusion UI tag, then you should have cfajaximport tag at the beginning of the page.

2) The statements

<cfset runID = valuationRuns.RunId[currentrow]>

<cfset runName = valuationRuns.RunName[currentrow]>

confuse the names of new variables with those of database column. Modify your code to something like

<cfloop query="valuationRuns">

   <cfset rnID = valuationRuns.RunId[currentrow]>

   <cfset rnName = valuationRuns.RunName[currentrow]>

   <cflayoutarea title="Run #valuationRuns.RunId[currentrow]##IIF(Left(valuationRuns.RunName[currentrow],5) NEQ 'RunID',DE(' - #valuationRuns.RunName[currentrow]#'),DE(''))#" source="./valuations.cfm?test_record_id=#testId#&test_name=#URLEncodedFormat(test_name)#&runId=#rnId#&runName=#URLEncodedFormat(rnName)##IIF(StructKeyExists(URL,'ID'),DE('#variables.ID#'),DE(''))#"

   refreshonactivate="true" overflow="hidden" style="height:570px;" ></cflayoutarea>

   </cfloop>

Participating Frequently
June 21, 2016

Have you been able to resolve this?

Carl Von Stetten
Legend
June 14, 2016

I have never used <CFLAYOUT> or <CFLAYOUTAREA>, but I do know that the underlying JavaScript library that CF uses to power those features (I think it's ExtJS) has been updated to a newer version in CF2016.  It could be that arguments on those tags have changed or the expected values/datatypes of those arguments changed.  Have you looked at the 2016 docs for those tags? I just checked and see no changes since CF9.

Do you have any custom JavaScript on your page that modified the behavior of the tab interface?