ColdFusion Dashboard for Mobile Devices
Filed under ColdFusion , Flex
I have been making flex 3 dashboards for various manager and they seem to really like them. The problem that I am posed with now is that my company is run on Blackberry's and the managers want to be able to view the dashboards on their mobile devices. Here is some stuff that I found along the way and maybe it will help some other out that need to accomplish this task.
I wanted to recognize that the user was coming from a mobile phone to redirect them to the mobile phone section of the website. This is pretty easy to accomplishin ColdFusion.
| <cfif CGI.HTTP_ACCEPT CONTAINS "text/vnd.wap.wml"> <cflocation url="/cp/dash_mobile.cfm"> </cfif> <cfif findNoCase("iphone", cgi.http_user_agent)> <cflocation url="/cp/dash_mobile.cfm" addToken="false"> </cfif> |
I searched for ways to to recognize a mobile browser and found these two if statement. The first if statement searches for a wireless browser language and redirects if it finds. The next if statement solves the problem for the users with an iphone. The iphone uses safari and it is not recognized as a mobile broswer.
After the user has been redirected using <cflocation> I made a small replica or the flex 3 dashboard using cfchart format="jpg". You may want to remove the graph tips as they come out messed up on blackberry and also make sure that your images are small in size or else it takes too long to load. I want to also point out that your page can be set up different for the iphone users because the browser is better. (Blackberry Storm comes out tomorrow so we shall see). All of this will hopefully change when flex 3 is viewable on mobile devices ;) Let me know if you have any experience doing what I am trying to do
| View count: 821
Nov19








