<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Axelology &#187; Coldfusion</title>
	<atom:link href="http://www.axelscript.com/category/coldfusion/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.axelscript.com</link>
	<description>Axel Jensen on Flex, Coldfusion and... other stuff</description>
	<lastBuildDate>Thu, 29 Dec 2011 17:03:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Using RemoteObject to access a Remote CFC</title>
		<link>http://www.axelscript.com/2008/06/16/using-remoteobject-to-access-a-remote-cfc/</link>
		<comments>http://www.axelscript.com/2008/06/16/using-remoteobject-to-access-a-remote-cfc/#comments</comments>
		<pubDate>Mon, 16 Jun 2008 17:38:53 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Coldfusion]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://www.axelscript.com/?p=134</guid>
		<description><![CDATA[I get very closed minded sometimes&#8230; and this is one of those times&#8230; when working with flash remoting with the ColdFusion 7.0.2 updater, there were a lot of good examples on http://www.asfusion.com, I followed them a lot, they were all great&#8230; they specified how to create a connection like the following: //create connection var connection:mx.remoting.Connection [...]]]></description>
			<content:encoded><![CDATA[<p>I get very closed minded sometimes&#8230; and this is one of those times&#8230; when working with flash remoting with the ColdFusion 7.0.2 updater, there were a lot of good examples on <a href="http://www.asfusion.com" target="_blank">http://www.asfusion.com</a>, I followed them a lot, they were all great&#8230; they specified how to create a connection like the following:</p>
<p><code>//create connection</p>
<p>var connection:mx.remoting.Connection = mx.remoting.NetServices.createGatewayConnection("http://#cgi.HTTP_HOST#/flashservices/gateway/");<br />
//declare service</p>
<p>var myService:mx.remoting.NetServiceProxy;</code></p>
<p><code>//make an object that will handle the response</p>
<p>var responseHandler = {};</p>
<p>//function that receives the response</p>
<p>responseHandler.onResult = function( results: Object ):Void {<br />
//when results are back, we show the text received</p>
<p>display.text = results;<br />
}</p>
<p>//function that receives any error that may have occurred during the call</p>
<p>responseHandler.onStatus  = function( stat: Object ):Void {<br />
//if there is any error, show an alert</p>
<p>alert("Error while calling cfc:" + stat.description);<br />
}</p>
<p>//get service. First parameter is path to component and<br />
//the second it's the object that will handle the response</p>
<p>myService = connection.getService("flashRemotingResponder", responseHandler );<br />
//make call</p>
<p>myService.getDate(mask.text);<br />
</code></p>
<p>this code is great&#8230; you set up a service (called myService in this example, it&#8217;s calling a cfc called &#8216;flashRemotingResponder&#8217;)</p>
<p>When flex2 came out, and all of the examples starting coming out with it, and how to use it with ColdFusion, there were a lot of remoting examples using mx:RemoteObject&#8230; something like the following<more/><code>&lt;mx:RemoteObject source="com.SomeCFC" destination="ColdFusion" result="someResultHandler(event)" fault="someFaultHandler(event)"/&gt;</code></p>
<p>This is just psuedo code, so don&#8217;t copy and paste it&#8230; but I myself got caught up in this&#8230; we&#8217;ve recently been trying to hire another flex developer&#8230; we&#8217;ve got projects to do, and so we&#8217;re considering doing some contracting, but the problem is, we need someone that knows coldfusion and flex, and that seems to be a Hot combo right now, and most of the developers that know both of those things well are getting paid fairly well, and full of work&#8230; the point is, you can still use the RemoteObject tag to call cfc&#8217;s remotely, and call services like you used to be able to in flashremoting.   you use the &#8216;endpoint&#8217; attribute in remoteObject.  </p>
<p><code>&lt;mx:RemoteObject id="remoteService"<br />
		source="com.test"<br />
		destination="ColdFusion" endpoint="http://127.0.0.1:8500/flex2gateway/"<br />
		result="onResult(event)"<br />
		fault="onFault(event)"/&gt;</code></p>
<p>You use the source like you would as if the objects are local to the webroot, and use the endpoint to specify a remote domain.  This may be common knowledge to everyone out there, but I simply just forgot about even trying it&#8230; I got so caught up with having coldfusion locally installed, and working with the cfc&#8217;s myself, I simply got close minded about it&#8230; </p>
<p>anyway, check out the post about it at the following link, it&#8217;s where I got my answer.<br />
<a href="http://www.flashcomguru.com/index.cfm/2006/11/11/flex2remoting" target="_blank">http://www.flashcomguru.com/index.cfm/2006/11/11/flex2remoting</a></p>
<img src="http://www.axelscript.com/?ak_action=api_record_view&id=134&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.axelscript.com/2008/06/16/using-remoteobject-to-access-a-remote-cfc/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>SQL Update Tip</title>
		<link>http://www.axelscript.com/2008/03/28/sql-update-tip/</link>
		<comments>http://www.axelscript.com/2008/03/28/sql-update-tip/#comments</comments>
		<pubDate>Fri, 28 Mar 2008 05:38:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Coldfusion]]></category>
		<category><![CDATA[Category]]></category>

		<guid isPermaLink="false">http://www.axelscript.com/2008/03/28/sql-update-tip/</guid>
		<description><![CDATA[Just noting for myself on how to update tables from other tables&#8230; Say you have a table called &#8220;customers&#8221; and you have a customerID as the primary key&#8230; you now have a cross reference table that joins customers to certain products, it&#8217;s only a 1 to 1 relationship in our situation (not very real world [...]]]></description>
			<content:encoded><![CDATA[<p>Just noting for myself on how to update tables from other tables&#8230;</p>
<p>Say you have a table called &#8220;customers&#8221; and you have a customerID as the primary key&#8230;</p>
<p>you now have a cross reference table that joins customers to certain products, it&#8217;s only a 1 to 1 relationship in our situation (not very real world with this example for customers/products, but it&#8217;s only an example), the database was made in flaw, so you want to do some clean up&#8230;</p>
<p>Your goal is to get rid of the cross reference table called &#8220;tblCustomerProduct&#8221; it has three columns, &#8220;customerID, productID, catID&#8221; you want to add the column &#8220;productID, and catID&#8221; to the &#8220;customers&#8221; table, and want to get rid of the cross reference table&#8230;</p>
<p>now you run your update, and it&#8217;s a simple sql statement rather than looping over it in coldfusion the db runs it in no time!</p>
<p><code>--psuedo code<br />
update  c<br />
SET c.productID = o.productID,<br />
c.catID = o.catID<br />
FROM customers<br />
JOIN tblCustomerProduct o<br />
ON c.customerID = o.customerID</code></p>
<p>works good&#8230;</p>
<p>again this is just psuedo code and is a reminder to myself to remember how to do this simple task, I would have done in coldfusion before, now i can use this <img src='http://www.axelscript.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<img src="http://www.axelscript.com/?ak_action=api_record_view&id=113&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.axelscript.com/2008/03/28/sql-update-tip/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Sorting Dates In a DataGrid In Flex 2</title>
		<link>http://www.axelscript.com/2008/03/11/sorting-dates-in-a-datagrid-in-flex-2/</link>
		<comments>http://www.axelscript.com/2008/03/11/sorting-dates-in-a-datagrid-in-flex-2/#comments</comments>
		<pubDate>Tue, 11 Mar 2008 18:16:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Coldfusion]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://www.axelscript.com/2008/03/11/sorting-dates-in-a-datagrid-in-flex-2/</guid>
		<description><![CDATA[  When I googled &#8220;sorting dates in a datagrid in flex&#8221; I found all sorts of outdated material, and some really complicated results, that i tried, but they just didnt happen to work in my situation&#8230; i&#8217;m not sure what everyone else was doing to create their dates, but I&#8217;ve heard a number of people [...]]]></description>
			<content:encoded><![CDATA[<p class="body">  	When I googled &#8220;sorting dates in a datagrid in flex&#8221; I found all sorts of outdated material, and some really complicated results, that i tried, but they just didnt happen to work in my situation&#8230; i&#8217;m not sure what everyone else was doing to create their dates, but I&#8217;ve heard a number of people saying it was very hard, or at least harder than they imagined&#8230;</p>
<p> <a href="http://axelscript.com/wp-content/cfwtExamples/formatDateInADataGrid/bin/formatDateInADataGrid.html" target="_blank">APPLICATION  </a>   <a href="http://axelscript.com/wp-content/cfwtExamples/formatDateInADataGrid/bin/srcview/index.html" target="_blank">- SOURCE  </a></p>
<ul>
<li>  <a href="http://blog.flexexamples.com/2007/08/12/sorting-date-columns-in-a-datagrid/" target="_blank">http://blog.flexexamples.com/2007/08/12/sorting-date-columns-in-a-datagrid/  </a></li>
<li>  <a href="http://weblogs.macromedia.com/pent/archives/2004/12/sorting_by_date.cfm" target="_blank">http://weblogs.macromedia.com/pent/archives/2004/12/sorting_by_date.cfm  </a></li>
<li>  <a href="http://erikloehfelm.blogspot.com/2007/06/sorting-dates-in-flex-datagrid.html" target="_blank">http://erikloehfelm.blogspot.com/2007/06/sorting-dates-in-flex-datagrid.html  </a></li>
<li>  <a href="http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=60&amp;catid=585&amp;threadid=1292936&amp;enterthread=y" target="_blank">http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=60&amp;catid=585&amp;threadid=1292936&amp;enterthread=y  </a></li>
<li>  <a href="http://www.5etdemi.com/blog/archives/2006/01/sorting-datagrid-columns-numerically/" target="_blank">http://www.5etdemi.com/blog/archives/2006/01/sorting-datagrid-columns-numerically/  </a></li>
</ul>
<p>that it is&#8230; a true statement in deed&#8230; just a note, but i havent even tried filtering on this&#8230; so forgive me if my solution wont work for it&#8230;</p>
<p><span id="more-102"></span><br />
I kept battling this issue, and went back to one of the books i read &#8220;Adobe Flex 2 training from the source&#8221; and found an example in there, and built from it&#8230;</p>
<p class="code">/////////////////////script bloc<span style="color: #808080"><em>k///////////</em></span> private function dateLabel(item:Object, column:DataGridColumn):String<br />
{<br />
return dateFormatter.format(item[column.dataField]);<br />
}</p>
<p><span style="color: #808080"><em> /////////////////////script block///////////</em></span><br />
<span style="color: #000080">&lt;mx:DateFormatter id=<span style="color: #0000ff">&#8220;dateFormatter&#8221;</span>/&gt;</span></p>
<p><span style="color: #000080">&lt;mx:DataGrid dataProvider=<span style="color: #0000ff">&#8220;{acData}&#8221;</span>&gt;</span><br />
<span style="color: #000080">&lt;mx:columns&gt;</span><br />
<span style="color: #000080">&lt;mx:DataGridColumn dataField=<span style="color: #0000ff">&#8220;name&#8221;</span> /&gt;</span></p>
<p><span style="color: #000080">&lt;mx:DataGridColumn dataField=<span style="color: #0000ff">&#8220;dob&#8221;</span><br />
labelFunction=<span style="color: #0000ff">&#8220;dateLabel&#8221;</span>/&gt;</span></p>
<p><span style="color: #000080">&lt;/mx:columns&gt;</span><br />
<span style="color: #000080">&lt;/mx:DataGrid&gt;</span></p>
<p>Please refer to the source links at the top and bottom of the entry for the real source&#8230; that code block is not safe to copy and paste and just work&#8230;. its just psuedocode.</p>
<p>If you notice I use a mx:DateFormatter id=&#8221;dateFormatter&#8221; and by default the format is &#8216;mm/dd/yyyy&#8217; so we dont need to supply a format for this example&#8230;</p>
<p>and in the script block there is a very simple function that just formats the label of the date column&#8230; and returns a string&#8230; and my sorting is working fine for now&#8230; please feel free to comment if you see any downfalls in what I have done&#8230;</p>
<p><a href="http://axelscript.com/wp-content/cfwtExamples/formatDateInADataGrid/bin/formatDateInADataGrid.html" target="_blank">APPLICATION  </a>   <a href="http://axelscript.com/wp-content/cfwtExamples/formatDateInADataGrid/bin/srcview/index.html" target="_blank">- SOURCE  </a></p>
<img src="http://www.axelscript.com/?ak_action=api_record_view&id=102&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.axelscript.com/2008/03/11/sorting-dates-in-a-datagrid-in-flex-2/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>CFEclipse 1.3 Tries to read my variables</title>
		<link>http://www.axelscript.com/2008/03/11/cfeclipse-13-tries-to-read-my-variables/</link>
		<comments>http://www.axelscript.com/2008/03/11/cfeclipse-13-tries-to-read-my-variables/#comments</comments>
		<pubDate>Tue, 11 Mar 2008 18:15:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[cfeclipse]]></category>
		<category><![CDATA[Coldfusion]]></category>

		<guid isPermaLink="false">http://www.axelscript.com/2008/03/11/cfeclipse-13-tries-to-read-my-variables/</guid>
		<description><![CDATA[You know&#8230; I&#8217;ve grown very fond of cfeclipse and have learned that when you do updates, and start getting miscellaneous errors, and you can&#8217;t seem to get anything working&#8230; to just start over and stop wasting time spinning your wheels trying to fix it. I spent my fair share of time, trying to get cfeclipse [...]]]></description>
			<content:encoded><![CDATA[<p>You know&#8230; I&#8217;ve grown very fond of cfeclipse and have learned that when you do updates, and start getting miscellaneous errors, and you can&#8217;t seem to get anything working&#8230; to just start over and stop wasting time spinning your wheels trying to fix it.</p>
<p>I spent my fair share of time, trying to get cfeclipse working with flexbuilder, and all was fine and dandy till they started coming out with updates and eclipse starting updating&#8230; everything grew&#8230; but flexbuilder is stuck in (soon to be)old times&#8230; and it really aggravates me that when you go to cfeclipse.org you can&#8217;t seem to find a place to download old versions&#8230;</p>
<p>I&#8217;ve found a couple of non helpful links that give me places to download older versions of cfeclipse&#8230; but just ended up in a run around.</p>
<p>I just decided to beef up my machine with more ram, and then downloaded Europa (newest version to date of eclipse 3.3.0) and then ran the cfeclipse update site, and everything started to work again&#8230;.</p>
<p>When I downloaded the new version, i noticed cfeclipse tried to know what my variables were, and I couldnt tell exactly where it was pulling these variables from? was it the cfset tag? the cfparam? cfargument? cffunction? what was it?</p>
<p>I never use this feature because it&#8217;s just not quite there yet&#8230; it&#8217;s more of a distraction, and you have to press &#8220;esc&#8221; to get out of it, or grab ur mouse and click out of it&#8230; it&#8217;s just somewhat of a nuisance right now&#8230; so here is how to shut it off&#8230;</p>
<p>the only reason I had an Idea of what to look for is because i notices some new settings coming from older versions, I was easily able to recognize these differences unlike some of the other guys in the office who just started using eclipse after 3.3&#8230;</p>
<p>(click Window &gt; Preferences &gt; Cfeclipse &gt; File Parser uncheck &#8220;Parse Variables as you type&#8221;)</p>
<p>now I kind of understand why it only picks up some variables&#8230; judging on the title of the checkbox, it parses them as you type, and doesn&#8217;t just pick them up from tags? maybe thats how it works, i&#8217;m not sure?</p>
<p>anyway&#8230; cfeclipse is awesome because at least you can check if you want all of this stuff or not&#8230; its so adverse and customizable! it&#8217;s great.</p>
<p>Thanks Mark Drew and everyone else who was prior and still is part of the cfeclipse team. thank you.</p>
<img src="http://www.axelscript.com/?ak_action=api_record_view&id=101&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.axelscript.com/2008/03/11/cfeclipse-13-tries-to-read-my-variables/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Timezone Issues with remote (Date/Time) data and flash</title>
		<link>http://www.axelscript.com/2008/02/20/timezone-issues-with-remote-datetime-data-and-flash/</link>
		<comments>http://www.axelscript.com/2008/02/20/timezone-issues-with-remote-datetime-data-and-flash/#comments</comments>
		<pubDate>Wed, 20 Feb 2008 22:41:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Coldfusion]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://www.axelscript.com/2008/02/20/timezone-issues-with-remote-datetime-data-and-flash/</guid>
		<description><![CDATA[Application &#8211; Source We are wrapping up with this great charting application at cfwebtools, and we get a call from a customer that says our data is wrong&#8230;. We listen to them, and debug, and for some reason we just can&#8217;t quite see the same thing he see&#8217;s&#8230; On top of that, no one else [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://axelscript.com/wp-content/cfwtExamples/DateTimeWierdness/bin/DateTimeWierdness.html" target="_blank">Application</a> &#8211; <a href="http://axelscript.com/wp-content/cfwtExamples/DateTimeWierdness/bin/srcview/index.html" target="_blank">Source</a></p>
<p>We are wrapping up with this great charting application at cfwebtools, and we get a call from a customer that says our data is wrong&#8230;.</p>
<p>We listen to them, and debug, and for some reason we just can&#8217;t quite see the same thing he see&#8217;s&#8230; On top of that, no one else is having the problem, but the fact is that, he has showed us screen shots, he&#8217;s duplicated on Four pc&#8217;s of his own, and he&#8217;s talked to 10 friends telling us that our data is wrong, and that there is mismatched days in our chart.</p>
<p>The problem:</p>
<p>When he was bringing up the charting application, the charts showed up successfully, but when you ta<br />
ke a closer look, and you know your stuff about Financial Charting applications, you know what your looking for, and you know it with GREAT detail.  So this guy, tells us our data is wrong, and pretty much with all of his friends proved to us SOMETHING was going wrong, but we couldn&#8217;t duplicate it.</p>
<p><span id="more-88"></span></p>
<p>We tried trapping the data he was requesting when the request came in, we tried trapping it right before it went out&#8230; then we were using Kevin Langdon&#8217;s Service Capture to introspect the data that was coming in to flex.</p>
<p>The data is not that complicated, it looks like this:</p>
<p>Application &#8211; Source</p>
<p>Date: 2/20/08<br />
Close: 31.53<br />
Open: 30.61</p>
<p>Date: 2/19/08<br />
Close: 30.93<br />
Open: 30.94</p>
<p>but on his computer it looked like this:</p>
<p>Date: 2/19/08<br />
Close: 31.53<br />
Open: 30.61</p>
<p>Date: 2/18/08<br />
Close: 30.93<br />
Open: 30.94</p>
<p>EVERYTHING WAS SLID BACK BY ONE DAY.</p>
<p>the Date/Time objects were coming back from coldfusion, and it was returning coldfusion sql. They looked like this:<br />
&#8217;2/20/08 00:00:00&#8242;<br />
&#8217;2/19/08 00:00:00&#8242;<br />
&#8217;2/18/08 00:00:00&#8242;</p>
<p>what was really happening is that, flash auto adjusts for your Timezone&#8230; so what was really happening is the data is getting turned into this in flash (if they come back to flash as date/time objects)</p>
<h2>Pacific Standard Time</h2>
<p>&#8217;2/19/08 22:00:00&#8242;<br />
&#8217;2/18/08 22:00:00&#8242;<br />
&#8217;2/17/08 22:00:00&#8242;</p>
<p>I&#8217;m sort of at a loss and i&#8217;m looking for help, there is one post that was more clear than the rest, but still doesnt solve my issue, it&#8217;s written by <a href="http://www.onflex.org/ted/2004/10/handling-time-in-flash.php" target="_blank">Ted Patrick</a> of adobe.  He states to use Universal Time, (UTC).</p>
<h2>I have a problem with this!</h2>
<p>I&#8217;m not the one creating the date times, nor do I get a chance to touch the data before it goes to my components&#8230; Of course I could obviously go in, to my result function of my remote object, or my command of cairngorm, and loop over the data, and adjust it all manually&#8230; BUT NOOOOO, I Don&#8217;t want to, what if i&#8217;m dealing with 40,000 records in a charting application (how bout we make it an even MILLION records, just to prove a point), then obviously the flash player has enough work to do on it&#8217;s own, without me looping through the data.</p>
<p>How do I query my database, and have it be a 00:00:00 time, and not have flash offset my date when it comes back to it?</p>
<p>For now, we manually change things in our query to add hours to the date time, but that is kind of sloppy&#8230;</p>
<p>Please check the example, and help me out if you can&#8230; Like I said I&#8217;m at a loss with this one.</p>
<p><a href="http://axelscript.com/wp-content/cfwtExamples/DateTimeWierdness/bin/DateTimeWierdness.html" target="_blank">Application</a> &#8211; <a href="http://axelscript.com/wp-content/cfwtExamples/DateTimeWierdness/bin/srcview/index.html" target="_blank">Source</a></p>
<img src="http://www.axelscript.com/?ak_action=api_record_view&id=88&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.axelscript.com/2008/02/20/timezone-issues-with-remote-datetime-data-and-flash/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Returning a query to flex as xml</title>
		<link>http://www.axelscript.com/2008/02/15/returning-a-query-to-flex-as-xml/</link>
		<comments>http://www.axelscript.com/2008/02/15/returning-a-query-to-flex-as-xml/#comments</comments>
		<pubDate>Fri, 15 Feb 2008 19:02:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Coldfusion]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://www.axelscript.com/2008/02/15/returning-a-query-to-flex-as-xml/</guid>
		<description><![CDATA[Somebody posted on a forum and asked &#8220;How do you get a mx:Tree to populate with query data from flex?&#8221; Most of the examples out there use xml in the mx:Tree so I did the same&#8230; There are a few ways to get your query data to valid xml&#8230; You can go to cflib.org and [...]]]></description>
			<content:encoded><![CDATA[<p class="body"> 		Somebody posted on a forum and asked &#8220;How do you get a mx:Tree to populate with query data from flex?&#8221; Most of the examples out there use xml in the mx:Tree so I did the same&#8230;</p>
<p>There are a few ways to get your query data to valid xml&#8230;</p>
<p>You can go to cflib.org and get a udf called <a href="http://www.cflib.org/udf.cfm?ID=648" target="_blank">QueryToXML</a> and that is supposed to convert your query to valid xml&#8230; I&#8217;ve never used this, and personally I like writing my own because it gives me more control&#8230; and I like to know how things work.  There are a couple of things you can do when you write your own&#8230;</p>
<p>1. Use the cfxml tag  2. Write out the xml yourself with concatenating strings.</p>
<p><span id="more-72"></span><br />
1. Code</p>
<p class="code"><span style="color: #800000">&lt;cffunction name=<span style="color: #0000ff">&#8220;getSomeXML&#8221;</span> output=<span style="color: #0000ff">&#8220;false&#8221;</span>  access=<span style="color: #0000ff">&#8220;remote&#8221;</span> returntype=<span style="color: #0000ff">&#8220;string&#8221;</span>&gt;</span> <span style="color: #800000">&lt;cfset var getInfo = <span style="color: #0000ff">&#8220;&#8221;</span>&gt;</span><br />
<span style="color: #800000">&lt;cfset var xmlDoc= <span style="color: #0000ff">&#8220;&#8221;</span>&gt;</span></p>
<p><span style="color: #800000">&lt;cfquery name=<span style="color: #0000ff">&#8220;getInfo&#8221;</span> datasource=<span style="color: #0000ff">&#8220;#someDSN#&#8221;</span>&gt;</span><br />
SELECT     *<br />
FROM       tblArtists<br />
<span style="color: #800000">&lt;/cfquery&gt;</span></p>
<p><span style="color: #800000">&lt;cfxml variable=<span style="color: #0000ff">&#8220;xmlDoc&#8221;</span>&gt;</span><br />
<span style="color: #008000">&lt;artists&gt;</span><br />
<span style="color: #800000">&lt;cfloop query=<span style="color: #0000ff">&#8220;getInfo&#8221;</span>&gt;</span><br />
<span style="color: #800000">&lt;cfoutput&gt;</span><br />
<span style="color: #008000">&lt;artist name=<span style="color: #0000ff">&#8220;#Artist#&#8221;</span> id=<span style="color: #0000ff">&#8220;#id&#8221;</span>/&gt;</span><br />
<span style="color: #800000">&lt;/cfoutput&gt;</span><br />
<span style="color: #800000">&lt;/cfloop&gt;</span><br />
<span style="color: #008000">&lt;/artists&gt;</span><br />
<span style="color: #800000">&lt;/cfxml&gt;</span></p>
<p><span style="color: #800000">&lt;cfreturn xmldoc&gt;</span></p>
<p><span style="color: #800000">&lt;/cffunction&gt;</span></p>
<p>2.  Write your own</p>
<p class="code"><span style="color: #800000">&lt;cffunction name=<span style="color: #0000ff">&#8220;getSomeXml&#8221;</span> output=<span style="color: #0000ff">&#8220;false&#8221;</span> access=<span style="color: #0000ff">&#8220;remote&#8221;</span> returntype=<span style="color: #0000ff">&#8220;string&#8221;</span>&gt;</span> <span style="color: #800000">&lt;cfset var getInfo= <span style="color: #0000ff">&#8220;&#8221;</span>&gt;</span><br />
<span style="color: #800000">&lt;cfset var xmldoc = <span style="color: #0000ff">&#8220;&#8221;</span>&gt;</span><br />
<span style="color: #800000">&lt;cfquery name=<span style="color: #0000ff">&#8220;getInfo&#8221;</span> datasource=<span style="color: #0000ff">&#8220;#someDSN#&#8221;</span>&gt;</span><br />
SELECT     *<br />
FROM       tblArtists<br />
<span style="color: #800000">&lt;/cfquery&gt;</span></p>
<p><span style="color: #808080"><em>&lt;!&#8212; =========== HEADER OF THE XML =========== &#8212;&gt;</em></span><br />
<span style="color: #800000">&lt;CFSET xmldoc = <span style="color: #0000ff">&#8220;&lt;?xml version=&#8221;</span><span style="color: #0000ff">&#8220;1.0&#8243;</span><span style="color: #0000ff">&#8221; encoding=&#8221;</span><span style="color: #0000ff">&#8220;UTF-8&#8243;</span><span style="color: #0000ff">&#8220;?&gt;</span><br />
<span style="color: #008000">&lt;artists&gt;</span><br />
&#8220;</span>&gt;<br />
<span style="color: #800000">&lt;cfloop query=<span style="color: #0000ff">&#8220;getAllMarkers&#8221;</span>&gt;</span><br />
<span style="color: #800000">&lt;cfoutput&gt;</span></p>
<p><span style="color: #800000">&lt;cfset xmldoc = xmldoc &amp; <span style="color: #0000ff">&#8221;</p>
<p><span style="color: #008000">&lt;artist name=&#8221;</span><span style="color: #0000ff">&#8220;#Artist#&#8221;</span><span style="color: #0000ff">&#8221; id=&#8221;</span><span style="color: #0000ff">&#8220;#id&#8221;</span><span style="color: #0000ff">&#8220;/&gt;</span></span>                                    &#8220;</span>&gt;<br />
<span style="color: #800000">&lt;/cfoutput&gt;</span><br />
<span style="color: #800000">&lt;/cfloop&gt;</span><br />
<span style="color: #808080"><em>&lt;!&#8212; =========== FOOTER OF THE XML =========== &#8212;&gt;</em></span><br />
<span style="color: #800000">&lt;cfset xmldoc = xmldoc &amp; <span style="color: #0000ff">&#8221;<br />
<span style="color: #008000">&lt;/artists&gt;</span></span><br />
&#8220;</span>&gt;</p>
<p><span style="color: #800000">&lt;cfreturn xmldoc&gt;</span><br />
<span style="color: #800000">&lt;/cffunction&gt;</span></p>
<p>Notice in #2, I used &#8220;&#8221;#data#&#8221;" (a pair of double quotes surrounding variables) this concatenates the data appropriately and you get your xml back&#8230;</p>
<p>Why use one over the other you say?  You may need more flexibility so you may have to write the string out&#8230; otherwise I would definitely start with the CFXML version, it&#8217;s much easier to understand.</p>
<p>Once in flex declare your var</p>
<p class="code">[Bindable]<br />
public var treeCollection:XML; <span style="color: #808080"><em>/*<br />
this function is called from the RemoteObject result=<span style="color: #0000ff">&#8220;treeReceived(event)&#8221;</span><br />
*/</em></span><br />
private function treeReceived(event:ResultEvent):void {<br />
treeCollection = new XML(event.result);<br />
}<br />
<span style="color: #000080">&lt;mx:Tree id=<span style="color: #0000ff">&#8220;someTree&#8221;</span> dataProvider=<span style="color: #0000ff">&#8220;{treeCollection}&#8221;</span> showRoot=<span style="color: #0000ff">&#8220;false&#8221;</span>/&gt;</span></p>
<p>I hope this blog might help someone&#8230;</p>
<p><a href="http://axelscript.com/wp-content/cfwtExamples/ReturningAQueryToFlexAsXML/bin/ReturningAQueryToFlexAsXML.html" target="_blank">CLICK HERE TO VIEW THE EXAMPLE</a></p>
<img src="http://www.axelscript.com/?ak_action=api_record_view&id=72&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.axelscript.com/2008/02/15/returning-a-query-to-flex-as-xml/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>selectedIndex not updating after you change that datasource</title>
		<link>http://www.axelscript.com/2008/02/15/selectedindex-not-updating-after-you-change-that-datasource/</link>
		<comments>http://www.axelscript.com/2008/02/15/selectedindex-not-updating-after-you-change-that-datasource/#comments</comments>
		<pubDate>Fri, 15 Feb 2008 18:57:15 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Coldfusion]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://www.axelscript.com/2008/02/15/selectedindex-not-updating-after-you-change-that-datasource/</guid>
		<description><![CDATA[If you notice the selectedIndex of an mx:List or anything list based for that matter, be it a, tree, combobox, or anything that is built of the base List&#8230; whenever the dataprovider changes the selectedIndex is lost&#8230;. say i want to bind my &#60;mx:List id=&#8220;myList&#8221; selectedIndex=&#8220;{customClass.someID}&#8221;&#62; that way i could have some values in that [...]]]></description>
			<content:encoded><![CDATA[<p class="body"> 		If you notice the selectedIndex of an mx:List or anything list based for that matter, be it a, tree, combobox, or   anything that is built of the base List&#8230; whenever the   dataprovider changes the selectedIndex is lost&#8230;. say i want to bind my</p>
<p class="code"><span style="color: #000080">&lt;mx:List id=<span style="color: #0000ff">&#8220;myList&#8221;</span> selectedIndex=<span style="color: #0000ff">&#8220;{customClass.someID}&#8221;</span>&gt;</span></p>
<p><span id="more-68"></span><br />
that way i could have some values in that list, for example<br />
price ranges:<br />
100k &#8211; 200k<br />
200k &#8211; 300k &lt; this is selected for this house<br />
300k &#8211; 400k</p>
<p>but in a different city i have</p>
<p>price ranges:<br />
150k &#8211; 250k &lt; this is selected for this house<br />
250k &#8211; 400k<br />
400k &#8211; 500k</p>
<p>so i&#8217;m binding to a custom class that i made, that grabs the current price range of the house&#8230; but whenever my   dataprovider changes, the selected index is lost&#8230;</p>
<p><a href="http://axel.cfwebtools.com/Examples/ExtendingTheMxList-Bad/bin/main.html" target="_blank">CLICK HERE TO SEE THE BAD EXAMPLE</a></p>
<p>it is expected, but i just don&#8217;t know how to fix it&#8230;. how do you set  something selected in a component after you receive new data?</p>
<p>but i figured it out&#8230;</p>
<p>thanks to a post by ben forta&#8230; <a href="http://www.forta.com/blog/index.cfm/2006/11/22/Flex-ComboBox-With-selectedValue-Support" target="_blank">CLICK HERE FOR BEN&#8217;S POST</a>the post wasn&#8217;t what i wanted or needed, but there is no fun when you don&#8217;t have to try&#8230;.</p>
<p>so what you have to do is extend the List, or ComboBox components&#8230;.</p>
<p>create a new component based on the list or combo box&#8230; and in that component put the following code&#8230;</p>
<p class="code">&lt;?xml version=<span style="color: #0000ff">&#8220;1.0&#8243;</span> encoding=<span style="color: #0000ff">&#8220;utf-8&#8243;</span>?&gt;<br />
<span style="color: #000080">&lt;mx:List xmlns:mx=<span style="color: #0000ff">&#8220;<a href="http://www.adobe.com/2006/mxml" target="_blank">http://www.adobe.com/2006/mxml</a>&#8220;</span>&gt;</span><br />
<span style="color: #000080">&lt;mx:Script&gt;</span><br />
&lt;![CDATA[<br />
private var tempSelectedIndex:Number = -1;<br />
private var bDataProviderSet:Boolean = false;</p>
<p><span style="color: #808080"><em> // Trap dataProvider being set</em></span> override public function set dataProvider(o:Object):void{<br />
tempSelectedIndex = this.selectedIndex;<br />
super.dataProvider = o;<br />
<span style="color: #808080"><em> // This may get called before dataProvider is set, so make sure not null and has entries</em></span> if (o!=null &amp;&amp; o.length){<br />
<span style="color: #808080"><em> // Got it, set flag</em></span> bDataProviderSet = true;<br />
}<br />
this.selectedIndex = tempSelectedIndex;<br />
}</p>
<p>]]&gt;<br />
<span style="color: #000080">&lt;/mx:Script&gt;</span><br />
<span style="color: #000080">&lt;/mx:List&gt;</span></p>
<p><a href="http://axelscript.com/wp-content/cfwtExamples/ExtendingTheMxList-Good/bin/main.html" target="_blank">CLICK HERE TO SEE THE GOOD EXAMPLE</a></p>
<p>Just right click to view the source!</p>
<img src="http://www.axelscript.com/?ak_action=api_record_view&id=68&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.axelscript.com/2008/02/15/selectedindex-not-updating-after-you-change-that-datasource/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Coldfusion to turn a string into a date</title>
		<link>http://www.axelscript.com/2008/02/13/using-coldfusion-to-turn-a-string-into-a-date/</link>
		<comments>http://www.axelscript.com/2008/02/13/using-coldfusion-to-turn-a-string-into-a-date/#comments</comments>
		<pubDate>Wed, 13 Feb 2008 21:08:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Coldfusion]]></category>

		<guid isPermaLink="false">http://www.axelscript.com/2008/02/13/using-coldfusion-to-turn-a-string-into-a-date/</guid>
		<description><![CDATA[We have a customer that would like to upload a file, and this file is a delimited text file&#8230; The first line is a Quoted date (&#8220;Tuesday, January 23, 2007&#8243;)&#8230; but as it gets read into coldfusion it is not a valid date&#8230; so what you have to do is convert it, using the &#8220;DateFormat()&#8221; [...]]]></description>
			<content:encoded><![CDATA[<p class="body">  	We have a customer that would like to upload a file, and this file is a delimited text file&#8230;</p>
<p> The first line is a Quoted date (&#8220;Tuesday, January 23, 2007&#8243;)&#8230; but as it gets read into coldfusion it is not a valid date&#8230; so what you have to do is convert it, using the &#8220;DateFormat()&#8221; function in coldfusion.</p>
<p>In the following example, I&#8217;ll go through the following steps.</p>
<p>1.  Set a try/catch to handle unpredictable results<br />
2.  Getting the file from the current directory<br />
3.  Reading the file into CF as a variable<br />
4.  Creating a line break as a delimiter<br />
5.  Getting the first line of text<br />
6.  Stripping out the quotes<br />
7.  Converting the String into a date<br />
8.  Validating the date, and throwing a valid message<br />
9.  End the try/catch<br />
<span id="more-58"></span><br />
<a href="http://www.axelscript.com/wp-content/cfwtExamples/Using-Coldfusion-to-turn-a-string-into-a-date/Example.txt" target="_Blank">CLICK HERE TO GET EXAMPLE TEXT FILE</a></p>
<p><a href="http://www.axelscript.com/wp-content/cfwtExamples/Using-Coldfusion-to-turn-a-string-into-a-date/BadExample.txt" target="_Blank">CLICK HERE TO GET BAD EXAMPLE TEXT FILE</a></p>
<p><a href="http://www.axelscript.com/wp-content/cfwtExamples/Using-Coldfusion-to-turn-a-string-into-a-date/Index.cfm" target="_Blank">CLICK HERE TO SEE THE GOOD RESULTS</a></p>
<p><a href="http://www.axelscript.com/wp-content/cfwtExamples/Using-Coldfusion-to-turn-a-string-into-a-date/BadIndex.cfm" target="_Blank">CLICK HERE TO SEE THE BAD RESULTS</a></p>
<p>1. Set a try/catch to handle unpredictable results</p>
<p class="code"><span style="color: #808080"><em>&lt;!&#8212; create a try catch in case of the text file not having a valid date&#8212;&gt;</em></span><br />
<span style="color: #800000">&lt;cftry&gt;</span></p>
<p>2. Getting the file from the current directory</p>
<p class="code"><span style="color: #808080"><em>&lt;!&#8212; set vars &#8212;&gt;</em></span><br />
<span style="color: #800000">&lt;cfset msg = <span style="color: #0000ff">&#8220;&#8221;</span>&gt;</span><br />
<span style="color: #800000">&lt;cfset filePath = ExpandPath(<span style="color: #0000ff">&#8220;Example.txt&#8221;</span>)&gt;</span></p>
<p>3. Reading the file into CF as a variable</p>
<p class="code"><span style="color: #808080"><em>&lt;!&#8212; read the file in as a variable &#8212;&gt;</em></span><br />
<span style="color: #800000">&lt;cffile action=<span style="color: #0000ff">&#8220;read&#8221;</span> file=<span style="color: #0000ff">&#8220;#filePath#&#8221;</span> variable=<span style="color: #0000ff">&#8220;myFile&#8221;</span>&gt;</span></p>
<p>4. Creating a line break as a delimiter</p>
<p class="code"><span style="color: #808080"><em>&lt;!&#8212; create the delimiter &#8212;&gt;</em></span><br />
<span style="color: #800000">&lt;cfset line=chr(<span style="color: #0000ff">13</span>)&amp;chr(<span style="color: #0000ff">10</span>)&gt;</span></p>
<p>5. Getting the first line of text</p>
<p class="code"><span style="color: #808080"><em>&lt;!&#8212; get the first line of the txt file &#8212;&gt;</em></span><br />
<span style="color: #800000">&lt;cfset date = listGetAt(myFile,<span style="color: #0000ff">1</span>,line)&gt;</span></p>
<p>6. Stripping out the quotes</p>
<p class="code"><span style="color: #808080"><em>&lt;!&#8212; get rid of the left and right characters&#8230; which are quotes(<span style="color: #0000ff">&#8220;) &#8212;&gt;</span></em></span><br />
<span style="color: #800000">&lt;cfset date = replace(date,&#8217;&#8221;</span>&#8216;,<span style="color: #0000ff">&#8220;&#8221;</span>,<span style="color: #0000ff">&#8220;All&#8221;</span>)&gt;</p>
<p>7. Converting the String into a date</p>
<p class="code"><span style="color: #808080"><em>&lt;!&#8212; convert the string passed, into a date &#8212;&gt;</em></span><br />
<span style="color: #800000">&lt;cfset date = DateFormat(date,<span style="color: #0000ff">&#8220;mm/dd/yyyy&#8221;</span>)&gt;</span></p>
<p>8. Validating the date</p>
<p class="code"><span style="color: #808080"><em>&lt;!&#8212; set boolean to test off of, returns a true/false &#8212;&gt;</em></span><br />
<span style="color: #800000">&lt;cfset validDate = isDate(date)&gt;</span></p>
<p>9. End the try/catch</p>
<p class="code"><span style="color: #808080"><em>&lt;!&#8212; catch the unpredictable errors &#8212;&gt;</em></span><br />
<span style="color: #800000">&lt;cfcatch type=<span style="color: #0000ff">&#8220;any&#8221;</span>&gt;</span><br />
<span style="color: #800000">&lt;cfset msg = <span style="color: #0000ff">&#8220;CFCATCH :&#8221;</span> &amp; CFCATCH&gt;</span><br />
<span style="color: #800000">&lt;/cfcatch&gt;</span><br />
<span style="color: #800000">&lt;/cftry&gt;</span></p>
<p>and now for the whole file all together, i even created a debug mode to show details&#8230; so all you would have to do is plug a ?debugmode=true into the URL, and it would show more info</p>
<p class="code"><span style="color: #808080"><em>&lt;!&#8212; create a try catch in case of the text file not having a valid date&#8212;&gt;</em></span><br />
<span style="color: #800000">&lt;cftry&gt;</span><br />
<span style="color: #808080"><em>&lt;!&#8212; set vars &#8212;&gt;</em></span><br />
<span style="color: #800000">&lt;cfset msg = <span style="color: #0000ff">&#8220;&#8221;</span>&gt;</span><br />
<span style="color: #800000">&lt;cfset filePath = ExpandPath(<span style="color: #0000ff">&#8220;Example.txt&#8221;</span>)&gt;</span><br />
<span style="color: #808080"><em>&lt;!&#8212; read the file in as a variable &#8212;&gt;</em></span><br />
<span style="color: #800000">&lt;cffile action=<span style="color: #0000ff">&#8220;read&#8221;</span> file=<span style="color: #0000ff">&#8220;#filePath#&#8221;</span> variable=<span style="color: #0000ff">&#8220;myFile&#8221;</span>&gt;</span><br />
<span style="color: #808080"><em>&lt;!&#8212; create the delimiter &#8212;&gt;</em></span><br />
<span style="color: #800000">&lt;cfset line=chr(<span style="color: #0000ff">13</span>)&amp;chr(<span style="color: #0000ff">10</span>)&gt;</span><br />
<span style="color: #808080"><em>&lt;!&#8212; get the first line of the txt file &#8212;&gt;</em></span><br />
<span style="color: #800000">&lt;cfset date = listGetAt(myFile,<span style="color: #0000ff">1</span>,line)&gt;</span><br />
<span style="color: #808080"><em>&lt;!&#8212; get rid of the left and right characters&#8230; which are quotes(<span style="color: #0000ff">&#8220;) &#8212;&gt;</span></em></span><br />
<span style="color: #800000">&lt;cfset date = replace(date,&#8217;&#8221;</span>&#8216;,<span style="color: #0000ff">&#8220;&#8221;</span>,<span style="color: #0000ff">&#8220;All&#8221;</span>)&gt;<br />
<span style="color: #808080"><em>&lt;!&#8212; convert the string passed, into a date &#8212;&gt;</em></span><br />
<span style="color: #800000">&lt;cfset date = DateFormat(date,<span style="color: #0000ff">&#8220;mm/dd/yyyy&#8221;</span>)&gt;</span><br />
<span style="color: #808080"><em>&lt;!&#8212; set boolean to test off of, returns a true/false &#8212;&gt;</em></span><br />
<span style="color: #800000">&lt;cfset validDate = isDate(date)&gt;</span></p>
<p><span style="color: #800000">&lt;cfif isDefined(<span style="color: #0000ff">&#8220;URL.DEBUGMODE&#8221;</span>) AND URL.DEBUGMODE NEQ False&gt;</span><br />
<span style="color: #808080"><em>&lt;!&#8212; do dumps to show output &#8212;&gt;</em></span><br />
Date:<span style="color: #800000">&lt;cfdump var=<span style="color: #0000ff">&#8220;#date#&#8221;</span>&gt;</span><br />
Date with no quotes:<span style="color: #800000">&lt;cfdump var=<span style="color: #0000ff">&#8220;#date#&#8221;</span>&gt;</span><span style="color: #000080">&lt;br /&gt;</span><br />
<span style="color: #0000ff">&#8220;isdate?&#8221;</span><span style="color: #800000">&lt;cfdump var=<span style="color: #0000ff">&#8220;#validDate#&#8221;</span>&gt;</span><span style="color: #000080">&lt;br /&gt;</span><br />
<span style="color: #800000">&lt;/cfif&gt;</span><br />
<span style="color: #808080"><em>&lt;!&#8212; serverside checking to validate it&#8217;s a good date, if not show an error &#8212;&gt;</em></span><br />
<span style="color: #800000">&lt;cfif validDate&gt;</span><br />
<span style="color: #800000">&lt;cfset msg = <span style="color: #0000ff">&#8220;This is a valid date : &#8220;</span> &amp; date&gt;</span><br />
<span style="color: #800000">&lt;cfelse&gt;</span><br />
<span style="color: #800000">&lt;cfset msg = <span style="color: #0000ff">&#8220;the date was invalid in your file, please correct, and retry&#8221;</span>&gt;</span><br />
<span style="color: #800000">&lt;/cfif&gt;</span><br />
<span style="color: #808080"><em>&lt;!&#8212; catch the unpredictable errors &#8212;&gt;</em></span><br />
<span style="color: #800000">&lt;cfcatch type=<span style="color: #0000ff">&#8220;any&#8221;</span>&gt;</span><br />
<span style="color: #800000">&lt;cfset msg = <span style="color: #0000ff">&#8220;CFCATCH :&#8221;</span> &amp; CFCATCH&gt;</span><br />
<span style="color: #800000">&lt;/cfcatch&gt;</span><br />
<span style="color: #800000">&lt;/cftry&gt;</span><br />
<span style="color: #800000">&lt;cfoutput&gt;</span><br />
#msg#<br />
<span style="color: #800000">&lt;/cfoutput&gt;</span></p>
<img src="http://www.axelscript.com/?ak_action=api_record_view&id=58&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.axelscript.com/2008/02/13/using-coldfusion-to-turn-a-string-into-a-date/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>mx:RichTextEditor issues Font Too Large</title>
		<link>http://www.axelscript.com/2008/02/13/mxrichtexteditor-issues-font-too-large/</link>
		<comments>http://www.axelscript.com/2008/02/13/mxrichtexteditor-issues-font-too-large/#comments</comments>
		<pubDate>Wed, 13 Feb 2008 20:53:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Coldfusion]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://www.axelscript.com/2008/02/13/mxrichtexteditor-issues-font-too-large/</guid>
		<description><![CDATA[We are using the mx:RichTextEditor to edit a description of some sort&#8230;. the html that the rich texteditor outputs is the following &#60;TEXTFORMAT LEADING=&#8220;2&#8243;&#62;&#60;P ALIGN=&#8220;LEFT&#8221;&#62;&#60;FONT FACE=&#8220;Verdana&#8221; SIZE=&#8220;10&#8243; COLOR=&#8220;#0B333C&#8221; LETTERSPACING=&#8220;0&#8243; KERNING=&#8220;0&#8243;&#62;test&#60;/FONT&#62;&#60;/P&#62;&#60;/TEXTFORMAT&#62; If you copy and past this code into an html page, the font shows up huge much like so: test Ryan Stille, Jason H. of [...]]]></description>
			<content:encoded><![CDATA[<p class="body"> 		We are using the mx:RichTextEditor to edit a description of some sort&#8230;. the html that the rich texteditor outputs is the following</p>
<p class="code"><span style="color: #000080"><span style="color: #ff8000">&lt;TEXTFORMAT LEADING=<span style="color: #0000ff">&#8220;2&#8243;</span>&gt;</span></span><span style="color: #000080">&lt;P ALIGN=<span style="color: #0000ff">&#8220;LEFT&#8221;</span>&gt;</span><span style="color: #000080">&lt;FONT FACE=<span style="color: #0000ff">&#8220;Verdana&#8221;</span> SIZE=<span style="color: #0000ff">&#8220;10&#8243;</span> COLOR=<span style="color: #0000ff">&#8220;#0B333C&#8221;</span> LETTERSPACING=<span style="color: #0000ff">&#8220;0&#8243;</span> KERNING=<span style="color: #0000ff">&#8220;0&#8243;</span>&gt;</span>test<span style="color: #000080">&lt;/FONT&gt;</span><span style="color: #000080">&lt;/P&gt;</span><span style="color: #000080"><span style="color: #ff8000">&lt;/TEXTFORMAT&gt;</span></span></p>
<p>If you copy and past this code into an html page, the font shows up huge much like so:<br />
<textformat leading="2"></textformat></p>
<p align="left"><font letterspacing="0" kerning="0" color="#0b333c" face="Verdana" size="10">test</font></p>
<p> Ryan Stille, Jason H. of CFWebtools and I spent a little time researching what we could do to fix this issue&#8230; not very complicated, but it&#8217;s surely bothersome to us, as well as the clients.  I&#8217;m not all that proficient with regular expressions&#8230; so that is where Ryan came in great.</p>
<p><span id="more-56"></span><br />
What you can do is take your htmlText of the rich text editor and do a while loop on the htmlText, and replace your SIZE=&#8221;##&#8221; WITH STYLE=&#8221;font-size: ##&#8221;.</p>
<p>You will want to make sure that your Rich Text editor has it&#8217;s ID attribute assigned</p>
<p class="code"><span style="color: #000080">&lt;mx:Script&gt;</span><br />
&lt;![CDATA[<br />
private function testReg():void{<br />
var tempString:String = testText.htmlText;<br />
trace(<span style="color: #0000ff">"tempString: "</span> + tempString);<br />
var pattern:RegExp = new RegExp(<span style="color: #0000ff">"SIZE=\"</span>([0-9]{1,<span style="color: #0000ff">2</span>})\<span style="color: #0000ff">&#8220;&#8221;</span>,<span style="color: #0000ff">&#8220;g&#8221;</span>); trace(<span style="color: #0000ff">&#8220;pattern :&#8221;</span> + pattern.toString());</p>
<p>var result:Object;<br />
<span style="color: #808080"><em>/*<br />
there is a really bad practice fix that i&#8217;m going to do<br />
right now the pattern is case sensitive&#8230; i&#8217;m going to<br />
put the size=<span style="color: #0000ff">&#8220;#&#8221;</span> back in but in lower case, so the text editor still recognizes the different sizes<br />
*/</em></span><br />
while(result=pattern.exec(tempString)){<br />
trace(tempString=tempString.replace(pattern, <span style="color: #0000ff">&#8220;STYLE=\&#8221;</span>font-size: $1px\<span style="color: #0000ff">&#8221; size=\&#8221;</span>$1\<span style="color: #0000ff">&#8220;&#8221;</span>));<br />
}<br />
}</p>
<p>]]&gt;<br />
<span style="color: #000080">&lt;/mx:Script&gt;</span><br />
<span style="color: #000080">&lt;mx:RichTextEditor id=<span style="color: #0000ff">&#8220;testText&#8221;</span> htmlText=<span style="color: #0000ff">&#8220;test&#8221;</span>/&gt;</span><br />
<span style="color: #000080">&lt;mx:Button click=<span style="color: #0000ff">&#8220;testReg()&#8221;</span>/&gt;</span></p>
<p>Result:</p>
<p class="code"><span style="color: #000080"><span style="color: #ff8000">&lt;TEXTFORMAT LEADING=<span style="color: #0000ff">&#8220;2&#8243;</span>&gt;</span></span><span style="color: #000080">&lt;P ALIGN=<span style="color: #0000ff">&#8220;LEFT&#8221;</span>&gt;</span><span style="color: #000080">&lt;FONT FACE=<span style="color: #0000ff">&#8220;Verdana&#8221;</span> STYLE=<span style="color: #0000ff">&#8220;font-size: 10px&#8221;</span> COLOR=<span style="color: #0000ff">&#8220;#0B333C&#8221;</span> LETTERSPACING=<span style="color: #0000ff">&#8220;0&#8243;</span> KERNING=<span style="color: #0000ff">&#8220;0&#8243;</span>&gt;</span>test<span style="color: #000080">&lt;/FONT&gt;</span><span style="color: #000080">&lt;/P&gt;</span><span style="color: #000080"><span style="color: #ff8000">&lt;/TEXTFORMAT&gt;</span></span></p>
<p>  Now you can show this off and it works fantastic and displays like so:</p>
<p><textformat leading="2"></textformat></p>
<p align="left"><font style="font-size: 10px" letterspacing="0" kerning="0" color="#0b333c" face="Verdana">test</font></p>
<img src="http://www.axelscript.com/?ak_action=api_record_view&id=56&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.axelscript.com/2008/02/13/mxrichtexteditor-issues-font-too-large/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Use Yahoo Maps Geocoder webservice with coldfusion pt. 1</title>
		<link>http://www.axelscript.com/2008/02/13/use-yahoo-maps-geocoder-webservice-with-coldfusion-pt-1/</link>
		<comments>http://www.axelscript.com/2008/02/13/use-yahoo-maps-geocoder-webservice-with-coldfusion-pt-1/#comments</comments>
		<pubDate>Wed, 13 Feb 2008 20:50:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Coldfusion]]></category>

		<guid isPermaLink="false">http://www.axelscript.com/2008/02/13/use-yahoo-maps-geocoder-webservice-with-coldfusion-pt-1/</guid>
		<description><![CDATA[I ran into the issue when querying this service, and hit the whole &#8220;Connection Failure&#8221; Problem, this confused me, and after about an hour of my own trouble shooting i hit the search engines and found that there is some known issue with formating&#8230;. you must include charset=&#8221;utf-8&#8243; in the tag&#8230; there are a number [...]]]></description>
			<content:encoded><![CDATA[<p class="body"> 		I ran into the issue when querying this service, and hit the whole &#8220;Connection Failure&#8221; Problem, this confused me, and after about an hour of my own trouble shooting i hit the search engines and found that there is some known issue with formating&#8230;. you must include charset=&#8221;utf-8&#8243; in the <cfhttp> tag&#8230; there are a number of links out there on this issue&#8230;     </cfhttp> The big task was for starters, just getting the information out of what was being returned to the page.  It seemed simple to tear apart yahoo&#8217;s xml that was returning, but for some reason it took me a couple of hours after the connection failure issues.</p>
<p><span id="more-53"></span><br />
What needs to happen:<br />
=========================<br />
1.  Get a list of States to query  2.  Query the Yahoo service   3.  Write the XML File  4.  Work with flex in importing that xml into a tree</p>
<p>Sound simple enough?</p>
<p>In this *Pt. 1* section of the yahoo maps geocoder, i&#8217;m going to go through how to simply query and put the data into variables, and DUMP them&#8230;.</p>
<p>First, at the top of the page declare your <cfhttp> tag    </cfhttp></p>
<p class="code"><span style="color: #800000">&lt;cfhttp<br />
url=<span style="color: #0000ff">&#8220;<a href="http://api.local.yahoo.com/MapsService/V1/geocode" target="_blank">http://api.local.yahoo.com/MapsService/V1/geocode</a>&#8220;</span><br />
method=<span style="color: #0000ff">&#8220;post&#8221;</span><br />
throwonerror=<span style="color: #0000ff">&#8220;yes&#8221;</span><br />
charset=<span style="color: #0000ff">&#8220;utf-8&#8243;</span><br />
&gt;</span></p>
<p><span style="color: #800000">&lt;cfhttpparam<br />
type=<span style="color: #0000ff">&#8220;url&#8221;</span> name=<span style="color: #0000ff">&#8220;appid&#8221;</span><br />
value=<span style="color: #0000ff">&#8220;MapToolsV1&#8243;</span> /&gt;</span> <span style="color: #800000">&lt;cfhttpparam<br />
type=<span style="color: #0000ff">&#8220;url&#8221;</span> name=<span style="color: #0000ff">&#8220;state&#8221;</span><br />
value=<span style="color: #0000ff">&#8220;IA&#8221;</span> /&gt;</span></p>
<p><span style="color: #800000">&lt;/cfhttp&gt;</span></p>
<p>Next, create your variables, notice you have to Parse the xml from the cfhttp.filecontent</p>
<p class="code"><span style="color: #800000">&lt;cfset xmlObject =<br />
XmlParse(cfhttp.FileContent)&gt;</span> <span style="color: #800000">&lt;cfset Lat =<br />
xmlObject.XMLRoot.XmlChildren[1].XmlChildren[1]&gt;</span></p>
<p><span style="color: #800000">&lt;cfset Lng =<br />
xmlObject.XMLRoot.XmlChildren[1].XmlChildren[2]&gt;</span></p>
<p><span style="color: #800000">&lt;cfset State =<br />
xmlObject.XMLRoot.XmlChildren[1].XmlChildren[5]&gt;</span></p>
<p>Now, just dump the variables</p>
<p class="code"><span style="color: #800000">&lt;cfoutput&gt;</span><br />
#Lat#<span style="color: #000080">&lt;br /&gt;</span><br />
#Lng#<span style="color: #000080">&lt;br /&gt;</span><br />
#State#<span style="color: #000080">&lt;br /&gt;</span><br />
<span style="color: #800000">&lt;/cfoutput&gt;</span></p>
<p>i&#8217;ll continue on this at a later date with example files&#8230; it requires quite a bit more complexity as we move through this.</p>
<img src="http://www.axelscript.com/?ak_action=api_record_view&id=53&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.axelscript.com/2008/02/13/use-yahoo-maps-geocoder-webservice-with-coldfusion-pt-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I DON&#8217;T have coldfusion installed on my LOCAL machine what do i do!</title>
		<link>http://www.axelscript.com/2008/02/13/i-dont-have-coldfusion-installed-on-my-local-machine-what-do-i-do/</link>
		<comments>http://www.axelscript.com/2008/02/13/i-dont-have-coldfusion-installed-on-my-local-machine-what-do-i-do/#comments</comments>
		<pubDate>Wed, 13 Feb 2008 20:48:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Coldfusion]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Flex Builder Tips]]></category>

		<guid isPermaLink="false">http://www.axelscript.com/2008/02/13/i-dont-have-coldfusion-installed-on-my-local-machine-what-do-i-do/</guid>
		<description><![CDATA[After some pretty extensive research, I was able to find a good blog post about a similar subject&#8230; The problem&#8230; HERE IS A TUTORIAL say you want to develop on a remote machine, say a mapped drive? or something along those lines&#8230; but when you go to create your flex project all you get is [...]]]></description>
			<content:encoded><![CDATA[<p class="body"> 		After some pretty extensive research, I was able to find a good blog post about a similar subject&#8230;   The problem&#8230;</p>
<p><span id="more-51"></span><br />
<a href="http://axelscript.com/wp-content/cfwtExamples/files/RemoteProject.doc" target="_blank">HERE IS A TUTORIAL </a></p>
<p>say you want to develop on a remote machine, say a mapped drive? or something along those lines&#8230; but when you go to create your flex project all you get is this error</p>
<h2>&#8220;Invalid server root.  Server root must contain a WEB-INF/flex folder.&#8221;</h2>
<p>WHAT DO YOU DO?</p>
<p>I&#8217;m not sure if this is technically correct or the downsides to this, all i know is that i couldn&#8217;t even get started until this was done&#8230; Please take a look at the tutorial and follow the steps&#8230; if your having the same issue, and find a different way, or more proper way to fix it, please post a comment, and we can exchange links&#8230;.</p>
<p>Axel</p>
<p>also look at</p>
<p><a href="http://www.kenreiss.com/blog/index.cfm/2006/8/10/Flex-20-with-CFMX-702--SUCCESS" target="_blank">http://www.kenreiss.com/blog/index.cfm/2006/8/10/Flex-20-with-CFMX-702&#8211;SUCCESS</a></p>
<img src="http://www.axelscript.com/?ak_action=api_record_view&id=51&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.axelscript.com/2008/02/13/i-dont-have-coldfusion-installed-on-my-local-machine-what-do-i-do/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Working with cfselect in cfform</title>
		<link>http://www.axelscript.com/2008/02/13/working-with-cfselect-in-cfform/</link>
		<comments>http://www.axelscript.com/2008/02/13/working-with-cfselect-in-cfform/#comments</comments>
		<pubDate>Wed, 13 Feb 2008 20:45:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[cfform]]></category>
		<category><![CDATA[Coldfusion]]></category>

		<guid isPermaLink="false">http://www.axelscript.com/2008/02/13/working-with-cfselect-in-cfform/</guid>
		<description><![CDATA[There was a post on an adobe forum wondering how to go about doing this, they state that they go on and on looking for how to do this, and so i&#8217;m gonna help&#8217;em out&#8230; View the example Download the File the basis of what they want to do is rather easy, but the error [...]]]></description>
			<content:encoded><![CDATA[<p class="body">There was a post on an adobe forum wondering how to go about doing this, they state that they go on and on looking for how to do this, and so i&#8217;m gonna help&#8217;em out&#8230;</p>
<p><span id="more-49"></span></p>
<p><a href="http://axelscript.com/wp-content/cfwtExamples/Working-with-cfselect-in-cfform/" target="_blank">View the example</a><br />
<a href="http://axelscript.com/wp-content/cfwtExamples/Working-with-cfselect-in-cfform/Working-with-cfselect-in-cfform.zip" target="_blank">Download the File</a><br />
the basis of what they want to do is rather easy, but the error handling in cfform when the format is flash, is SOOOOO HARD TOOO DEBUG!</p>
<p>1. Call the setUp() function in the onload=&#8221;setUp();&#8221; in the beginning form tag that your going to create further into the lesson.</p>
<p class="code"><span style="color: #800000">&lt;cfform name=<span style="color: #0000ff">&#8220;Performance&#8221;</span><br />
timeout=<span style="color: #0000ff">&#8220;500&#8243;</span> height=<span style="color: #0000ff">&#8220;800&#8243;</span> width=<span style="color: #0000ff">&#8220;800&#8243;</span><br />
format=<span style="color: #0000ff">&#8220;flash&#8221;</span> skin=<span style="color: #0000ff">&#8220;haloSilver&#8221;</span><br />
action=<span style="color: #0000ff">&#8220;action.cfm&#8221;</span> method=<span style="color: #0000ff">&#8220;post&#8221;</span><br />
onload=<span style="color: #0000ff">&#8220;setUp();&#8221;</span>&gt;</span></p>
<p>2. Create a cfformitem type=&#8221;script&#8221; right under the cfform tag and create your setUp function as well as another function we are going to call, when one of your select boxes change.</p>
<p class="code"><span style="color: #800000">&lt;cfformitem type=<span style="color: #0000ff">&#8220;script&#8221;</span>&gt;</span><br />
public function setUp():Void{<br />
School.enabled = false;<br />
}<br />
public function changeStatus(status):Void{<br />
if (Title.selectedItem.data == 1){<br />
<span style="color: #808080"><em>   //this is case sensitive so be careful</em></span><br />
School.enabled = status;<br />
}<br />
}<br />
<span style="color: #800000">&lt;/cfformitem&gt;</span></p>
<p>3.  Create Your two cfselects, and call the changeStatus() function in the onChange=&#8221;" event of the first one.</p>
<p class="code"><span style="color: #800000">&lt;cfselect name=<span style="color: #0000ff">&#8220;Title&#8221;</span><br />
label=<span style="color: #0000ff">&#8220;Title&#8221;</span> width=<span style="color: #0000ff">&#8220;200&#8243;</span><br />
tooltip=<span style="color: #0000ff">&#8220;Please enter appropiate title.&#8221;</span><br />
required=<span style="color: #0000ff">&#8220;Yes&#8221;</span> onChange=<span style="color: #0000ff">&#8220;changeStatus(true)&#8221;</span> &gt;</span></p>
<p><span style="color: #000080"><span style="color: #ff8000">&lt;option&gt;</span></span>Select<span style="color: #000080"><span style="color: #ff8000">&lt;/option&gt;</span></span><br />
<span style="color: #000080"><span style="color: #ff8000">&lt;option value = <span style="color: #0000ff">&#8220;0&#8243;</span>&gt;</span></span><br />
Asso. &amp; Asst. Deans<br />
<span style="color: #000080"><span style="color: #ff8000">&lt;/option&gt;</span></span><br />
<span style="color: #000080"><span style="color: #ff8000">&lt;option value = <span style="color: #0000ff">&#8220;1&#8243;</span>&gt;</span></span><br />
Asso. &amp; Asst. Provost &amp; VPs<br />
<span style="color: #000080"><span style="color: #ff8000">&lt;/option&gt;</span></span><br />
<span style="color: #000080"><span style="color: #ff8000">&lt;option value = <span style="color: #0000ff">&#8220;2&#8243;</span>&gt;</span></span><br />
Campus Directors<br />
<span style="color: #000080"><span style="color: #ff8000">&lt;/option&gt;</span></span><br />
<span style="color: #800000">&lt;/cfselect&gt;</span></p>
<p><span style="color: #800000">&lt;cfselect name=<span style="color: #0000ff">&#8220;School&#8221;</span> width=<span style="color: #0000ff">&#8220;200&#8243;</span> required=<span style="color: #0000ff">&#8220;Yes&#8221;</span> &gt;</span></p>
<p><span style="color: #000080"><span style="color: #ff8000">&lt;option&gt;</span></span><br />
Select<br />
<span style="color: #000080"><span style="color: #ff8000">&lt;/option&gt;</span></span><br />
<span style="color: #000080"><span style="color: #ff8000">&lt;option value=<span style="color: #0000ff">&#8220;1&#8243;</span>&gt;</span></span><br />
Dyson<br />
<span style="color: #000080"><span style="color: #ff8000">&lt;/option&gt;</span></span><br />
<span style="color: #000080"><span style="color: #ff8000">&lt;option value =<span style="color: #0000ff">&#8220;2&#8243;</span>&gt;</span></span><br />
Education<br />
<span style="color: #000080"><span style="color: #ff8000">&lt;/option&gt;</span></span></p>
<p><span style="color: #800000">&lt;/cfselect&gt;</span></p>
<p><span style="color: #000080"><span style="color: #ff8000">&lt;/form&gt;</span></span></p>
<p>Hope this helps&#8230; take a look at the example.</p>
<img src="http://www.axelscript.com/?ak_action=api_record_view&id=49&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.axelscript.com/2008/02/13/working-with-cfselect-in-cfform/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Using a MenuBar in flex 2.0 &#8211; Step 2</title>
		<link>http://www.axelscript.com/2008/02/11/using-a-menubar-in-flex-20-step-2/</link>
		<comments>http://www.axelscript.com/2008/02/11/using-a-menubar-in-flex-20-step-2/#comments</comments>
		<pubDate>Mon, 11 Feb 2008 18:32:15 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Coldfusion]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://www.axelscript.com/2008/02/11/using-a-menubar-in-flex-20-step-2/</guid>
		<description><![CDATA[This is a continuation of Using a MenuBar in Flex 2.0 &#8211; Step 1 The difference between the posts, are that the first one uses inline xml in the mx:Script tag&#8230; this one will actually talk to a CFC and get the xml from a cfc generated from a query, this will IMMENSELY in created [...]]]></description>
			<content:encoded><![CDATA[<p class="body"> 		This is a continuation of Using a MenuBar in Flex 2.0 &#8211; Step 1 The difference between the posts, are that the first one uses inline xml in the mx:Script tag&#8230; this one will actually talk to a CFC and get the xml from a cfc generated from a query, this will IMMENSELY in created dynamic menu&#8217;s for different users with different security rights.</p>
<p>The steps i&#8217;m going to cover might look like the last post BUT THEY ARE DIFFERENT!:</p>
<p><a href="http://axelscript.com/wp-content/cfwtExamples/Using-the-MenuBar/CFMenuRemoting/bin/" target="_blank">View Example</a></p>
<p><a href="http://axelscript.com/wp-content/cfwtExamples/Using-the-MenuBar/CFMenuRemoting/CFMenuRemoting.zip" target="_blank">Download Example</a></p>
<p>First things first,</p>
<p>1. Make your Script tag</p>
<p>2. import Classes</p>
<p>3. Create vars</p>
<p>4. Create 3 function  &#8212;-One will be called when the menu item is clicked  &#8212;-One will be called on the load of the app.  &#8212;-One will be used to handle the remoting event</p>
<p>5. Create your RemoteObject</p>
<p>6. Create Your CFC that will return the xml object</p>
<p>7. Create Your <mx:menubar> and Bind it </mx:menubar></p>
<p><span id="more-44"></span><br />
1.<br />
==================</p>
<p class="code"><span style="color: #000080">&lt;mx:Script&gt;</span><br />
&lt;![CDATA[ ]]&gt;<br />
<span style="color: #000080">&lt;/mx:Script&gt;</span></p>
<p>2. FROM WITHIN YOUR SCRIPT TAG, IMPORT CLASSES<br />
==================</p>
<p class="code">import mx.events.MenuEvent;<br />
import mx.controls.Alert;<br />
import mx.collections.*;<br />
<span style="color: #808080"><em>/*THE RPC EVENTS WAS NOT IN THE FIRST POST*/</em></span><br />
import mx.rpc.events.*;</p>
<p>3. CREATE VARS<br />
==================</p>
<p class="code"><span style="color: #808080"><em>/*this var used to be an XMLListCollection*/</em></span><br />
[Bindable]<br />
public var menuBarCollection:XML; <span style="color: #808080"><em>/*<br />
DELETE THE private var menuBarXML, this will be handled by the event.result that comes back from the cfc<br />
*/</em></span></p>
<p>4. Create 3 function<br />
==================</p>
<p class="code">private function menuHandler(event:MenuEvent):void  {<br />
Alert.show(<span style="color: #0000ff">&#8220;Label: &#8220;</span> + event.item.@label + <span style="color: #0000ff">&#8220;\n&#8221;</span> + <span style="color: #0000ff">&#8220;Data: &#8220;</span> + event.item.@data + <span style="color: #0000ff">&#8220;\n&#8221;</span>, <span style="color: #0000ff">&#8220;Clicked menu item&#8221;</span>);<br />
} private function setUp():void{<br />
<span style="color: #808080"><em> //this sends the request to the cfc</em></span> remoteObj.getScripts.send();<br />
}<br />
private function scriptsReceived(event:ResultEvent):void{<br />
<span style="color: #808080"><em> //this will be called from the remoteObj</em></span> menuBarCollection = new XML(event.result);<br />
}</p>
<p>5. Create Your Remote Object<br />
==================</p>
<p class="code"><span style="color: #808080"><em>/*<br />
make sure when doing this on your own, you know where your webroot is, it is needed for finding the cfc<br />
*/</em></span><br />
<span style="color: #000080">&lt;mx:RemoteObject<br />
id=<span style="color: #0000ff">&#8220;remoteObj&#8221;</span><br />
destination=<span style="color: #0000ff">&#8220;ColdFusion&#8221;</span><br />
source=<span style="color: #0000ff">&#8220;Examples.Using-the-MenuBar.CFMenuRemoting.CFMenu&#8221;</span><br />
fault=<span style="color: #0000ff">&#8220;Alert.show(event.fault.faultString,&#8217;Error&#8217;);&#8221;</span>&gt;</span> <span style="color: #000080">&lt;mx:method<br />
name=<span style="color: #0000ff">&#8220;getScripts&#8221;</span><br />
result=<span style="color: #0000ff">&#8220;scriptsReceived(event)&#8221;</span><br />
/&gt;</span><br />
<span style="color: #000080">&lt;/mx:RemoteObject&gt;</span></p>
<p>6. Create Your CFC IN THE current PROJECT FOLDER<br />
==================<br />
<strong>CFMenu.cfc &#8211; NOTE PLEASE REFER TO THE DOWNLOAD FOR THE FULL COMPONENT</strong></p>
<p class="code"><span style="color: #808080"><em>&lt;!&#8212;replace the following with a real query&#8212;&gt;</em></span><br />
<span style="color: #800000">&lt;cfset menu = QueryNew(<span style="color: #0000ff">&#8220;id, name&#8221;</span>,<span style="color: #0000ff">&#8220;integer,varchar&#8221;</span>)&gt;</span> <span style="color: #808080"><em>&lt;!&#8212; make some rows in the query &#8212;&gt;</em></span><br />
<span style="color: #800000">&lt;cfset newRow = QueryAddRow(menu,<span style="color: #0000ff"> 2</span>)&gt;</span></p>
<p><span style="color: #808080"><em>&lt;!&#8212; set the cells in the query &#8212;&gt;</em></span><br />
<span style="color: #800000">&lt;cfset temp = QuerySetCell(menu, <span style="color: #0000ff">&#8220;id&#8221;</span>, <span style="color: #0000ff">&#8220;1&#8243;</span>,<span style="color: #0000ff"> 1</span>)&gt;</span><br />
<span style="color: #800000">&lt;cfset temp = QuerySetCell(menu, <span style="color: #0000ff">&#8220;name&#8221;</span>, <span style="color: #0000ff">&#8220;Menu 1&#8243;</span>,<span style="color: #0000ff"> 1</span>)&gt;</span><br />
<span style="color: #800000">&lt;cfset temp = QuerySetCell(menu, <span style="color: #0000ff">&#8220;id&#8221;</span>, <span style="color: #0000ff">&#8220;2&#8243;</span>,<span style="color: #0000ff"> 2</span>)&gt;</span><br />
<span style="color: #800000">&lt;cfset temp = QuerySetCell(menu, <span style="color: #0000ff">&#8220;name&#8221;</span>, <span style="color: #0000ff">&#8220;Menu 2&#8243;</span>,<span style="color: #0000ff"> 2</span>)&gt;</span><br />
<span style="color: #808080"><em>&lt;!&#8212;CREATE XML DOC OBJECT &#8212;&gt;</em></span><br />
<span style="color: #800000">&lt;cfxml variable=<span style="color: #0000ff">&#8220;mydoc&#8221;</span>&gt;</span><br />
<span style="color: #000080">&lt;menu&gt;</span><br />
<span style="color: #000080">&lt;menuitem label=<span style="color: #0000ff">&#8220;File&#8221;</span>&gt;</span><br />
<span style="color: #000080">&lt;menuitem label=<span style="color: #0000ff">&#8220;Login&#8221;</span> data=<span style="color: #0000ff">&#8220;mnuLogin&#8221;</span>/&gt;</span><br />
<span style="color: #000080">&lt;menuitem label=<span style="color: #0000ff">&#8220;Exit&#8221;</span> data=<span style="color: #0000ff">&#8220;mnuExit&#8221;</span>/&gt;</span><br />
<span style="color: #000080">&lt;/menuitem&gt;</span><br />
<span style="color: #000080">&lt;menuitem label=<span style="color: #0000ff">&#8220;MoreData&#8221;</span>&gt;</span><br />
<span style="color: #800000">&lt;cfoutput query=<span style="color: #0000ff">&#8220;menu&#8221;</span>&gt;</span><br />
<span style="color: #000080">&lt;menuitem label=<span style="color: #0000ff">&#8220;#name#&#8221;</span> data=<span style="color: #0000ff">&#8220;#id#&#8221;</span>/&gt;</span><br />
<span style="color: #800000">&lt;/cfoutput&gt;</span><br />
<span style="color: #000080">&lt;/menuitem&gt;</span><br />
<span style="color: #000080">&lt;/menu&gt;</span><br />
<span style="color: #800000">&lt;/cfxml&gt;</span></p>
<p><span style="color: #800000">&lt;cfreturn mydoc&gt;</span></p>
<p>7. Create Your MenuBar and Bind it<br />
==================</p>
<p class="code"><span style="color: #000080">&lt;mx:MenuBar<br />
labelField=<span style="color: #0000ff">&#8220;@label&#8221;</span><br />
itemClick=<span style="color: #0000ff">&#8220;menuHandler(event);&#8221;</span><br />
dataProvider=<span style="color: #0000ff">&#8220;{menuBarCollection}&#8221;</span><br />
/&gt;</span></p>
<p>Hopefully this helps some people, i know i spent alot of time on it&#8230; but that may be because i think i&#8217;m a slow learner because i look into things too much, and tend to over analyze</p>
<img src="http://www.axelscript.com/?ak_action=api_record_view&id=44&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.axelscript.com/2008/02/11/using-a-menubar-in-flex-20-step-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using a MenuBar in flex 2.0 &#8211; Step 1</title>
		<link>http://www.axelscript.com/2008/02/11/using-a-menubar-in-flex-20-step-1/</link>
		<comments>http://www.axelscript.com/2008/02/11/using-a-menubar-in-flex-20-step-1/#comments</comments>
		<pubDate>Mon, 11 Feb 2008 18:30:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Coldfusion]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://www.axelscript.com/2008/02/11/using-a-menubar-in-flex-20-step-1/</guid>
		<description><![CDATA[There are many great things about flex, and the flash 9 player, and actionscript 3&#8230; I&#8217;m not brand new to flash, or flash development, i&#8217;ve never done anything truly amazing with it, but i&#8217;ve done what had to be done&#8230; it was always a pain&#8230; i&#8217;m so glad that flex 2.0 has released, i knew [...]]]></description>
			<content:encoded><![CDATA[<p class="body">There are many great things about flex, and the flash 9 player, and actionscript 3&#8230;</p>
<p> I&#8217;m not brand new to flash, or flash development, i&#8217;ve never done anything truly amazing with it, but i&#8217;ve done what had to be done&#8230; it was always a pain&#8230; i&#8217;m so glad that flex 2.0 has released, i knew it would eventually get to this, and i can&#8217;t wait for it to just keep getting better&#8230;</p>
<p>A great tool that makes the web even more look like a true desktop application is the use of the <mx:menubar>  it&#8217;s a fantastic addition, and i haven&#8217;t had a chance to look at the actionscript that it generates, but i know that i love it and it&#8217;s capabilities&#8230; i will soon be blogging on make the menu dynamic, and bringing the xml in from a query generated in coldfusion, but for now i&#8217;ll start rather simply&#8230; I can&#8217;t remember where i found this but it is a great thing! </mx:menubar></p>
<p><span id="more-43"></span><a href="http://axel.cfwebtools.com/Examples/Using-the-MenuBar/bin/" target="_blank">View Example</a></p>
<p><a href="http://axel.cfwebtools.com/Examples/Using-the-MenuBar/CFMenu-Step1.zip" target="_blank">Download Example</a></p>
<p>First things first,</p>
<p>1. Make your Script tag</p>
<p>2. import Classes</p>
<p>3. Create vars</p>
<p>4. Create 2 function  &#8212;-One will be called when the menu item is clicked  &#8212;-One will be called on the load of the app.</p>
<p>5. Create Your <mx:menubar> and Bind it    </mx:menubar></p>
<p>1.<br />
==================</p>
<p class="code"><span style="color: #000080">&lt;mx:Script&gt;</span><br />
&lt;![CDATA[</p>
<p>]]&gt;<br />
<span style="color: #000080">&lt;/mx:Script&gt;</span></p>
<p>2. FROM WITHIN YOUR SCRIPT TAG, IMPORT CLASSES<br />
==================</p>
<p class="code">import mx.events.MenuEvent;<br />
import mx.controls.Alert;<br />
import mx.collections.*;</p>
<p>3. CREATE VARS<br />
==================</p>
<p class="code">[Bindable]<br />
public var menuBarCollection:XMLListCollection;</p>
<p>private var menubarXML:XMLList =<br />
&lt;&gt;<br />
<span style="color: #000080">&lt;menuitem label=<span style="color: #0000ff">&#8220;File&#8221;</span>&gt;</span><br />
<span style="color: #000080">&lt;menuitem label=<span style="color: #0000ff">&#8220;Login&#8221;</span> data=<span style="color: #0000ff">&#8220;mnuLogin&#8221;</span>/&gt;</span><br />
<span style="color: #000080">&lt;menuitem label=<span style="color: #0000ff">&#8220;Exit&#8221;</span> data=<span style="color: #0000ff">&#8220;mnuExit&#8221;</span>/&gt;</span><br />
<span style="color: #000080">&lt;/menuitem&gt;</span><br />
&lt;/&gt;</p>
<p>4. Create 2 function<br />
==================</p>
<p class="code">private function menuHandler(event:MenuEvent):void  {<br />
Alert.show(<span style="color: #0000ff">&#8220;Label: &#8220;</span> + event.item.@label + <span style="color: #0000ff">&#8220;\n&#8221;</span> + <span style="color: #0000ff">&#8220;Data: &#8220;</span> + event.item.@data + <span style="color: #0000ff">&#8220;\n&#8221;</span>, <span style="color: #0000ff">&#8220;Clicked menu item&#8221;</span>);<br />
}</p>
<p>private function setUp():void{<br />
menuBarCollection = new XMLListCollection(menubarXML);<br />
}</p>
<p>5. Create Your MenuBar and Bind it<br />
==================</p>
<p class="code"><span style="color: #000080">&lt;mx:MenuBar<br />
labelField=<span style="color: #0000ff">&#8220;@label&#8221;</span><br />
itemClick=<span style="color: #0000ff">&#8220;menuHandler(event);&#8221;</span><br />
dataProvider=<span style="color: #0000ff">&#8220;{menuBarCollection}&#8221;</span><br />
/&gt;</span></p>
<p>I worked on trying to get the xml to import from a cfc last night for about 4 hours&#8230; it really bites when there is no book for some of the stuff you want to do&#8230; so you figure it out, it takes you forever, then other people act like it&#8217;s soooo easy to do, because time goes on, people write about it, people learn more, and the community grows&#8230; i&#8217;m glad i can be a part of it, and for some reason i like the learning other things that arent written about, it keeps me alive and interested.</p>
<p>i&#8217;ll write later about importing the xml from a cfc file.</p>
<img src="http://www.axelscript.com/?ak_action=api_record_view&id=43&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.axelscript.com/2008/02/11/using-a-menubar-in-flex-20-step-1/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Using SQL sub select statments, or selects within select statments</title>
		<link>http://www.axelscript.com/2008/02/11/using-sql-sub-select-statments-or-selects-within-select-statments/</link>
		<comments>http://www.axelscript.com/2008/02/11/using-sql-sub-select-statments-or-selects-within-select-statments/#comments</comments>
		<pubDate>Mon, 11 Feb 2008 18:19:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Coldfusion]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://www.axelscript.com/2008/02/11/using-sql-sub-select-statments-or-selects-within-select-statments/</guid>
		<description><![CDATA[In our team of developer&#8217;s we use a tracking system, to track work orders, bug fixes, feature requests, and the status of those projects&#8230; One of my recent assignments was to create a &#8220;Recently Updated List&#8221; This list will contain the trackID, and a Title&#8230; it will sort by the date in descending order so [...]]]></description>
			<content:encoded><![CDATA[<p class="body">In our team of developer&#8217;s we use a tracking system, to track work orders, bug fixes, feature requests, and the status of those projects&#8230;</p>
<p> One of my recent assignments was to create a &#8220;Recently Updated List&#8221;</p>
<p>This list will contain the trackID, and a Title&#8230; it will sort by the date in descending order so we always see the most recent items first&#8230; It will join 2 tables &#8211; items(v_items), and events&#8230;</p>
<p>Items is the Main table, and Events are details about that item that happen along the tracking of that item&#8230;</p>
<p><span id="more-39"></span><br />
For example, say you have track 897  897<br />
========<br />
(below are events)<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
edited by axel on 11/11/06 @ 2:00pm</p>
<p>We now are finished with this track<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
edited by axel on 11/11/06 @ 1:30pm</p>
<p>We did something else<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
edited by axel on 11/11/06 @ 1:00pm</p>
<p>we edited the table in the database to meet a need<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p class="code"><span style="color: #800000">&lt;cfquery datasource=<span style="color: #0000ff">&#8220;#Application.AdminDsn#&#8221;</span> name=<span style="color: #0000ff">&#8220;getFeaturesList&#8221;</span>&gt;</span><br />
SELECT<br />
v.itemid, v.title,<br />
e.datecreated, e.eventid<br />
FROM v_items v<br />
INNER Join Events e<br />
ON v.itemid = e.itemid<br />
WHERE<br />
e.eventid in (<br />
SELECT TOP 1 e2.eventid<br />
FROM events e2<br />
WHERE e2.itemid = v.itemid<br />
AND e.createdbyuserid = 92<br />
ORDER BY e2.datecreated desc<br />
)<br />
AND<br />
e.datecreated &gt;<br />
<span style="color: #800000">&lt;cfqueryparam cfsqltype=<span style="color: #0000ff">&#8220;cf_sql_date&#8221;</span><br />
value=<span style="color: #0000ff">&#8220;#DateAdd(&#8216;m&#8217;,-1,Now())#&#8221;</span>/&gt;</span><br />
AND v.statusID IN (<span style="color: #0000ff">5</span>)<br />
ORDER BY e.datecreated desc<br />
<span style="color: #800000">&lt;/cfquery&gt;</span></p>
<img src="http://www.axelscript.com/?ak_action=api_record_view&id=39&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.axelscript.com/2008/02/11/using-sql-sub-select-statments-or-selects-within-select-statments/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dump ALL sessions in coldfusion!</title>
		<link>http://www.axelscript.com/2008/02/11/dump-all-sessions-in-coldfusion/</link>
		<comments>http://www.axelscript.com/2008/02/11/dump-all-sessions-in-coldfusion/#comments</comments>
		<pubDate>Mon, 11 Feb 2008 18:16:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Coldfusion]]></category>

		<guid isPermaLink="false">http://www.axelscript.com/2008/02/11/dump-all-sessions-in-coldfusion/</guid>
		<description><![CDATA[http://succor.co.uk/index.cfm/&#8230; I found this very interesting blog from a cf-talk discussion, and found it was worth blogging. &#60;!DOCTYPE HTML PUBLIC &#8220;-//W3C//DTD HTML 4.01 Transitional//EN&#8221;&#62; &#60;html&#62; &#60;head&#62; &#60;title&#62;session tracker&#60;/title&#62; &#60;/head&#62; &#60;body&#62; &#60;cfapplication name=&#8220;&#8221;&#62; &#60;cfset request.overallTotal = 0 /&#62; &#60;cfloop collection=&#8220;#application#&#8221; item=&#8220;applicationName&#8221;&#62; &#60;cfscript&#62; sessiontrackerObj= createObject(&#8220;java&#8221;,&#8220;coldfusion.runtime.SessionTracker&#8221;); activesessions = sessiontrackerObj.getSessionCollection(&#8216;#applicationName#&#8217;); nosessions=ListLen(structkeyList(activeSessions)); &#60;/cfscript&#62; &#60;cfif nosessions&#62; &#60;cfoutput&#62; &#60;h3&#62;Total Sessions for #applicationName#: [...]]]></description>
			<content:encoded><![CDATA[<p class="body"><a href="http://www.succor.co.uk/index.cfm/2006/5/4/viewing-sessions-on-your-server-across-all-applications" target="_blank">http://succor.co.uk/index.cfm/&#8230;<a></p>
<p> I found this very interesting blog from a cf-talk discussion, and found it was worth blogging.</p>
<p class="code"><span style="color: #000080">&lt;!DOCTYPE HTML PUBLIC <span style="color: #0000ff">&#8220;<span style="color: #808080"><em>-//W3C//DTD HTML 4.01 Transitional//EN&#8221;</em></span><em>&gt;</em></span></span> <span style="color: #000080">&lt;html&gt;</span><br />
<span style="color: #000080">&lt;head&gt;</span><br />
<span style="color: #000080">&lt;title&gt;</span>session tracker<span style="color: #000080">&lt;/title&gt;</span><br />
<span style="color: #000080">&lt;/head&gt;</span></p>
<p><span style="color: #000080">&lt;body&gt;</span><br />
<span style="color: #800000">&lt;cfapplication name=<span style="color: #0000ff">&#8220;&#8221;</span>&gt;</span><br />
<span style="color: #800000">&lt;cfset request.overallTotal = 0 /&gt;</span><br />
<span style="color: #800000">&lt;cfloop collection=<span style="color: #0000ff">&#8220;#application#&#8221;</span> item=<span style="color: #0000ff">&#8220;applicationName&#8221;</span>&gt;</span></p>
<p><span style="color: #800000">&lt;cfscript&gt;</span><br />
sessiontrackerObj= createObject(<span style="color: #0000ff">&#8220;java&#8221;</span>,<span style="color: #0000ff">&#8220;coldfusion.runtime.SessionTracker&#8221;</span>);<br />
activesessions = sessiontrackerObj.getSessionCollection(&#8216;#applicationName#&#8217;);<br />
nosessions=ListLen(structkeyList(activeSessions));<br />
<span style="color: #800000">&lt;/cfscript&gt;</span><br />
<span style="color: #800000">&lt;cfif nosessions&gt;</span><br />
<span style="color: #800000">&lt;cfoutput&gt;</span><br />
<span style="color: #000080">&lt;h3&gt;</span>Total Sessions for #applicationName#: #nosessions#<span style="color: #000080">&lt;/h3&gt;</span><br />
<span style="color: #800000">&lt;/cfoutput&gt;</span><br />
<span style="color: #800000">&lt;cfif structKeyExists(url,<span style="color: #0000ff">&#8220;showSessions&#8221;</span>)&gt;</span><span style="color: #800000">&lt;cfdump var=<span style="color: #0000ff">&#8220;#activesessions#&#8221;</span>&gt;</span><span style="color: #800000">&lt;/cfif&gt;</span><br />
<span style="color: #800000">&lt;/cfif&gt;</span><br />
<span style="color: #800000">&lt;cfset request.overallTotal = request.overallTotal + nosessions /&gt;</span></p>
<p><span style="color: #800000">&lt;/cfloop&gt;</span><br />
<span style="color: #000080">&lt;h3 style=<span style="color: #0000ff">&#8220;position:absolute; top:0; right:0; width:200px;&#8221;</span>&gt;</span>OVERALL SESSIONS:</p>
<p><span style="color: #800000">&lt;cfoutput&gt;</span>#request.overallTotal#<span style="color: #800000">&lt;/cfoutput&gt;</span><span style="color: #000080">&lt;/h3&gt;</span></p>
<p><span style="color: #000080">&lt;/body&gt;</span><br />
<span style="color: #000080">&lt;/html&gt;</span></p>
<p><span id="more-38"></span></p>
<img src="http://www.axelscript.com/?ak_action=api_record_view&id=38&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.axelscript.com/2008/02/11/dump-all-sessions-in-coldfusion/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BEAUTIFUL CFDIRECTORY</title>
		<link>http://www.axelscript.com/2008/02/10/beautiful-cfdirectory/</link>
		<comments>http://www.axelscript.com/2008/02/10/beautiful-cfdirectory/#comments</comments>
		<pubDate>Sun, 10 Feb 2008 20:31:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Coldfusion]]></category>

		<guid isPermaLink="false">http://www.axelscript.com/2008/02/10/beautiful-cfdirectory/</guid>
		<description><![CDATA[http://www.forta.com/blog/index.cfm/2006/11/1/improving-cfdirectory-performance this post is awesome&#8230; it&#8217;s an undocumented feature that sits in a live doc note on the live docs of coldfusion&#8230;. Here is what&#8217;s written on Ben&#8217;s Blog: &#8220;Mark Kruger posted comments about the performance of (see post 1 and post 2). He noted that returning full directory information with all file details (especially [...]]]></description>
			<content:encoded><![CDATA[<p class="body"><a href="http://www.forta.com/blog/index.cfm/2006/11/1/improving-cfdirectory-performance" target="_blank">http://www.forta.com/blog/index.cfm/2006/11/1/improving-cfdirectory-performance</a></p>
<p> this post is awesome&#8230; it&#8217;s an undocumented feature that sits in a live doc note on the live docs of coldfusion&#8230;.</p>
<p>Here is what&#8217;s written on Ben&#8217;s Blog:</p>
<p><span id="more-37"></span><br />
&#8220;Mark Kruger posted comments about the performance of <cfdirectory action="list"> (see post 1 and post 2). He noted that returning full directory information with all file details (especially over network connections) can be painfully slow. As per his post, using Java APIs to return directory lists is far quicker, which is odd as <cfdirectory action="list"> actually uses the same Java APIs internally.&#8221;    </cfdirectory></cfdirectory></p>
<p>&#8220;In a comment on Mark&#8217;s blog, Tom Jordahl pointed out that the reason for this is that for <cfdirectory> to return all file details it needs to first retrieve the file list and then perform a Java stat() for each file, and that stat() call is very time consuming (especially over network connections). The solution, if you just need file names and not other details, is to use the undocumented LISTINFO attribute. LISTINFO defaults to &#8220;all&#8221;, but specify LISTINFO=&#8221;name&#8221; and <cfdirectory> will only return file names and will run just as quickly as the Java APIs it relies on.&#8221;    </cfdirectory></cfdirectory></p>
<p>I could use this soooo so much in my directory lister for all of my music&#8230;</p>
<p>The only reason I&#8217;m blogging this direct copy of Ben&#8217;s post because i plan to use it later, and i feel bad just copying bits and pieces, and I&#8217;m not sure if I&#8217;ll ever be able to find it again&#8230; lord only knows how many times i come across code, and code snippets, and good example sites, and a day later i never remember where they were, and i can&#8217;t find them any more&#8230; gosh that aggravates me</p>
<img src="http://www.axelscript.com/?ak_action=api_record_view&id=37&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.axelscript.com/2008/02/10/beautiful-cfdirectory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Browser detection script</title>
		<link>http://www.axelscript.com/2008/02/10/browser-detection-script/</link>
		<comments>http://www.axelscript.com/2008/02/10/browser-detection-script/#comments</comments>
		<pubDate>Sun, 10 Feb 2008 20:08:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Coldfusion]]></category>
		<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://www.axelscript.com/2008/02/10/browser-detection-script/</guid>
		<description><![CDATA[Here is a simple browser detection script &#60;cfif Trim(ListGetAt(CGI.HTTP_USER_AGENT, 2, &#8220;;&#8221;)) EQ &#8220;MSIE 6.0&#8243;&#62; &#60;link rel=&#8220;stylesheet&#8221; type=&#8220;text/css&#8221; href=&#8220;css/main_IE6.css&#8221; media=&#8220;screen&#8221; /&#62; &#60;cfelseif Trim(ListGetAT(CGI.HTTP_USER_AGENT, 2, &#8220;;&#8221;)) EQ &#8220;MSIE 7.0&#8243;&#62; &#60;link rel=&#8220;stylesheet&#8221; type=&#8220;text/css&#8221; href=&#8220;css/main_IE7.css&#8221; media=&#8220;screen&#8221; /&#62; &#60;cfelse&#62; &#60;link rel=&#8220;stylesheet&#8221; type=&#8220;text/css&#8221; href=&#8220;css/main_FF.css&#8221; media=&#8220;screen&#8221; /&#62; &#60;/cfif&#62;]]></description>
			<content:encoded><![CDATA[<p class="body">  	Here is a simple browser detection script</p>
<p class="code"><span style="color: #800000">&lt;cfif Trim(ListGetAt(CGI.HTTP_USER_AGENT,<span style="color: #0000ff"> 2</span>, <span style="color: #0000ff">&#8220;;&#8221;</span>)) EQ <span style="color: #0000ff">&#8220;MSIE 6.0&#8243;</span>&gt;</span></p>
<p><span style="color: #000080">&lt;link rel=<span style="color: #0000ff">&#8220;stylesheet&#8221;</span><br />
type=<span style="color: #0000ff">&#8220;text/css&#8221;</span><br />
href=<span style="color: #0000ff">&#8220;css/main_IE6.css&#8221;</span><br />
media=<span style="color: #0000ff">&#8220;screen&#8221;</span><br />
/&gt;</span></p>
<p><span style="color: #800000">&lt;cfelseif Trim(ListGetAT(CGI.HTTP_USER_AGENT,<span style="color: #0000ff"> 2</span>, <span style="color: #0000ff">&#8220;;&#8221;</span>)) EQ <span style="color: #0000ff">&#8220;MSIE 7.0&#8243;</span>&gt;</span></p>
<p><span style="color: #000080">&lt;link rel=<span style="color: #0000ff">&#8220;stylesheet&#8221;</span><br />
type=<span style="color: #0000ff">&#8220;text/css&#8221;</span><br />
href=<span style="color: #0000ff">&#8220;css/main_IE7.css&#8221;</span><br />
media=<span style="color: #0000ff">&#8220;screen&#8221;</span><br />
/&gt;</span></p>
<p><span id="more-36"></span><br />
<span style="color: #800000">&lt;cfelse&gt;</span><br />
<span style="color: #000080">&lt;link rel=<span style="color: #0000ff">&#8220;stylesheet&#8221;</span><br />
type=<span style="color: #0000ff">&#8220;text/css&#8221;</span><br />
href=<span style="color: #0000ff">&#8220;css/main_FF.css&#8221;</span><br />
media=<span style="color: #0000ff">&#8220;screen&#8221;</span><br />
/&gt;</span></p>
<p><span style="color: #800000">&lt;/cfif&gt;</span></p>
<p><span id="more"></span></p>
<img src="http://www.axelscript.com/?ak_action=api_record_view&id=36&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.axelscript.com/2008/02/10/browser-detection-script/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>sounds getting cached in IE 6 in flash</title>
		<link>http://www.axelscript.com/2008/02/10/sounds-getting-cached-in-ie-6-in-flash/</link>
		<comments>http://www.axelscript.com/2008/02/10/sounds-getting-cached-in-ie-6-in-flash/#comments</comments>
		<pubDate>Sun, 10 Feb 2008 20:06:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Coldfusion]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.axelscript.com/2008/02/10/sounds-getting-cached-in-ie-6-in-flash/</guid>
		<description><![CDATA[Site: http://www.sonburst.com/nng/ The application no longer will display the time on the page, it turned to the original request of a progress bar that shows a percentage&#8230;. There are some problems of the page not doing what they want it to, when going back through mp3’s&#8230; the problem has been identified in .mp3 files are [...]]]></description>
			<content:encoded><![CDATA[<p class="body">Site: http://www.sonburst.com/nng/</p>
<p> The application no longer will display the time on the page, it turned to the original request of a progress bar that shows a percentage&#8230;.</p>
<p>There are some problems of the page not doing what they want it to, when going back through mp3’s&#8230; the problem has been identified in .mp3 files are being cached in IE 6.</p>
<p>I&#8217;m currently trying to find a fix for this&#8230; so far, i&#8217;ve tried preventing the page cache using<br />
<cfheader name="Pragma" value="no-cache">     </cfheader></p>
<p>but no luck so far&#8230; when i go into IE, and change my settings to</p>
<p>Tools &gt; Internet Options &gt; (Temporary Internet Files) &gt; Click on Settings &gt; Change the value &#8220;Check for newer versions of stored pages&#8221; to &#8220;every visit to the page&#8221; and then i deleted my files, and refreshed the page, and it worked&#8230;.<br />
<span id="more-35"></span><br />
Still working on a permanent fix, but we&#8217;ve identified the problem.  Used a tool called &#8220;Service Capture&#8221; to find out that it was IE 6 that was doing it&#8230; the problem doesnt seem to be happening in firefox, and that is one of the reasons I never saw it, because my base alpha testing was done in firefox&#8230;.</p>
<p><strong>FOUND THE FIX!</strong></p>
<p class="code">filename = <span style="color: #0000ff">&#8220;sometrack.mp3&#8243;</span><br />
<span style="color: #808080"><em> //the filename is going to be dynamic</em></span><br />
filename = filename + <span style="color: #0000ff">&#8220;?r=&#8221;</span> + Date();<br />
sndAudio.loadSound(filename, true);</p>
<p>NOTE!!!!!!!!<br />
=================<br />
this wont work when you try to trace it, your going to get errors because it&#8217;s not going to run on a webserver&#8230; but when it runs on a webserver it works because the command flash sends understands the querystring&#8230;</p>
<p>WOOOOOOOOOT!</p>
<img src="http://www.axelscript.com/?ak_action=api_record_view&id=35&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.axelscript.com/2008/02/10/sounds-getting-cached-in-ie-6-in-flash/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flash URL Encoding</title>
		<link>http://www.axelscript.com/2008/02/10/flash-url-encoding/</link>
		<comments>http://www.axelscript.com/2008/02/10/flash-url-encoding/#comments</comments>
		<pubDate>Sun, 10 Feb 2008 20:03:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Coldfusion]]></category>
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://www.axelscript.com/2008/02/10/flash-url-encoding/</guid>
		<description><![CDATA[This isn&#8217;t perfect, but what i had to do was use the &#8220;escape&#8221; method&#8230;. var artist = &#8220;Set Your Goals&#8221; var album = &#8220;Mutiny!&#8221; var someVar = &#8216;&#60;br&#62; Some Test&#8217; + escape(artist) + &#8216;/&#8217; + escape(album) + &#8216;end&#8217;; This was a workaround for some stuff I do for killtheheart player I haven&#8217;t been able to [...]]]></description>
			<content:encoded><![CDATA[<p class="body">This isn&#8217;t perfect, but what i had to do was use the &#8220;escape&#8221; method&#8230;.</p>
<p class="code">var artist = <span style="color: #0000ff">&#8220;Set Your Goals&#8221;</span><br />
var album = <span style="color: #0000ff">&#8220;Mutiny!&#8221;</span><br />
var someVar = &#8216;<span style="color: #000080">&lt;br&gt;</span> Some Test&#8217; + escape(artist) + &#8216;/&#8217; + escape(album) + &#8216;end&#8217;;<br />
This was a workaround for some stuff I do for</p>
<p><a href="http://beta.killtheheart.com" target="_blank">killtheheart player</a></p>
<p>I haven&#8217;t been able to check it with any of the special characters for usage with xml or anything, but this was a quick save for me.</p>
<img src="http://www.axelscript.com/?ak_action=api_record_view&id=34&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.axelscript.com/2008/02/10/flash-url-encoding/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

