<?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>Ryan Stewart - Mountaineer Coding &#187; LiveCycle Data Services</title>
	<atom:link href="http://blog.digitalbackcountry.com/category/livecycle-data-services/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.digitalbackcountry.com</link>
	<description>Just an average guy trying to drink above average beer.</description>
	<lastBuildDate>Thu, 02 Feb 2012 02:35:06 +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 a MySQL Datasource with Tomcat and LCDS 3.0</title>
		<link>http://blog.digitalbackcountry.com/2009/09/using-a-mysql-datasource-with-tomcat-and-lcds-3-0/</link>
		<comments>http://blog.digitalbackcountry.com/2009/09/using-a-mysql-datasource-with-tomcat-and-lcds-3-0/#comments</comments>
		<pubDate>Tue, 01 Sep 2009 22:54:28 +0000</pubDate>
		<dc:creator>ryanstewart</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[LiveCycle Data Services]]></category>
		<category><![CDATA[datasource]]></category>
		<category><![CDATA[lcds]]></category>
		<category><![CDATA[lcds 3.0]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://blog.digitalbackcountry.com/?p=2095</guid>
		<description><![CDATA[I&#8217;ve spent today becoming familiar with LiveCycle Data Services 3.0 and am excited by the direction the product is going in. You&#8217;re going to hear a lot more about model driven development from us and I think LCDS 3.0 is &#8230; <a href="http://blog.digitalbackcountry.com/2009/09/using-a-mysql-datasource-with-tomcat-and-lcds-3-0/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve spent today becoming familiar with <a href="http://labs.adobe.com/technologies/livecycle_dataservices3/">LiveCycle Data Services 3.0</a> and am excited by the direction the product is going in. You&#8217;re going to hear a lot more about model driven development from us and I think LCDS 3.0 is a product that 1) makes full use of the Flash Platform and Flex&#8217;s capabilities and 2) shows what it takes to build a genuine rich Internet application.</p>
<p>One issue I ran into though was getting a MySQL database to work with the Tomcat installation of LCDS 3.0 so I wanted to quickly blog the steps I went through. The instructions <a href="http://confluence.atlassian.com/display/DOC/Configuring+a+MySQL+Datasource+in+Apache+Tomcat">here were hugely helpful</a> and I wanted to break them down for an LCDS-specific install of Tomcat</p>
<ul>
<li>First you need to get the MySQL drivers for Java which are <a href="http://dev.mysql.com/downloads/">available here</a>. As of this post the <a href="http://dev.mysql.com/downloads/connector/j/5.1.html">most recent drivers are version 5.1</a>.</li>
<li>Copy the <code>mysql-connector-java-5.1.8-bin.jar</code> file into the <code>lib/</code> directory of your tomcat install (</code>/Applications/lcds/tomcat/</code> by default).</li>
</ul>
<p>Once that's copied, open the xml file for your specific server inside of the <code>tomcat/conf/Catalina/localhost/</code> directory. In this case, I'm using the default <code>lcds</code> server, so I need to change <code>lcds.xml</code>. You'll also see the other servers that come with LCDS 3.0 like <code>lcds-samples.xml</code> and <code>ds-console.xml</code>.</p>
<p>Copy this code into that file anywhere inside the <code>Context</code> tags and replace {databaseName} with the name of your database, and change the other {} variables accordingly.</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;">    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Resource</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;jdbc/{databaseName}&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;javax.sql.DataSource&quot;</span></span>
<span style="color: #009900;">          <span style="color: #000066;">driverClassName</span>=<span style="color: #ff0000;">&quot;com.mysql.jdbc.Driver&quot;</span></span>
<span style="color: #009900;">          <span style="color: #000066;">url</span>=<span style="color: #ff0000;">&quot;jdbc:mysql://{host}:{databasePort}/{databaseName}&quot;</span></span>
<span style="color: #009900;">          <span style="color: #000066;">username</span>=<span style="color: #ff0000;">&quot;{username}&quot;</span> <span style="color: #000066;">password</span>=<span style="color: #ff0000;">&quot;{password}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span></pre></div></div>

<p>Now you're all set! Once you've got RDS set up on your LCDS 3.0 server you'll be able to see the MySQL database and start using it for your model driven development.</p>
<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://blog.digitalbackcountry.com/2009/09/using-a-mysql-datasource-with-tomcat-and-lcds-3-0/" data-text="Using a MySQL Datasource with Tomcat and LCDS 3.0" data-count="horizontal">Tweet</a><div class="alignright"><div class="g-plusone" data-href="http://blog.digitalbackcountry.com/2009/09/using-a-mysql-datasource-with-tomcat-and-lcds-3-0/" size="standard" count="true"></div></div>]]></content:encoded>
			<wfw:commentRss>http://blog.digitalbackcountry.com/2009/09/using-a-mysql-datasource-with-tomcat-and-lcds-3-0/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Upcoming Presentations in Portland and San Jose</title>
		<link>http://blog.digitalbackcountry.com/2008/07/upcoming-presentations-in-portland-and-san-jose/</link>
		<comments>http://blog.digitalbackcountry.com/2008/07/upcoming-presentations-in-portland-and-san-jose/#comments</comments>
		<pubDate>Thu, 17 Jul 2008 20:09:02 +0000</pubDate>
		<dc:creator>ryanstewart</dc:creator>
				<category><![CDATA[Adobe]]></category>
		<category><![CDATA[LiveCycle Data Services]]></category>
		<category><![CDATA[360Flex]]></category>
		<category><![CDATA[Adobe AIR]]></category>
		<category><![CDATA[lcds]]></category>
		<category><![CDATA[pdxria]]></category>

		<guid isPermaLink="false">http://blog.digitalbackcountry.com/?p=1489</guid>
		<description><![CDATA[After a couple of months at home coding, emailing, and getting my blog back on, I&#8217;m going out on the road again. I&#8217;ll be in Portland for OSCON next week and I&#8217;m also going to be presenting Online/Offline Synchronization with &#8230; <a href="http://blog.digitalbackcountry.com/2008/07/upcoming-presentations-in-portland-and-san-jose/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>After a couple of months at home coding, emailing, and getting my blog back on, I&#8217;m going out on the road again. I&#8217;ll be in Portland for OSCON next week and I&#8217;m also going to be presenting Online/Offline Synchronization with Adobe AIR and LiveCycle Data Services to <a href="http://www.pdxria.com/">PDXRIA on Thursday</a>. I thought I was also going to be giving this talk tonight to the Austin Flex User Group but it turns out I was off by a day and I missed it. Sorry guys!</p>
<p>In August I&#8217;ll be heading down to <a href="http://www.360conferences.com/360flex/">360Flex</a>, the premiere Flex conference, to give the same talk (but probably more polished). The talk is primarily targeted at developers who want to take a look at how to start taking AIR applications offline and having a server do all the work. I&#8217;ve been coding demos and examples the past couple of weeks and it is really, really impressive how easy it is. I hope to see you at one of those conferences!</p>
<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://blog.digitalbackcountry.com/2008/07/upcoming-presentations-in-portland-and-san-jose/" data-text="Upcoming Presentations in Portland and San Jose" data-count="horizontal">Tweet</a><div class="alignright"><div class="g-plusone" data-href="http://blog.digitalbackcountry.com/2008/07/upcoming-presentations-in-portland-and-san-jose/" size="standard" count="true"></div></div>]]></content:encoded>
			<wfw:commentRss>http://blog.digitalbackcountry.com/2008/07/upcoming-presentations-in-portland-and-san-jose/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using LiveCycle Data Services 2.6 Inside of ColdFusion 8</title>
		<link>http://blog.digitalbackcountry.com/2008/06/using-livecycle-data-services-26-inside-of-coldfusion-8/</link>
		<comments>http://blog.digitalbackcountry.com/2008/06/using-livecycle-data-services-26-inside-of-coldfusion-8/#comments</comments>
		<pubDate>Tue, 01 Jul 2008 02:15:12 +0000</pubDate>
		<dc:creator>ryanstewart</dc:creator>
				<category><![CDATA[Adobe]]></category>
		<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[LiveCycle Data Services]]></category>
		<category><![CDATA[lcds]]></category>

		<guid isPermaLink="false">http://blog.digitalbackcountry.com/?p=1469</guid>
		<description><![CDATA[By default, ColdFusion 8 comes with LCDS 2.5. But there&#8217;s a lot of new, good stuff in LCDS 2.6 that might be good to take advantage of if you&#8217;re doing data services work in ColdFusion. There are some instructions on &#8230; <a href="http://blog.digitalbackcountry.com/2008/06/using-livecycle-data-services-26-inside-of-coldfusion-8/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>By default, ColdFusion 8 comes with LCDS 2.5. But there&#8217;s a lot of new, <a href="http://labs.adobe.com/technologies/livecycle_dataservices2_6/">good stuff in LCDS 2.6</a> that might be good to take advantage of if you&#8217;re doing data services work in ColdFusion. There are some <a href="http://labs.adobe.com/wiki/index.php/LiveCycle_Data_Services:Integrating_with_ColdFusion_8">instructions on Labs</a>, but I just tried them tonight, and I think they&#8217;re terrible. Luckily, <a href="http://justjoshn.com/entry/integrating-coldfusion-8-01-with-livecycle-ds-2-6-beta">Joshua Rodgers has a great step-by-step walkthrough</a> for getting LCDS 2.6 up and running inside your ColdFusion 8 server.</p>
<p>I just wanted to make sure people saw Joshua&#8217;s instructions and didn&#8217;t waste time like I did decoding the official version.</p>
<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://blog.digitalbackcountry.com/2008/06/using-livecycle-data-services-26-inside-of-coldfusion-8/" data-text="Using LiveCycle Data Services 2.6 Inside of ColdFusion 8" data-count="horizontal">Tweet</a><div class="alignright"><div class="g-plusone" data-href="http://blog.digitalbackcountry.com/2008/06/using-livecycle-data-services-26-inside-of-coldfusion-8/" size="standard" count="true"></div></div>]]></content:encoded>
			<wfw:commentRss>http://blog.digitalbackcountry.com/2008/06/using-livecycle-data-services-26-inside-of-coldfusion-8/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Online/Offline Synchronization with Adobe AIR</title>
		<link>http://blog.digitalbackcountry.com/2008/05/onlineoffline-synchronization-with-adobe-air/</link>
		<comments>http://blog.digitalbackcountry.com/2008/05/onlineoffline-synchronization-with-adobe-air/#comments</comments>
		<pubDate>Wed, 21 May 2008 00:26:18 +0000</pubDate>
		<dc:creator>ryanstewart</dc:creator>
				<category><![CDATA[Adobe]]></category>
		<category><![CDATA[LiveCycle Data Services]]></category>
		<category><![CDATA[Adobe AIR]]></category>

		<guid isPermaLink="false">http://blog.digitalbackcountry.com/?p=1432</guid>
		<description><![CDATA[One of the biggest problems I think we have when dealing with the offline/online problem is synchronization. Doing conflict resolution for data when you get back online is a big pain in the ass. With AIR, more Adobe developers are &#8230; <a href="http://blog.digitalbackcountry.com/2008/05/onlineoffline-synchronization-with-adobe-air/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>One of the biggest problems I think we have when dealing with the offline/online problem is synchronization. Doing conflict resolution for data when you get back online is a big pain in the ass. With AIR, more Adobe developers are starting to think about the problem and luckily we have a good solution with LiveCycle Data Services 2.6. I&#8217;m going to be talking about Online/Offline Synchronizaton with AIR and LCDS at <a href="http://www.360conferences.com/360flex/">360|Flex San Jose</a>, but Christophe Coenraets just <a href="http://coenraets.org/blog/2008/05/insync-automatic-offline-data-synchronization-in-air-using-lcds-26/">published a wicked example of how it works called InSync</a>. Well worth checking out.</p>
<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://blog.digitalbackcountry.com/2008/05/onlineoffline-synchronization-with-adobe-air/" data-text="Online/Offline Synchronization with Adobe AIR" data-count="horizontal">Tweet</a><div class="alignright"><div class="g-plusone" data-href="http://blog.digitalbackcountry.com/2008/05/onlineoffline-synchronization-with-adobe-air/" size="standard" count="true"></div></div>]]></content:encoded>
			<wfw:commentRss>http://blog.digitalbackcountry.com/2008/05/onlineoffline-synchronization-with-adobe-air/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Real Time Communication with Flex and AIR using ColdFusion and LiveCycle Data Services</title>
		<link>http://blog.digitalbackcountry.com/2008/04/real-time-communication-with-flex-and-air-using-coldfusion-and-livecycle-data-services/</link>
		<comments>http://blog.digitalbackcountry.com/2008/04/real-time-communication-with-flex-and-air-using-coldfusion-and-livecycle-data-services/#comments</comments>
		<pubDate>Tue, 29 Apr 2008 23:46:14 +0000</pubDate>
		<dc:creator>ryanstewart</dc:creator>
				<category><![CDATA[Adobe]]></category>
		<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[LiveCycle Data Services]]></category>
		<category><![CDATA[Rich Internet Applications]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[flex data services]]></category>
		<category><![CDATA[livecycle data servcies]]></category>
		<category><![CDATA[real time communication]]></category>

		<guid isPermaLink="false">http://blog.digitalbackcountry.com/?p=1403</guid>
		<description><![CDATA[In this walkthrough I&#8217;m going to take you through using ColdFusion (which contains LiveCycle Data Services) to create real time communication between an application in the browser and one on the desktop built with Adobe AIR. Both applications are written &#8230; <a href="http://blog.digitalbackcountry.com/2008/04/real-time-communication-with-flex-and-air-using-coldfusion-and-livecycle-data-services/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>In this walkthrough I&#8217;m going to take you through using ColdFusion (which contains LiveCycle Data Services) to create real time communication between an application in the browser and one on the desktop built with Adobe AIR. Both applications are written in Flex. You&#8217;ll see how we can create a better user experience on the desktop by using things like drag-and-drop and still tie that into a real time scenario inside of the browser.</p>
<p>The first thing you need to do is get <a href="http://www.adobe.com/products/coldfusion/">ColdFusion 8</a> or <a href="http://www.adobe.com/products/livecycle/dataservices/">LiveCycle Data Services (LCDS)</a>. For this tutorial I&#8217;m using RTMP which <a href="http://opensource.adobe.com/wiki/display/blazeds/">BlazeDS</a> doesn&#8217;t support. I&#8217;ll have a BlazeDS example out later this week hopefully. ColdFusion has a LiveCycle Data Services install on top of it, so that&#8217;s what I&#8217;m going to use. You can grab all of the code from my <a href="http://svn.digitalbackcountry.com">SVN repository</a> under the <a href="http://trac.digitalbackcountry.com/public/browser/GPXShare">GPXShare project</a>. You&#8217;ll also need my <a href="http://trac.digitalbackcountry.com/public/browser/GpxAs3">AS3 GPX library</a>. I&#8217;ve got a <a href="http://trac.digitalbackcountry.com/public/browser/GPXShare/browser/trunk/sample-files/Adobe.gpx">sample GPX file</a> you can use as well.</p>
<p>The second thing to be aware of is there are two general categories of communication in LiveCycle DS: the real time communication using <a href="http://en.wikipedia.org/wiki/Real_Time_Messaging_Protocol">RTMP</a> and data management. Data Management lets you do things like synchronize data between online and offline sources while real time communication allows you to push data to clients instead of  having to force clients to check in with a server. Data management is included in LiveCycle DS but not Blaze DS and BlazeDS doesn&#8217;t support the RTMP protocol but does have support for AMF for psuedo-real time communication. For this I&#8217;m just talking about real time messaging over RTMP. Damon Cooper has a good blog post about <a href="http://www.dcooper.org/blog/client/index.cfm?mode=entry&#038;entry=8E1439AD-4E22-1671-58710DD528E9C2E7">the differences between RTMP and AMF</a> and how they apply to BlazeDS and LiveCycle DS.</p>
<p>The code is really, really simple. In my example, <a href="http://trac.digitalbackcountry.com/public/browser/GPXShare/">called GPXShare</a>, I have two applications, one is a <a href="http://trac.digitalbackcountry.com/public/browser/GPXShare/browser/trunk/">Flex-based application running in the browser</a> and the other is a <a href="http://trac.digitalbackcountry.com/public/browser/GPXShare/desktop/trunk/">Flex-based AIR application on the desktop</a>. You&#8217;ll see that I&#8217;m reusing a lot of code, one of the great things about using Flex is that you can quickly and easily move between the browser and the desktop. What I&#8217;m going to do is take an XML file with a bunch of GPS waypoints, drag it on to my AIR application, which will then send out that data to the browser application. You can have any number of browser applications open &#8211; each one &#8220;subscribes&#8221; to messages coming from the AIR application so they get the data in real time. The second part adds a tiny bit of collaboration. I want to be able to select a specific waypoint in either the AIR version or the Flex browser version and have that selection be highlighted on all the clients. All of that is really easy to do with LiveCycle Data Services.</p>
<p>Let&#8217;s first take a look at the <a href="http://trac.digitalbackcountry.com/public/browser/GPXShare/desktop/trunk/src/main.mxml">AIR application</a>. In my AIR app I have two pieces of code which establish a Producer and Consumer:</p>
<pre>
&lt;mx:Producer id="producer" destination="GpxShare" /&gt;
&lt;mx:Consumer id="consumer" destination="GpxShare"
			    message="doMessage( event );" /&gt;
</pre>
<p>. The Producer lets me send code out and the Consumer is what watches for changes. Each of those point to a destination which tells all of the connected clients how to pass the information back and forth. There are a couple of things we need to configure on the server now that we&#8217;ve seen the consumer and the producer.</p>
<p></p>
<ul>
<li><b>The Destination</b> &#8211; The first thing is to <a href="http://trac.digitalbackcountry.com/public/browser/GPXShare/desktop/trunk/readme.txt">set the destination</a>. We&#8217;re looking for a file called <code>messaging-config.xml</code> in the <code>/WEB-INF/flex/</code> directory. In ColdFusion it&#8217;s located in your wwwroot directory. Add the following code in between the <code>&lt;adapters&gt;</code> node:
<pre>
&lt;destination id="GpxShare"&gt;
	&lt;adapter ref="actionscript" /&gt;
	&lt;channels&gt;
		&lt;channel ref="cf-rtmp" /&gt;
	&lt;/channels&gt;
&lt;/destination&gt;
</pre>
</li>
<li><b>The Channel</b> &#8211; Now that we&#8217;ve set the destination, he second thing we need is to make sure that &#8220;cf-rtmp&#8221; channel exists. The channel tells the connected clients which protocol they&#8217;re all using to get to each other and where to send the information. Here we&#8217;re looking for a file called services-config.xml which will be in the same place as the destination config file. Once you find it, the channel definition should already be there you just need to uncomment it and tweak it. It should look like this:
<pre>
&lt;channel-definition id="cf-rtmp"
	class="mx.messaging.channels.RTMPChannel"&gt;
&lt;endpoint uri="rtmp://localhost:2048"
	class="flex.messaging.endpoints.RTMPEndpoint"/&gt;
&lt;properties&gt;
         &lt;idle-timeout-minutes&gt;20&lt;/idle-timeout-minutes&gt;
              &lt;serialization&gt;
                  &lt;instantiate-types&gt;false&lt;/instantiate-types&gt;
              &lt;/serialization&gt;
          &lt;/properties&gt;
&lt;/channel-definition&gt;
</pre>
</li>
</ul>
<p>So we&#8217;ve got our configuration files set up (you&#8217;ll have to rebuild your Flex project if you&#8217;re following along at home to make sure they get the new configuration settings). With that Producer/Consumer tag set up in our AIR application we&#8217;re ready to send out some data. Using the AIR API&#8217;s I&#8217;ve enabled drag and drop events from the file system so that when I drag in a GPX file, it will parse the data and display it in the grid. Once that happens we use the Producer to send the data out to all of our consumers with a <code>doSend()</code> function:</p>
<pre>
// Send our changes out to the consumers
public function doSend( array : Array ):void
{
	// Create the message and set the message body to our data
	var mess:AsyncMessage = new AsyncMessage();
	       mess.body.waypoints = array;
	       producer.send( mess );
}
</pre>
<p>The <code>doSend()</code> function is called after we finish opening the file from the file system and we just pass in the array of Waypoints. We create a new asynchronous message for storing our data and then set the <code>body</code> of that message to our data. In this case I&#8217;m sending an array with the name of <code>waypoints</code>. Finally we call the <code>send()</code> method on our Producer to fire it off. Now lets take a look at what happens inside of our <a href="http://trac.digitalbackcountry.com/public/browser/GPXShare/browser/trunk/src/main.mxml">browser application</a>.</p>
<p>If you take a look at the code, you can see that we get to reuse a lot. Same data grid code and the same Producer/Consumer code. In this case, the browser is acting as a Consumer and you can see we&#8217;ve set the <code>message</code> attribute: <code>message="doMessage( event );"</code>. This sets all of the consumers to watch for new messages and when they come in to call that doMessage function. So when we get message from our Consumer (the AIR application) with new GPS data, we call <code>doMessage()</code> in the browser:</p>
<pre>
// This is what happens when we get a message from the producer
public function doMessage( event:MessageEvent ):void
{
	// Logic checks to see which kind of message we're getting
	if( event.message.body.waypoints != null )
	{
	   dg.dataProvider = event.message.body.waypoints as Array;
	}
	dg.selectedIndex = event.message.body.selectedIndex;
}
</pre>
<p>Pretty straight forward. We&#8217;re passing in a <code>MessageEvent</code> and that MessageEvent contains the <code>waypoint</code> array we passed in from the AIR application. The only semi-tricky thing is that because this application also sends the selected row information back and forth, I do a check to make sure we actually have waypoint data and not just a new selected row number.</p>
<p>So that&#8217;s it! The only other part to the application is sending the selected row back and forth. For that you can again reuse a lot of the same code between the AIR application and the browser application. In both applications we follow the same steps. Set up a <code>change</code> event to fire on our data grid when we select a new row which calls a <code>doChangeSend()</code> function. Then attach the <code>selectedIndex</code> to the message body and pass it through the <code>AsyncMessage</code>. Now when we receive that message we set the <code>selectedIndex</code> of our data grid:</p>
<pre>
// When we make a change to the datagrid we
// send a message with this function
public function doChangeSend( event : ListEvent ) : void
{
	// Create the message and set the message body to our data
	var mess:AsyncMessage = new AsyncMessage();
	       mess.body.selectedIndex = dg.selectedIndex;
	       producer.send( mess );
}
</pre>
<pre>
// When we get back a change event
// make sure the right index is selected
public function doMessage( event:MessageEvent ):void
{
	dg.selectedIndex = event.message.body.selectedIndex;
}
</pre>
<p>That&#8217;s all there is to it. Remember you can grab the source code for <a href="http://svn.digitalbackcountry.com/GPXShare/">both the browser-based Flex application and the desktop-based Flex application built with Adobe AIR</a> from my SVN repository. If you have any question, leave a comment or send me an email. Damon Cooper also has a <a href="http://www.dcooper.org/blog/client/index.cfm?mode=entry&#038;entry=38CBD3C4-4E22-1671-54399419A362F23B">great list of resources for BlazeDS and LiveCycle Data Services</a> for more information.</p>
<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://blog.digitalbackcountry.com/2008/04/real-time-communication-with-flex-and-air-using-coldfusion-and-livecycle-data-services/" data-text="Real Time Communication with Flex and AIR using ColdFusion and LiveCycle Data Services" data-count="horizontal">Tweet</a><div class="alignright"><div class="g-plusone" data-href="http://blog.digitalbackcountry.com/2008/04/real-time-communication-with-flex-and-air-using-coldfusion-and-livecycle-data-services/" size="standard" count="true"></div></div>]]></content:encoded>
			<wfw:commentRss>http://blog.digitalbackcountry.com/2008/04/real-time-communication-with-flex-and-air-using-coldfusion-and-livecycle-data-services/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Database Caching 1/26 queries in 0.109 seconds using disk: basic
Object Caching 659/715 objects using disk: basic

Served from: blog.digitalbackcountry.com @ 2012-02-08 19:20:52 -->
