ColdFusion MX 7 Updater released
32 comments Posted by: LauraThis is really a great updater, as it has several bug fixes plus some enhancements. Everybody using Flash Forms should download it right now! We would like to thank Mike Nimer and the ColdFusion team for the many bug fixes and enhancements made to the Flash Forms.
These are my favorites:
- Script cfformitem type to write your own ActionScript functions, no more savecontent hack needed
- onload for Flash forms, no more ugly hacks
- onFocus and onBlur events for Flash Forms
- Mac OSX support
- date mask in cfgrid works
- id=“” works for most controls now
- cftextarea tag has a new attribute, html=”true|false”,
On the down side, new ActionScript keywords have been banned from Flash forms:
- createchild
- Createchildatdepth
- Createchildren
- Createclasschildatdepth
- Createclassobject
- Createemptyobject
- createobject
- httpservice
- remoteobject
- Uiobjectdescriptor
- webservice
ColdFusion Updates Download page
Category: ColdFusion |
32 Comments so far
Write yoursThese look like actionscript keywords that flex uses for remoting that have been banned?
You did previously mention in your posts that the method used for remoting by the MXNA READER could no longer work with the new updated version. Is this the case?
If so, what are the correct methods of implementing remoting using flash forms via facade for form drive applications?
Thanks for all the insight.
FYI we are writing an article for Devnet about Remoting that will be published soon :)
"The cfformitem tag type attribute now includes script as a valid value, which lets you create functions in Flash forms; this reduces the possibility of reaching the 32KB or 64KB limit errors."
How does this work?
Could you post some examples of how this would be better than cfsavecontent?
Thanks as always
That refers to making functions. They offer many advantages, as I wrote in this post:
http://www.asfusion.com/blog/entry/filtering-a-grid-as-you-type---using
It helps with the size limit problem because you can reuse functions. With the cfsavecontent approach, the code gets duplicated in every control you add it.
I agree 100% with you. To avoid that I use this to set my styles in the onLoad event, using globals styles:
_global.styles.Button.setStyle("borderThickness", 1);
_global.styles.Panel.setStyle("backgroundColor", 0xE5F0F9);
Is this download time for the flash form also dependant on having you combo boxes or grids been populated via remoting whilst the form is compiling. Would it not be better to have large grids make the remoting call once the form has compiled. if so how would you suggest this be scripted correctly?
You did mention that remoting is still possible, does this mean only but means of netservices only or can the new method be used?
Is it 32K sometimes and 64K others?
I am changing all of my styles to the _global.setStyle method because I hit the 32k error. It seems to be helping. What are the rest of the control names. ex. date input, text input, ect...
Thanks,
Brian
I am attempting to make a remoting call using a cfFormItem type="script" function, and I just can't seem to make it work..... any pointers? Thanks in advance - you guys truly are the tip of the sword :)
I am sure that this can be greatly improved upon, but it works:
<cfFormItem type="script">
//function to process the return object from the CFC
function getGridData( results: Object ):Void {
_root.existing_open_position.dataProvider = results;
}
//function to alert any error messages that get thrown while calling the CFC
function onStatus( stat: Object ):Void {
//if there is any error, show an alert
alert("Error while calling cfc:" + stat.description);
}
function populateGrid():Void {
//I am sure you will recognize most of THIS code <cfoutput>
//create connection
var connection:mx.remoting.Connection = mx.remoting.NetServices.createGatewayConnection("http://#cgi.HTTP_HOST#/flashservices/gateway/");
//declare service
var myService:mx.remoting.NetServiceProxy;
</cfoutput>
var responseHandler = {};
responseHandler.onResult = getGridData;
responseHandler.onStatus = onStatus;
//get service
myService = connection.getService("components.someCFCCall", responseHandler );
//make call
myService.someFunction(someParameterList);
}
</cfFormItem>
I am sure that there are much cleaner ways of doing this (I am an AS moron) - having a function dedicated to returning the NetService as an object, as opposed to having the code to create one in every single remoting function - but, for the moment, this works, and its better than what I had yesterday :)
I made a post making an example:
http://www.asfusion.com/blog/entry/using-global-css-in-your-cfform
Ryan
I don't know either :(
David: Has anyone providing a response to this question? I have started to replace many of my html forms with cfform flash forms but have noticed that loads times can vary a lot. I would like the users to see something other that the white screen while waiting. Any ideas?
---------------------------------------------
RE: CFFORM cfformitem script:
The new ability to add the cfformitem type="script" is a great change from using the cfcontent work around. However, aren't we backtracking here? Whatever happened to separating the display from the code? Is there a work around for this?
As for the flash forms taking a long time to load, keep any and all coldfusion code OUT of the form (such as loops, coldfusion variable names, etc), and the form will load just fine.
The FIRST time you load a form after making changes to it, the form has to recompile into an SWF file, so it takes some time. After that, it will load just fine.
As for seperating the code from the UI. You can still do that - just include an .AS file that contains all of your actionscript code.
Flash forms 32KB to 64KB .. How to do that...
I see in lot of posts as 64KB... How can we achieve that... Flash form limitation to 64KB ..
Please suggest
I have updated our coldfusion server to 7.02 from 7.01, however my Cfchart no longer works, none of the code has changed..only since the update has it ceased!
Im getting this error when attempting to display a cfchart (in any format)..
500
com/gp/api/styles/chart/MxStatisticalChartStyle
I have no idea what that means! Any help would be greatly appreciated!
Unfortunately, we cannot help you with that. I would seek help at Adobe...
Both part 1 and part 2 of the Devnet article have already been published: http://www.macromedia.com/devnet/coldfusion/articles/flashforms.html
http://www.macromedia.com/devnet/coldfusion/articles/flashforms_pt2.html
I just ran into the 32KB limit =(. Is there any way to change this limit to 64KB? Does any of you know if using Flash remoting will help?
Remoting does not help, but removing the styles does. See this example: http://www.asfusion.com/blog/entry/using-global-css-in-your-cfform
My remoting script was working fine, but now the only way I can get the movie to load is to remove the last three rows of my function:
<cfformitem type="script">function insertLeadStatus():Void {
var connection:mx.remoting.Connection = mx.remoting.NetServices.createGatewayConnection("#Interface.remoteConnectionPath#");
var myService:mx.remoting.NetServiceProxy;
var responseHandler = {};
var theList = displayLeadStatuses;
responseHandler.onResult = function(results: Object):Void { theList.dataProvider = results; };
responseHandler.onStatus = function(stat: Object):Void { alert("Error while calling cfc:" + stat.description); };
myService = connection.getService("intranet.components.leads", responseHandler );
myService.addLeadStatus(leadStatusName.text, leadStatusDescription.text);
leadStatusName.text = "";
leadStatusDescription.text = "";
}
</cfformitem>
Obviously my remoting will not work without the last three lines as that is where I pass the variables to the component and clear the add form.... very strange anyone have any ideas?