cfgridcolumn is majorly broken
Tags: Coldfusion
Awhile ago I posted a blog that Adobe rushed ColdFusion out the door, and that it breaks some applications. Well there is a few more things that Adobe just refused to add to the cfgrid section as well, and these are important things for some of the Applications that I have worked on in the past, and current.
The first thing lets have a look at a known issue that was supposed to be fixed.
Every column has the ability to defined the alignment of the data in a cell, which is by default left. But the docs also go on to say how the other options are center and right. However this was verified by Adobe as a bug, and yet it still is not fixed either.
So if you wish to align the data in the cell you can't.
The second problem is with the cfgrid column tag, and this when run under ColdFusion 8 runs without any problems.
Notice how we can display an image in the header, and Application I have worked on heavily relies on this working and unfortunately ColdFusion 9 with this major bug means that our Application will not be ported over just yet.
The last thing is the style of the headers, and the control of the header context menus. Adobe have given us no way to remove these headers, and again this will break a lot of applications because Adobe saw fit to ignore this request as a feature as well.
The following code is a snippet that I have put together very quickly to demonstrate the problem, so all you need to do is replace the image in the code with another to see the problem.
.x-grid3-header {
background: none !important;
background-color: #cccccc !important;
}
.x-grid3-hd-row td {
vertical-align: baseline;
}
.x-grid3-split {
height: 100%;
}
.x-grid3-hd-inner {
font-weight: bold;
}
.x-grid3-hd-over .x-grid3-hd-inner {
background: none !important;
}
td.x-grid3-hd-over,
td.sort-desc,
td.sort-asc,
td.x-grid3-hd-menu-open {
border-left-color: #EEEEEE !important;
border-right-color: #DDDDDD !important;
}
td.x-grid3-hd-over .x-grid3-hd-inner,
td.sort-desc .x-grid3-hd-inner,
td.sort-asc .x-grid3-hd-inner,
td.x-grid3-hd-menu-open .x-grid3-hd-inner {
background: none !important;
}
.x-grid3-col {
cursor: pointer;
}
.x-grid3-row-over td { background:#fed9b3; }
.x-grid3-row-selected .x-grid3-cell-text {
color:white;
}
.x-grid3-row-selected td { background:#f78e20;}
.x-grid3-row-alt {
background:#E9E9E9 none repeat scroll 0 0;
}
</style>
<cfquery name="artists" datasource="cfartgallery">
select * from artists
</cfquery>
<cfform name="progressData">
<cfgrid format="html" name="artists" query="artists" width="767" height="400" selectonload="false">
<cfgridcolumn name="FirstName"
Header="First Name"
/>
<cfgridcolumn name="LastName"
Header="Last Name"
/>
<cfgridcolumn name="City"
Header="City"
/>
<cfgridcolumn name="State"
Header="State"
dataAlign="right"
/>
<cfgridcolumn name="Phone"
Header="<img src='06.png'>"
/>
</cfgrid>
</cfform>
-
Use double quotes around the src and it works fine:
<cfgridcolumn name="Phone" Header="<img src=""06.png"">" /># Posted By Sam Farmer | 11/5/09 12:44 PM -
Sam,
It is more than that, I discovered that yesterday after noticing the error message in fireBug, however it is broken code functionality that works in ColdFusion 8.
The other problem now is that any content that goes into the header, has to have the apostrophe escaped which is again breaking existing applications.
Also once that is done, there is about 4-5 more problems with our application that causes cfgrid functionality to not work.# Posted By Andrew Scott | 11/5/09 1:01 PM -
Ext 1.x -> Ext 3.x, you can't expect everything to work. If you wanna stay with Ext 1.x in CF9, read: http://samfarmer.instantspot.com/blog/2009/08/14/U...
-
Henry, what annoys me the most is when people comment on something they haven't tried in either versions of the language.
So let me explain something here, and if you take this the wrong way so be it.
The code in question is about being backward compatible, something that Adobe has even changed things on to make it so, in other aspects of the language.
Here we have an example, were not only does the cfgridcolumn no longer work for this application, but Adobe have also introduced other new features as switched on by default, that makes applications break.
This is not about whether we are using ExtJS1.1, or is it about using ExtJS2.2/3.0 it is about something that used to work in a previous version of ColdFusion that no longer works like it did.
The actual problem is the way Adobe create the JavaScript to create the config and definition of the Grid, and has nothing to do what version of ExtJS is being used. The other thing that is broken is that any text that contains an apostrophe in the grid headers will also break in ColdFusion 9, were it would not break in ColdFusion 8.
This is one feature that was raised before ColdFusion was released, but Adobe was more interested in releasing the product at a conference than making sure the bugs and anything that makes it backward compatible had been addressed.
# Posted By Andrew Scott | 11/5/09 2:57 PM -
Hi, I tried importing the 8 files and it see to work except this error message keeps popping up.
At Line 274 /cfExtJS11/ajax/package/cfgrid.js:
"var _29f=this.cellClickInfo.colInfo[_29e];"
this.cellClickInfo is null
Any thoughts?# Posted By Shawn | 4/19/10 3:30 PM -
Shawn, I tried to send you an email directly and your email is bouncing.
# Posted By Andrew Scott | 4/22/10 8:22 PM



TweetBacks