Apr
24

CF Widgets == Small Rich Internet Applications

32 comments Posted by: Nahuel

With the release of flash 6, we started hearing about the benefits of the RIAs, the marvels of a web application without refreshing, the "one page" interfaces, etc. By the time version 7 was released, Flex and Lazlo (ok, Lazlo was first) began to show the advantages of developing a RIA without the flash IDE. Now we have NeoSwiff (in beta), Xamlon (in Beta), Ajax (in JavaScript), xul (from Mozilla foundation), etc.

On the other hand, there exists the cool concept of a widget, a mini-application that sits on the desktop. Apple will introduce widgets with Dashboard when it releases Tiger in a few days. But this is not something new, Konfabulator (which works on Mac and PC) and others have previously implemented them. But widgets are not limited to the desktop, a small RIA can also be called a widget: etrade made a good one in flash 6, xamlon made a calculator and Lazlo made a weather app. In this way, the concept of a RIA and a widget are related.

With the introduction of Flash Forms, ColdFusion now gets into the party. Flash forms’ primary goal is to enhance regular html forms, that is why they are called rich forms (and not rich internet applications). However, we can create small internet app or widgets with them. I called them small because they have limitations and we cannot make big applications with them.

I’ve made two CFwidgets that are built with cfforms only. The first one is CF Weather. It uses a cfc to pull the data from weather.com. You can add your zip code or your city and it will remember your information in a cookie.

The other one is CF Calculator, a simple app, but very easy to extend to handle other functions such as square root.

CF widgets Weather

CF widgets Calculator

View CF Weather in action.
View CF Calculator.
Download the weather.
Download the calculator.

Category: CFForm | ColdFusion |

32 Comments so far

Write yours
Arindam Biswas
2. Arindam Biswas wrote on April 26, 2005 at 1:00 PM
What the!

Great work!
PaulH
3. PaulH wrote on May 17, 2005 at 4:27 AM
i was meaning to mention this but forgot....your weather widget can be used outside the US by using weathe.com's "code" for that city/weathe station. for example bangkok's code is THXX0002.
Nahuel
Yes, you can also input the city name and it will find it, or it will show possible options to choose if there is more than one city with the same name.
Cornel
Great Little Apps...from a great guy...
See you at PbD v.2006 !
Mike
6. Mike wrote on May 27, 2005 at 4:13 PM
Argh, I'm trying to use this app because it looks very cool - I just can't seem to figure out the base path variable for the life of me. Is it the root of the directory on the file system, the root of the coldfusion mapping, or the root of the web server mapping?? My choices:

/home/softball/
/softball/ (coldfusion mapped directory)
/softball/ (apache mapping)

I've tried those 2, and neither work - but that's where the folder is, so I'm at a lost as for what it's expecting.
Laura
The path is the absolute path of the web folder as you see it from a browser. Say you have the following address:

http://www.example.com/dir1/dir2/mypage.cfm

and you want to have the weather app in mypage.cfm, then your basepath will be:
/dir1/dir2/

If that does not work, then the problem could be something else.
jason
very nice little app. one question...i cannot get it to load outside my local network. locally, it works great but when an external address calls the page i get 'movie not loaded'

i signed up with weather.com so i have my own auth codes.

any ideas?
Laura
jason,
Do all other flash forms work?
jason
yes, i have other functioning flash forms on that site.
Laura
jason,
is it the same path whether you access it locally or from outside?
ie: http://localhost/mydir/cfmpage.cfm
and http://externaladdress/mydir/cfmpage.cfm
would be the same path.



jason
yes, the path is the same...it's on my index.cfm page. trying to troubleshoot this last night, i discoved that it only is working on one machine in my local network. i found it odd that only the development workstation will properly display the app. no web files, web server, or cf server are running on that machine.

maybe i have a base path issue?

i'm a cf developer and i really like these cf flash forms but i'm disappointed in the long load times, especially for dynamic forms. the weather app loads pretty quickly, yet it is dynamic. what's the secret to get these cf flash forms to load in a reasonable amount of time? have you noticed long load times? if so, how have you been dealing with it?

thanks

jason
jason
problem solved. the issue was access to weather.cfm....users outside the local network did not have access to that file.

thanks for your help and the cool little widget.

any thoughts on flash form load times?

jason
Nahuel
Something to look for is recompilation of the form. Make sure you are not generating a different form every time with cfif, loops or similar. Only loaded data should be dynamic.
In addition, try not to use too many nested containers if possible, but I don't have a secret.
Ian
sigh. I am having issues getting CFWeather to run. I keep getting 'Expression Exception' errors: C:\WWWROOT\CFWeather\com\cfwidgets\weather.cfm : line 109 - Cannot find CFML template for custom tag flashCallCFC.

I have tried settings baspath to C:\WWWROOT\CFWeather\, to http://devnet.devlab.net/cfweather/ and to /CFWeather/. Still the 'Expression Exception' error.

Can anyone offer any insights?
Roy F
16. Roy F wrote on August 18, 2005 at 9:38 PM
Hi,

I am am trying to use CF weather, but keep getting the following error:

Cannot find CFML template for custom tag flashCallCFC.
ColdFusion attempted looking in the tree of installed custom tags but did not find a custom tag with this name.

Any idea how I can fix this? thanks for any help.

Regards,
Roy F.
manuel
La aplicación es estupenda, pero aun no logro hacer que funcione localmente, uso cfmx 6.0, como webserver el integrado por cf, la estructura es la siguiente wwwroot\dir1\weather, he creado el mapa en el administrador direccionando a la carpeta com, pero obtengo el siguiente mensaje

Error Occurred While Processing Request
Local variable keys on line 190 must be grouped at the top of the function body.

Nahuel
Hola Manuel,
Para que ande es necesario que tengas ColdFusion MX 7, ya que las cfforms que uso solo estan disponibles en la version 7
Saludos
manuel
Muchas gracias Nahuel, por tu respuesta tan rapida, ya nada mas me queda felicitarte por tremenda aplicación, tendras idea que como lograr algo similar que funcione en la version o 6.1, estamos desarrollando un administrador de contenidos para la empresa que laboro y me gustaria realizar alguno (o en su defecto conseguir) para montarlo en el sistema....Nuevamente gracias
Nahuel
Manuel,
En CF 6.0 es imposible. Lo unico que se me ocurre es que lo hagas con puro flash y uses CodFusion para obtener la data ( pero de esta forma tardarias mucho mas en el desarrollo).
Lo mejor es que instales el coldFusion 7 :)
Joe Falletta
21. Joe Falletta wrote on November 17, 2005 at 10:25 PM
Hi,

I am am trying to use CF weather, but keep getting the following error:

Cannot find CFML template for custom tag flashCallCFC.
ColdFusion attempted looking in the tree of installed custom tags but did not find a custom tag with this name.

Any idea how I can fix this? thanks for any help.

Regards,
Joe F.
Dale M.
22. Dale M. wrote on November 19, 2005 at 7:34 AM
Hi,

I am having the same problem with the custom tag error "Cannot find CFML template for custom tag flashCallCFC". I'm pretty sure that the absolute path is set correctly.

Anyone have an answer to this problem?

Dale M.
Joe F.
23. Joe F. wrote on November 19, 2005 at 8:57 AM
Hello all,
To those that had same problem I had, the custom tag error "Cannot find CFML template for custom tag flashCallCFC". The fix is easy, take files in the "cfwidgets" directory, not the com/cfwidgets but the plain cfwidgets directory and copy/paste them into your route install of CFMX in the "CustomTag" directory. Having doing that all worked OKay
Jet
24. Jet wrote on January 02, 2006 at 9:17 AM
What would be the calling template for the basePath? I understand what you mean by the absulute path but I need to know what the base template if refering too. Take care and have a great day.
Sif
Great App, I'm getting an error 500 null
James
26. James wrote on February 05, 2006 at 3:19 AM
Has anybody got a solution or BETTER instructions for setting up this app. I see loads of questions regarding this error result after an attempted set up: "Cannot find CFML template for custom tag flashCallCFC."
<br><br>
Here's my set up:
<br><br>
http://localhost:8500/cfweather/index.cfm
<br><br>
I click "View CF Weather" but I get the above error.
<br><br>
http://localhost:8500/cfweather/weather.cfm
<br><br>
<cfmodule template="/com/cfwidgets/weather.cfm" locationid="92660" units="s" ignorecookie="false" serviceObject="#application.cfwidgets.weather.service#" basePath="/">
<br><br>
What URL do I need in the basePath?
<br><br>
Also I have added a mapping called /com pointing to com directory.

Can someone please help me set this up? :)

Thanks
James
27. James wrote on February 05, 2006 at 5:34 AM
O.k. I followed the fix posted by Joe F. and it works. Thanks Joe. :)

Seems like an easy enough addition to the readme.txt for those having the same trouble.
John Barrett
WOW Laura,
This is so wonderful`-`
Finally got this to work, did not know I had to set up cftags in the cfadmin(mappings). cool that I got to learn that tonight.
Just wondering the settings do not seem to work. I did sign up for my own IDs through weather.com.

Thanks so much for sharing this`-`
Aloha,
John
Panos
29. Panos wrote on June 05, 2006 at 1:10 AM
I get the following error when i try to view the weather.cfm.
Any comments?



Element conditions is undefined in a CFML structure referenced as part of an expression.

The error occurred in F:\inetpub\intranet\www\demo\include\ermesintranet\cfweather\com\cfwidgets\weather.cfc: line 228
Called from F:\inetpub\intranet\www\demo\include\ermesintranet\cfweather\com\cfwidgets\weather.cfm: line 39
Called from F:\inetpub\intranet\www\demo\include\ermesintranet\cfweather\com\cfwidgets\weather.cfm: line 1
Called from F:\inetpub\intranet\www\demo\include\ermesintranet\cfweather\com\cfwidgets\weather.cfm: line 1
Called from F:\inetpub\intranet\www\demo\include\ermesintranet\cfweather\weather.cfm: line 11

226 :       
227 : <cfscript>
228 :    if ( weatherData["conditions"] NEQ "N/A" ) {
229 :       data = data & '<font size="16" face="#font#" color="#fontcolor#" ><b>' &weatherData["conditions"] & "</b></font><br/><br/>";
230 :    }
j.martin
30. j.martin wrote on November 14, 2006 at 4:39 PM
I've been running the weather widget for over a year with no problems. This week it started throwing the "Element conditions is undefined in a CFML structure referenced as part of an expression." error mention in an earlier post.

Any ideas?
Jeremy
31. Jeremy wrote on November 08, 2007 at 9:50 AM
I am having the same issue as j.martin and Panos. Can someone please help?
Jeremy
32. Jeremy wrote on November 08, 2007 at 10:55 AM
I am having the same issue as j.martin and Panos. Can someone please help?

Leave your comment

Comment etiquette: As a gesture to those subscribed to this post, please keep your comments relevant to the post.

Your email address will never be displayed.
Email is gravatar enabled.Gravatar are the pictures you see next to the comments. If you like to have one, visit gravatar



Allowed tags:

<code>
All other tags will be shown as such, when in doubt, use the preview.




Preview:

Refresh Preview
1. You wrote on