I have been playing with cf7 new flex form functionality, it's very nice! However.....
I have set a query to populate a cfgrid. Assigning a query column of type bit to a cfgrid column of type BOOLEAN. When cf generates the page it appears as if the data from the query correctly populates the cfgrid. i.e ticks where there should be ticks etc.. All good so far... Whew!
Now when I try set(with actionscript) another cfinput of type checkbox(i.e sort of like binding the cfgrid BOOLEAN column to a separate cfinput of type checkbox, which does not work apparently). It does not appear to obtain the correct value from the cfgrid column. It ends up converting the value to true regardless???. I have tried debugging and the value from the cfgrid column BOOLEAN comes back as true or false, however im not sure of I'ts type. Another interesting point is that when I manually check/click the cfgrid column BOOLEAN it then appears to work fine.
It's a little hard to define however essentially :
Populating a cfgrid boolean column with a query column of type bit(true,false), does not set the selected value correctly.
Manually checking the cfgrid box does correctly set the cfgrid column property "selected" to (true, false).
Here is some sample code that demonstrates this, when you first load it try clicking on the column(not the checkboxes) to activate the onChange on the cfgrid. It will not correctly update the cfinput:checkbox value. However if you manually change the checkbox's in the cfgrid and then try the same it works correctly :
<cfset aValues = arrayNew(1)>
<cfset aValues[1] = true>
<cfset aValues[2] = false>
<cfset aValues[3] = true>
<cfset aValues[4] = false>
<cfset aValues[5] = true>
<cfset qTest = queryNew("")>
<cfset queryaddColumn(qTest,"test_column","bit",aValues)>
<cfform format="Flash">
<cfgrid name="gTest" height="250" width="550" format="FLASH" query="qTest" selectmode="EDIT" = Boolean(gTest.dataProvider[gTest.selectedIndex]['test_column'])">
<cfgridcolumn name="test_column" header="test_column" width="40" select="Yes" display="Yes" type="BOOLEAN" headerbold="No">
</cfgrid>
<cfinput type="Checkbox" name="test_column" label="Test:" 'test_column', test_column.selected );" visible="Yes" enabled="Yes">
</cfform>
Theo
---You are currently subscribed to cfaussie as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED] Aussie Macromedia Developers: http://lists.daemon.com.au/
| ______________________________________________________________________ This email, including attachments, is intended only for the addressee and may be confidential, privileged and subject to copyright. If you have received this email in error, please advise the sender and delete it. If you are not the intended recipient of this email, you must not use, copy or disclose its content to anyone. You must not copy or communicate to others content that is confidential or subject to copyright, unless you have the consent of the content owner. |
