Copy link to clipboard
Copied
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" >
</cflayout>
<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>
P.S: First tab (test1) data is working as expected. Other tabs content is always getting disappeared after some time.
Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
Have you been able to resolve this?
Copy link to clipboard
Copied
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>
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Looks like it is a bug, introduced in 2016 update 2:
I reverted to update 1 and it is working as expected.
Copy link to clipboard
Copied
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">