• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

cflayout tabs help, cf 9 need to redraw to correct size with ext3 or CF

Explorer ,
Jan 29, 2010 Jan 29, 2010

Copy link to clipboard

Copied

Whenever you load a tab dynamically with a cflayoutarea (tab) in Coldfusion 9 it won't get the height right (usually just does like 20px high). This will also happen when trying to reload a tab with coldfusion.navigate. I need to figure out how to access the underlying EXT or use coldfusion functions to get these tabs to redraw. As of now my only workaround is assigning a height to it, but that will create scrollbars instead of just correctly fitting the height as it should. Below is a example layoutarea:

<cflayout type="tab"  style="padding:5px; width:940px;" name="ajaxTabs">

     <cflayoutarea name="tab0" selected="#tab0#" style="padding:5px; min-height:450px;" overflow="auto" refreshonactivate="yes"
                         title="<p id='n1'>Saved Newsletters</p>"
                         source="#myself##xfa.savedNewsletters#" />

I've gotten the formula to get the layoutarea to react but haven't figured out exactly what I need to get it to resize (Below is just an attempt to jump start the height by disabling/enabling):

<cfsavecontent variable="theJS">
<script type="text/javascript">
function resizeTab() {
    var activeID = ColdFusion.Layout.getTabLayout('ajaxTabs').getActiveTab().id;
    ColdFusion.Layout.disableTab('ajaxTabs', activeID);
    ColdFusion.Layout.enableTab('ajaxTabs', activeID);
    ColdFusion.Layout.selectTab('ajaxTabs', activeID);
    return;
}
</script>
</cfsavecontent>
<cfhtmlhead text="#theJS#">
<cfset ajaxOnLoad('resizeTab')>

Views

6.9K

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
community guidelines

correct answers 1 Correct answer

New Here , Feb 23, 2010 Feb 23, 2010

Right, I have fixed it, I cannot guarantee that other cfajax functions wont be affected, but my tests so far show everything is ok.

Basically I started taking a look through the CF Javascript files, and found the one that has all the CF functions which control the ExtJS functions. 

After a bit of playing about, and then some whooping to the dismay of my colleagues, I managed to get the autoHeight working.

What I found is the the Coldfusion code first creates a Tabpanel, but puts nothing in it, the

...

Votes

Translate

Translate
Community Beginner ,
Aug 30, 2010 Aug 30, 2010

Copy link to clipboard

Copied

This worked for me,

cflayout.js file

change    _1c.style.height=_1b;

to          _1c.height=_1b; 

Votes

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
community guidelines
New Here ,
Mar 20, 2015 Mar 20, 2015

Copy link to clipboard

Copied

LATEST

If you don't have a problem hardcoding the layout area height, then this solution works both in CF9 in CF11:

<cflayout style="">

  <cflayoutarea style="overflow-y:scroll; height: 450px;">

Votes

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
community guidelines
Resources
Documentation