<?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>Stefan Cameron on Forms &#187; Conferences</title>
	<atom:link href="http://forms.stefcameron.com/category/conferences/feed/" rel="self" type="application/rss+xml" />
	<link>http://forms.stefcameron.com</link>
	<description>Building intelligent forms using Adobe LiveCycle Designer</description>
	<lastBuildDate>Fri, 10 Sep 2010 11:20:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>@SConForms at Adobe MAX 2009</title>
		<link>http://forms.stefcameron.com/2009/10/02/sconforms-at-adobe-max-2009/</link>
		<comments>http://forms.stefcameron.com/2009/10/02/sconforms-at-adobe-max-2009/#comments</comments>
		<pubDate>Fri, 02 Oct 2009 19:00:50 +0000</pubDate>
		<dc:creator>Stefan Cameron</dc:creator>
				<category><![CDATA[Conferences]]></category>

		<guid isPermaLink="false">http://forms.stefcameron.com/2009/10/02/sconforms-at-adobe-max-2009/</guid>
		<description><![CDATA[It&#8217;s hard to believe but only 48 hours remain until I find myself in Los Angeles heading to the LA Convention Center to check-in at the MAX 2009 conference. Before I head down there, I though I would share a few final details that might interest you. Whether or not you are heading to MAX, [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s hard to believe but only 48 hours remain until I find myself in Los Angeles heading to the <a href="http://www.lacclink.com/">LA Convention Center</a> to check-in at the <a href="http://max.adobe.com/">MAX 2009</a> conference. Before I head down there, I though I would share a few final details that might interest you.</p>
<p>Whether or not <em>you</em> are heading to MAX, <strong>Twitter is a huge part of MAX this year:</strong></p>
<ul>
<li>Though I have yet to follow the masses, I will attempt to tweet at <a href="http://twitter.com/SConForms/">@SConForms</a>;</li>
<li>You can check-out what people are saying about MAX by searching for the <a href="http://search.twitter.com/search?q=%23adobemax">#adobemax</a> tag (and if <em>you</em> tweet about MAX, you should use the tag as well!); and</li>
<li>Each of my labs will have designated Twitter tags, <a href="http://search.twitter.com/search?q=%23adobemax49">#adobemax49</a> (Oct 6, 3:30-5pm, PST) and <a href="http://search.twitter.com/search?q=%23adobemax357">#adobemax357</a> (Oct 7, 11am-12:30pm, PST), so that attendees can collaborate, ask questions and give feedback.</li>
</ul>
<p>The <a href="http://www.max.adobe.com/resources/">MAX Resources</a> page has even more Twitter details, including other ways to follow MAX like FaceBook, the MAX Blog, flickr, etc.</p>
<p>For those of you who can&#8217;t join us this year, Adobe has just launched the <a href="http://www.max.adobe.com/online/">MAX Online</a> site where you&#8217;ll be able to watch <strong>live keynotes</strong> and the <strong>top 3 daily sessions</strong>.</p>
<p>Here&#8217;s to an awesome MAX conference this year and Happy Canadian Thanksgiving! I&#8217;ll be <strong>back to my blog as of Oct 19</strong>, after taking a little bit of time off following the conference.</p>
]]></content:encoded>
			<wfw:commentRss>http://forms.stefcameron.com/2009/10/02/sconforms-at-adobe-max-2009/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Adobe MAX 2009 Lab Update</title>
		<link>http://forms.stefcameron.com/2009/08/24/adobe-max-2009-lab-update/</link>
		<comments>http://forms.stefcameron.com/2009/08/24/adobe-max-2009-lab-update/#comments</comments>
		<pubDate>Mon, 24 Aug 2009 17:00:33 +0000</pubDate>
		<dc:creator>Stefan Cameron</dc:creator>
				<category><![CDATA[CM]]></category>
		<category><![CDATA[Conferences]]></category>
		<category><![CDATA[LiveCycle]]></category>

		<guid isPermaLink="false">http://forms.stefcameron.com/2009/08/24/adobe-max-2009-lab-update/</guid>
		<description><![CDATA[We have been hard at work on our Solution Accelerator lab (filter by Speaker and choose my name, &#8220;Cameron, Stefan&#8221;). Now that the content is coming together, there have been a few changes which I thought I should mention in light of my previous post. In order to ensure the lab is successful in the [...]]]></description>
			<content:encoded><![CDATA[<p>We have been hard at work on our <a href="http://max.adobe.com/scheduler/#view=1">Solution Accelerator lab</a> (filter by Speaker and choose my name, &#8220;Cameron, Stefan&#8221;). Now that the content is coming together, there have been a few changes which I thought I should mention in light of my <a href="http://forms.stefcameron.com/2009/07/22/adobe-max-2009/">previous post</a>.</p>
<p>In order to ensure the lab is successful in the short amount of time we have (90 minutes) to build a small end-to-end solution, the Content Creation (CCR) and Correspondence Generation (CGR) building blocks will no longer be featured. Instead, we will feature the following building blocks, which should give you a taste for their power to accelerate your own solutions:</p>
<ul>
<li><a href="http://www.adobe.com/devnet/livecycle/solutions/bb_selection_capture.html">Selection and Capture (SNC)</a> &#8212; capture data and guide users through filling specific forms within a given set;</li>
<li><a href="http://www.adobe.com/devnet/livecycle/solutions/review_buildingblock.html">Review, Commenting and Approval (RCA)</a> &#8212; review the submitted forms and approve or reject as needed;</li>
<li><a href="http://www.adobe.com/devnet/livecycle/solutions/ondemand_buildingblock.html">On-Demand Assembly (ODA)</a> &#8212; automate the creation of a PDF package, a single PDF document containing a copy of submitted forms and other appropriate documentation.</li>
</ul>
<p>In the mean time, here&#8217;s some fun MAX trivia. You never know when it might come in handy&#8230;</p>
<p><img style="visibility: hidden; width: 0px; height: 0px" height="0" src="http://counters.gigya.com/wildfire/IMP/CXNID=2000002.0NXC/bT*xJmx*PTEyNTExMjU*ODkzNjQmcHQ9MTI1MTEyNTU1MDIzMCZwPTc3NDM3MSZkPW1heDA5d2lkZ2V*Jmc9MiZvPTIyNzRhMDcyN2E5NDQzZmY4YjZhNzRkZmM2MWZhZDVjJm9mPTA=.gif" width="0" border="0"> <object id="MaxWidget" codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab" height="400" width="400" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"><param name="_cx" value="10583"><param name="_cy" value="10583"><param name="FlashVars" value=""><param name="Movie" value="http://max.adobe.com/widget/MaxWidget.swf"><param name="Src" value="http://max.adobe.com/widget/MaxWidget.swf"><param name="WMode" value="Window"><param name="Play" value="0"><param name="Loop" value="-1"><param name="Quality" value="High"><param name="SAlign" value="LT"><param name="Menu" value="-1"><param name="Base" value=""><param name="AllowScriptAccess" value="sameDomain"><param name="Scale" value="NoScale"><param name="DeviceFont" value="0"><param name="EmbedMovie" value="0"><param name="BGColor" value="869CA7"><param name="SWRemote" value=""><param name="MovieData" value=""><param name="SeamlessTabbing" value="1"><param name="Profile" value="-1"><param name="ProfileAddress" value=""><param name="ProfilePort" value="1802317617"><param name="AllowNetworking" value="all"><param name="AllowFullScreen" value="false"><embed src="http://max.adobe.com/widget/MaxWidget.swf" quality="high" bgcolor="#869ca7" width="400" height="400" name="MaxWidget" align="middle" play="true" loop="false" allowscriptaccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" flashvars="crtr=1&amp;gig_lt=1251125489364&amp;gig_pt=1251125550230&amp;gig_g=2"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://forms.stefcameron.com/2009/08/24/adobe-max-2009-lab-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adobe MAX 2009</title>
		<link>http://forms.stefcameron.com/2009/07/22/adobe-max-2009/</link>
		<comments>http://forms.stefcameron.com/2009/07/22/adobe-max-2009/#comments</comments>
		<pubDate>Wed, 22 Jul 2009 19:35:42 +0000</pubDate>
		<dc:creator>Stefan Cameron</dc:creator>
				<category><![CDATA[CM]]></category>
		<category><![CDATA[Conferences]]></category>
		<category><![CDATA[LiveCycle]]></category>

		<guid isPermaLink="false">http://forms.stefcameron.com/2009/07/22/adobe-max-2009/</guid>
		<description><![CDATA[I have just been asked to be one of the speakers/trainers for the &#8220;Developing Enterprise Solutions Using Adobe Solution Accelerators&#8221; lab in the LiveCycle Develop track at MAX this year. Once you&#8217;ve registered for MAX, launch the Scheduler and choose &#8220;By Session &#62; Filter By: (product) LiveCycle ES; (speaker) Cameron, Stefan&#8221; to see my sessions. [...]]]></description>
			<content:encoded><![CDATA[<p>I have just been asked to be one of the speakers/trainers for the &#8220;Developing Enterprise Solutions Using <a href="http://www.adobe.com/products/livecycle/solutionaccelerators/">Adobe Solution Accelerators</a>&#8221; lab in the LiveCycle Develop <a href="http://max.adobe.com/sessions/tracks/">track</a> at MAX this year. Once you&#8217;ve <a href="http://max.adobe.com/registration/">registered</a> for MAX, launch the <a href="http://max.adobe.com/scheduler/#view=1">Scheduler</a> and choose &#8220;By Session &gt; Filter By: (product) LiveCycle ES; (speaker) Cameron, Stefan&#8221; to see my sessions. I will most likely be focusing my time on the <a href="http://www.adobe.com/devnet/livecycle/solutions/bb_corr_gen.html">Correspondence Generation (CGR)</a> and <a href="http://www.adobe.com/devnet/livecycle/solutions/bb_content_creation.html">Content Creation (CCR)</a> building blocks which ship as part of the Solution Accelerator SDKs.</p>
<p>See you there!</p>
<p><a href="http://max.adobe.com/?sdid=ERZUY"><img height="130" alt="Adobe MAX 2009" src="http://assets.max.adobe.com/images/MAX09_Grey_140x130.jpg" width="140"></a></p>
<p class="postUpdate"><strong>Aug 24, 2009</strong> &mdash; Added links to the CCR and CGR building blocks.</p>
]]></content:encoded>
			<wfw:commentRss>http://forms.stefcameron.com/2009/07/22/adobe-max-2009/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MAX 2008 Tutorial &#8211; Part 3 &#8211; Form Guide</title>
		<link>http://forms.stefcameron.com/2008/11/19/max-2008-tutorial-part3/</link>
		<comments>http://forms.stefcameron.com/2008/11/19/max-2008-tutorial-part3/#comments</comments>
		<pubDate>Wed, 19 Nov 2008 13:00:53 +0000</pubDate>
		<dc:creator>Stefan Cameron</dc:creator>
				<category><![CDATA[Acrobat]]></category>
		<category><![CDATA[Bugs]]></category>
		<category><![CDATA[Conferences]]></category>
		<category><![CDATA[Debugging]]></category>
		<category><![CDATA[Form Guides]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Tables]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://forms.stefcameron.com/2008/11/19/max-2008-tutorial-part-3-form-guide/</guid>
		<description><![CDATA[Welcome to the third and final part of a three-part post series tutorial on importing data into a form guide and a PDF. The first part covered the form design, the second part covered the Flex code and the third part will cover designing and debugging the form guide that will complete the solution. Form [...]]]></description>
			<content:encoded><![CDATA[<p>Welcome to the third and final part of a three-part post series tutorial on importing data into a form guide and a PDF. The <a href="http://forms.stefcameron.com/2008/11/17/max-2008-tutorial-part1/">first part</a> covered the form design, the <a href="http://forms.stefcameron.com/2008/11/18/max-2008-tutorial-part2/">second part</a> covered the Flex code and the third part will cover designing and debugging the form guide that will complete the solution.</p>
<h2>Form Guide Layout</h2>
<p>The goal is to design a form guide which will provide two panels: one for user options and the other for results.</p>
<p>The first panel will expose the 4 fields inside the GuideObjects subform (which are only meant to be exposed in the form guide &#8212; hence why the GuideObjects subform has the Initialize script to hide it if the host isn&#8217;t &#8220;Flash&#8221;). The user will have the option to choose an actor and/or category for further filtering and will then click on the GetMovies button to execute the request on the <a href="http://forms.stefcameron.com/services/movies/?help=1">Movie Service</a>. When the requested XML is returned to the form guide, the GetMovies result handler will convert the XML into instances of MovieRow inside the Listing table.</p>
<p>The second panel will use a <strong>repeater layout</strong> to expose the Listing table&#8217;s contents within the form guide however this panel will only be accessible if the movie query returned 1 or more results.</p>
<p>Once the results are in, the user will then be able to switch (&#8220;flip&#8221;) to the PDF view which will show the Listing table in the form, from which the user could then print or archive the results.</p>
<p><span id="more-264"></span><br />
<h2>Designing the Form Guide</h2>
<p>Open your tutorial form in Designer and launch GuideBuilder (GB) by choosing the &#8220;Tools &gt; Create or Edit Form Guide&#8221; command. Switch to the &#8220;Customize Appearance&#8221; tab and choose &#8220;Save Styles&#8221;, saving them to a SWC file of your choice (usually in the same folder). It&#8217;s not mandatory to do this but if you don&#8217;t specify a file name here, GB will auto-generate a style SWC (which contains information about any style customizations you might apply) named according to the wrapper you choose (e.g. &#8220;ga.wrappers.CobaltStandard.swc&#8221; for the &#8220;Cobalt Standard&#8221; wrapper &#8212; not the most meaningful name for our solution).</p>
<p>Back to the &#8220;Edit Guide&#8221; tab, set the guide&#8217;s title to &#8220;MAX 2008 Movie Catalog Service&#8221; (double-click on the &#8220;New Guide&#8221; label to set it), the section&#8217;s title to &#8220;Movie Catalog&#8221; and the panel&#8217;s title to &#8220;Options&#8221;. Set the panel&#8217;s layout to &#8220;Two Column&#8221;.</p>
<p><img src="http://forms.stefcameron.com/images/Max2008/Max2008Tutorial-Part3-1.Png"></p>
<h3>Options Panel</h3>
<p>Click on the &#8220;Add or Bind Fields&#8221; button and drag the entire GuideObjects subform into the panel. You&#8217;ll see, in the &#8220;Panel Preview&#8221; pane on the lower-right, that objects in the panel are laid-out in two columns from left to right, top to bottom, according to the top-down order in which they appear in the panel. What we want is for the MatchCount field to show-up <em>below</em> the GetMovies button. To do this, insert a &#8220;Next Area&#8221; object (from the &#8220;Utility Objects&#8221; group at the top of the form tree) after all the objects in the panel and then drag the MatchCount field below it. The &#8220;Next Area&#8221; object causes a break in the layout algorithm, thereby forcing the following object onto the next row in the two-column layout.</p>
<p>To make the panel layout more pleasing, switch back to the &#8220;Set Properties&#8221; view and set the captions of the ActorList, CategoryList and MatchCount fields to be at the top and the width of both listboxes to be &#8220;100%&#8221;. Finally, override the MatchCount field&#8217;s caption (double-click on it) and set it to &#8220;Number of movies matching criteria:&#8221; (accept the warning about the caption binding being removed).</p>
<blockquote><p>One important form guide feature is the ability to display fields in different ways. In other words, if your field is a listbox, for example, you aren&#8217;t limited to displaying it as a traditional listbox. You could choose to display it as a series of checkboxes or radio buttons, for example, or you could create your own custom control using FlexBuilder.</p></blockquote>
<p>GB provides a checkbox control type which will suit our needs perfectly because while our listboxes are single-selection only, using checkboxes will allow the user to remove a previous selection which is important if they previously filtered by actor, for instance, and now they want to remove that filter.</p>
<p>For the ActorList and CategoryList fields, set their &#8220;Display field as a&#8221; property to &#8220;Check Boxes&#8221;.</p>
<p>At this point, the settings for the ActorList (and CategoryList) fields should look like this:</p>
<p><img src="http://forms.stefcameron.com/images/Max2008/Max2008Tutorial-Part3-2.Png"></p>
<p>and your form guide hierarchy should look like this:</p>
<p><img src="http://forms.stefcameron.com/images/Max2008/Max2008Tutorial-Part3-3.Png"></p>
<h3>Movie Listings Panel</h3>
<p>The second panel is a lot simpler since it just shows the Listing table&#8217;s contents and it doesn&#8217;t require as much settings.</p>
<p>Insert a second panel into the &#8220;Movie Catalog&#8221; section, give it a title of &#8220;Movie Listings&#8221; and set its layout to be &#8220;Repeater Grid&#8221;.</p>
<p><img src="http://forms.stefcameron.com/images/Max2008/Max2008Tutorial-Part3-4.Png"></p>
<p>The objects named &#8220;Repeater First Column&#8221; and &#8220;Repeater Second Column&#8221; don&#8217;t apply to this type of repeater panel however they do matter in other repeater layouts and are there for consistency (should you decide to change the repeater panel type). The &#8220;Trailer&#8221; object signifies that all objects placed after it, on this panel, will go <em>below</em> the grid as opposed to being part of the grid (this would be good for footer objects, if we had any).</p>
<p>Drag the MovieRow subform (table row) into the panel <strong>between</strong> the &#8220;Repeater First Column&#8221; and &#8220;Repeater Second Column&#8221; objects (drop the subform directly in between the two objects &#8212; if you miss, just drag each object back to where it&#8217;s supposed to go).</p>
<p>For each field you dragged-in, set its caption as follows: &#8220;Title&#8221;, &#8220;Actor&#8221;, &#8220;Category&#8221; and &#8220;Cost&#8221;. (You should see these changes in real-time in the Panel Preview pane.) Select the Title item and set its width to 150 (which means pixels in the form guide) to ensure the titles are completely visible and then set its &#8220;<strong>Allow field to repeat</strong>&#8221; property to indicate that it, and all associated fields, should be repeated within the grid layout. The items in the panel will then get a yellow outline indicating that they are repeating items.</p>
<p><img src="http://forms.stefcameron.com/images/Max2008/Max2008Tutorial-Part3-5.Png"></p>
<p>Now that we&#8217;ve set this up, I&#8217;ll follow-up on a comment I made in part 1 when we designed the Listing table and set the MovieRow to have 1 initial instance: There&#8217;s a <strong>bug in the Repeater Grid </strong>panel layout where the data entered into the fields in the grid will not be rendered (it&#8217;s there, you just can&#8217;t see it) unless there&#8217;s some data in the grid when the form guide is initialized. To work around the bug, we simply include an initial instance of the MovieRow and then the GetMovies result handler code simply removes the instance prior to populating the table with movie results (whether there are any or not).</p>
<p>The last step in setting-up this panel is to apply a <strong>Display Rule</strong> to indicate when the panel should be visible (accessible to the user) in the form guide. What we want to do is set the panel to be visible only if the MatchCount field&#8217;s value is greater than zero, meaning there&#8217;s at least one movie result from the query. To do this, you simply toggle the &#8220;Specify panel display rules&#8221; pane in the panel&#8217;s properties, choose &#8220;Use Display Rules&#8221;, add a rule, set MatchCount as the field, &#8220;greater than&#8221; as the condition and &#8220;0&#8243; as the value.</p>
<p><img src="http://forms.stefcameron.com/images/Max2008/Max2008Tutorial-Part3-6.Png"></p>
<h2>FormBridge XFO Fix</h2>
<p>Now that the form guide has been designed, there&#8217;s just one more thing we need to do: Apply a small fix to the FormBridge code that brokers the communication between the form guide and the PDF at runtime. The FormBridge code is normally automatically injected into the PDF when it&#8217;s generated by the GB Preview functionality or by LiveCycle when the form is rendered as a form guide with the PDF however we need to use our own &#8220;fixed&#8221; version of the FormBridge code. Otherwise, when we flip to the PDF, <strong>there will be no data in the table.</strong></p>
<p>To do this, save your changes to the form guide and exit GB. Find the &#8220;Custom&#8221; pane in Designer&#8217;s Object Library and drag the &#8220;Form Bridge&#8221; object onto your form <strong>below</strong> the GuideObjects subform (where there are no objects on the page).</p>
<p><img src="http://forms.stefcameron.com/images/Max2008/Max2008Tutorial-Part3-7.Png"></p>
<p>It shows-up as a hairline selection on the page and in the hierarchy looks like this:</p>
<p><img src="http://forms.stefcameron.com/images/Max2008/Max2008Tutorial-Part3-8.Png"></p>
<p>Select the &#8220;ContainerFoundation_JS&#8221; script object and open the Script Editor to edit the script. Find the two instances of &#8220;saveXML()&#8221; (lines 316 and 631) using the Find dialog (Ctrl + F) and change them from</p>
<pre><code>saveXML().replace(/\n/g, "");</code></pre>
<p>to</p>
<pre><code>saveXML();</code></pre>
<p>Do not remove/change any of the code that comes before it on the same line. This fix ensures that the format of the data going across the line is correct.</p>
<p>With the FormBridge object in our form, GB Preview and LiveCycle will not inject their version into the PDF. The only draw-back from this approach is that if the FormBridge code changes, you&#8217;ll have to manually update it in your form as opposed to automatically getting the new version when you preview with GB or render your form with LiveCycle.</p>
<p>This bug should be fixed in a future release and so the workaround in the FormBridge code will eventually no longer be needed.</p>
<h2>Flash Log and Debug Players (Optional)</h2>
<p>You may have noticed some &#8220;trace()&#8221; statements in the code we set on the ActorList, CategoryList and GetMovies objects in part 2. This is a handy way to get a read on what&#8217;s going on (i.e. debugging) inside the form guide at runtime if you aren&#8217;t using FlexBuilder to debug it (which we&#8217;re trying to avoid in this tutorial). It&#8217;s a lot like using &#8220;console.println()&#8221; to output information to Acrobat&#8217;s JavaScript Console.</p>
<p>If you want to see trace statement outputs (it&#8217;s not necessary but it could be handy), you need to look at your flashlog.txt file which is auto-generated by the <strong>debug</strong> version of the Flash Player. These are normally called &#8220;debug players&#8221; or &#8220;content debuggers&#8221; and are <a href="http://www.adobe.com/support/flashplayer/downloads.html">downloadable here</a>. To ensure that you have a debug player, you can hit <a href="http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_19245&amp;sliceId=1">this page</a> which will tell you what version and type of Flash Player your browser is using.</p>
<p>Once you&#8217;ve installed a debug player, you&#8217;ll need to configure your system to enable the flashlog.txt file which will be located here, once enabled: C:\Documents and Settings\<em>user_name</em>\Application Data\Macromedia\Flash Player\Logs\flashlog.txt (XP) or C:\Users\<em>user_name</em>\AppData\Roaming\Macromedia\Flash Player\Logs\flashlog.txt (Vista).</p>
<p>The <a href="http://livedocs.adobe.com/flex/201/html/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Book_Parts&amp;file=logging_125_04.html">debugger configuration page</a> details where to place the mm.cfg file and what to put in it in order to enable output to the flashlog.txt file. For example, if you&#8217;re running XP, you would create a new mm.cfg file in your &#8220;C:\Documents and Settings\<em>user_name</em>\&#8221; folder and you would put the following lines inside to enable error reporting and trace logging (i.e. output to the flashlog.txt file):</p>
<pre><code>TraceOutputFileEnable=1
ErrorReportingEnable=1</code></pre>
<h2>Running the Solution</h2>
<p>Now that the form guide is designed, we&#8217;re ready to run our solution: Launch GB again and this time, choose the Preview tab, select &#8220;Include PDF Preview&#8221; (to ensure that a PDF is included, otherwise you won&#8217;t be able to flip to it to see the results) and click on the Preview button.</p>
<p><img src="http://forms.stefcameron.com/images/Max2008/Max2008Tutorial-Part3-9.Png"></p>
<p>The resulting form guide should look like this (with the pre-loaded actor and category lists):</p>
<p><img src="http://forms.stefcameron.com/images/Max2008/Max2008Tutorial-Part3-10.Png"></p>
<p>When you click on the &#8220;Get Movies&#8221; button, the button will become temporarily disabled and then, assuming your query returned movies, the count should be updated and the &#8220;Movie Listing&#8221; panel should appear in the left toggle bar:</p>
<p><img src="http://forms.stefcameron.com/images/Max2008/Max2008Tutorial-Part3-11.Png"></p>
<p>Now click on the &#8220;Movie Listing&#8221; panel to see the results in the form guide:</p>
<p><img src="http://forms.stefcameron.com/images/Max2008/Max2008Tutorial-Part3-12.Png"></p>
<p>Finally, click on the &#8220;Show PDF&#8221; icon in the toolbar at the top-right to see the results (i.e. imported Movie Service data) in the PDF:</p>
<p><img src="http://forms.stefcameron.com/images/Max2008/Max2008Tutorial-Part3-13.Png"></p>
<p>Cool? I think so! And the cherry on top is that this even works with the free Reader! Users don&#8217;t need Acrobat in order for the data to go back and forth between the form guide and the PDF.</p>
<h2>Solution to Part 3</h2>
<p>Try not to peek at this before you attempt to build the form guide on your own… </p>
<p><a href="http://forms.stefcameron.com/samples/max2008/Max2008-MovieCatalog-Part3.zip">Download Part 3 [zip]</a></p>
<p><strong>Minimum Requirements:</strong> Designer 8.2.1 SP1, GuideBuilder 8.2.1 SP1, Reader 9.0.</p>
<p><strong>Note:</strong> If you decide to deploy this sample to LiveCycle (e.g. using FormsIVS), you&#8217;ll also need to deploy the styles SWC you created earlier. The form guide will not render without it.</p>
]]></content:encoded>
			<wfw:commentRss>http://forms.stefcameron.com/2008/11/19/max-2008-tutorial-part3/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>MAX 2008 Tutorial &#8211; Part 2 &#8211; Flex Code</title>
		<link>http://forms.stefcameron.com/2008/11/18/max-2008-tutorial-part2/</link>
		<comments>http://forms.stefcameron.com/2008/11/18/max-2008-tutorial-part2/#comments</comments>
		<pubDate>Tue, 18 Nov 2008 13:00:14 +0000</pubDate>
		<dc:creator>Stefan Cameron</dc:creator>
				<category><![CDATA[Conferences]]></category>
		<category><![CDATA[Designer]]></category>
		<category><![CDATA[Form Guides]]></category>
		<category><![CDATA[Instance Manager]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Tables]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[XFA]]></category>

		<guid isPermaLink="false">http://forms.stefcameron.com/2008/11/18/max-2008-tutorial-part-2-flex-code/</guid>
		<description><![CDATA[Welcome to the second in a three-part post series on importing data into a form guide (and, by extension, a PDF form). In the first part, we designed the XFA form that will provide us with the print/archive view of the movies retrieved from the Movie Service. The second part will focus on the special [...]]]></description>
			<content:encoded><![CDATA[<p>Welcome to the second in a three-part post series on importing data into a form guide (and, by extension, a PDF form). In the <a href="http://forms.stefcameron.com/2008/11/17/max-2008-tutorial-part1/">first part</a>, we designed the XFA form that will provide us with the print/archive view of the movies retrieved from the <a href="http://forms.stefcameron.com/services/movies/?help=1">Movie Service</a>. The second part will focus on the special Flex code we will need to include in the form which will ultimately be executed by Flash when it runs in the form guide which we&#8217;ll design in part 3.</p>
<h2>Flex Code in XFA Forms</h2>
<p>The key to today&#8217;s tutorial is understanding when and where the script you write in an XFA form (JavaScript or FormCalc) is compiled or interpreted.</p>
<p><span id="more-246"></span>
<p>For starters, form guides don&#8217;t support the FormCalc language so that just isn&#8217;t an option.</p>
<p>JavaScript, on the other hand, has the nice property of looking a lot like ActionScript. In fact, the two languages have enough similarities that with very little modification, any JavaScript you write in an XFA form can be converted into ActionScript which runs in a Flex form guide (in the Flash Player).</p>
<p>Normally, when you write JavaScript code in your forms and you run the form in Acrobat, the script isn&#8217;t compiled when the XFA form is converted into the PDF file format and it&#8217;s only interpreted when the interpreter attempts to execute it (i.e. if there&#8217;s a syntax error somewhere in your script and you never run that code, you&#8217;ll never know about the error). When you generate a form guide based on your form, however, your JavaScript is actually <strong>compiled by</strong> the <strong>Flex </strong>compiler that generates the SWC (Flash Library) which defines your form guide.</p>
<blockquote><p><span style="font-weight:bold;color:red">Warning: </span>Script object code seems to be loaded and interpreted by Acrobat in one shot, instead of on a per-access basis as in form object event scripts, and any syntax errors anywhere in the script object will cause all of the script in the script object to basically be ignored. If you have functions defined in a script object and you know you&#8217;re calling a function properly but you keep getting a &#8220;function is not defined&#8221; error, use the Script Editor&#8217;s Syntax Checker tool &#8212; you&#8217;ll probably find a syntax error somewhere. After you fix it, you should be able to access your script object functions.</p>
<p> It also appears that Acrobat/Reader 9.0 may now be attempting to parse (but not execute) <em>all</em> scripts on form load which may produce syntax errors in the JavaScript Console due to the differences between JavaScript and ActionScript syntax however in my experience so far, I haven&#8217;t hit a situation where my JavaScript stops executing because of this. Nonetheless, if you&#8217;re seeing strange behaviour, it might be a good idea to check the console to make sure things are running smoothly.</p></blockquote>
<p>What you might not have realized is that if you know that a particular portion of script will only be executed within the context of a form guide, you can actually <strong>write Flex code in your XFA form! </strong>When you generate the form guide (either by previewing using GuideBuilder or by rendering the form as a form guide via <a href="http://www.adobe.com/products/livecycle/forms/">LiveCycle Forms</a>), your Flex code will be compiled as any other Flex code would be and it&#8217;ll be executed in the same way.</p>
<p>That opens-up a world of possibilities and the one we&#8217;re going to explore in this tutorial is the use of the <a href="http://livedocs.adobe.com/flex/3/langref/mx/rpc/http/mxml/HTTPService.html">mx.rpc.http.HTTPService</a> class to fetch data from the Movie Service and insert the results into the Listing table within the form guide, thereby causing the data to be inserted into the Listing table within the PDF form when the user switches from the form guide to the PDF.</p>
<h2>XFA Host Name = Flash</h2>
<p>You might recall, in yesterday&#8217;s tutorial, that I talked about the <strong>xfa.host.name</strong> property returning &#8220;Flash&#8221; when your XFA code is executing within the context of a form guide (it returns &#8220;Acrobat&#8221; when its executed within the PDF because the form&#8217;s &#8220;host&#8221; is &#8220;Acrobat&#8221;).</p>
<p>This is the indicator we&#8217;ll use to &#8220;protect&#8221; the Flex code we&#8217;re going to write to make sure that it&#8217;s not executed within the PDF:</p>
<pre><code>if (xfa.host.name == "Flash")
{
    // do some cool stuff in Flex/ActionScript
}</code></pre>
<blockquote><p>Note that the <strong>XFA model in a form guide</strong> works just the same as it does within the PDF with the exception that the form guide environment only supports a <a href="http://help.adobe.com/en_US/livecycle/8.2/fgscriptsupport.pdf">subset of XFA functionality</a> (less than in the PDF but more than in HTML).</p></blockquote>
<h2>Our Own HTTPService</h2>
<p>Since there will 3 requests made to the Movie Service, one for the actor list, one for the category list and another for the movie listings resulting from the chosen actor and/or category (if any), the first step to take is to create some reusable code within our form that makes use of the HTTPService object.</p>
<p>Open the form you designed yesterday and add a new script object by right-clicking on the root subform (&#8220;movieList&#8221;) and choosing the &#8220;Insert Script Object&#8221; command.</p>
<p>Name your script object &#8220;FlexHttpService&#8221; and paste the code from <a href="http://forms.stefcameron.com/samples/max2008/Max2008-FlexHttpService.txt">this text file</a> into the script object.</p>
<p>You&#8217;ll notice that there are some statements in this script that aren&#8217;t regular JavaScript (namely the &#8220;import&#8221; statements to get access to the HTTPService and its result and fault event classes as well as the typing of variables like &#8220;service:HTTPService&#8221;). That&#8217;s because it&#8217;s ActionScript!</p>
<p>I&#8217;m assuming you know enough about Flex to be able to understand what&#8217;s going on but the gist of it is that the script object&#8217;s send() function takes a URL (to the Movie Service) and two functions, the first called when the request is successful and the second called if the request fails. If the request is successful, the result handler function is called with an XML variable as its parameter. This XML variable contains the movie listing we want to insert into the Listing table.</p>
<p>The FlexHttpService.send() function will be the reusable piece of code that we&#8217;ll use in the two listboxes and the button, each providing its own URL and result handlers.</p>
<blockquote><p>It&#8217;s important to note that the actual result and fault handlers given to the HTTPService object instance are <strong>inline functions</strong>. This is essential since the call to HTTPService.send() is <strong>asynchronous</strong>. When the result comes back (later), context will be lost and the service won&#8217;t be able to find a function you defined in the FlexHttpService script object. Therefore, the handlers must be inline.</p></blockquote>
<h2>ActorList Initialize Script</h2>
<p>With the FlexHttpService defined, it&#8217;s easier to write the rest of the code to fetch the <a href="http://forms.stefcameron.com/services/movies/?movie=0&amp;actor=0">list of actors</a>.</p>
<p>We want the list of actors to be retrieved when the form guide initializes so we&#8217;ll put this script in the Initialize event of the ActorList field. In the result handler, we&#8217;ll simply iterate through the items in the XML object returned and, for each actor, add his/her name and ID as an item into the ActorList field in the form guide.</p>
<p>Note that accessing the ActorList field in the form guide <strong>within the result handler</strong>, which is out-of-context at this point, is done by using the full SOM expression to the field, starting with <strong>xfa.form</strong> (accessing the Form DOM), followed by the root subform name (&#8220;movieList&#8221;), followed by the path to the ActorList field.</p>
<p>Edit the ActorList field&#8217;s Initialize event and paste the code from <a href="http://forms.stefcameron.com/samples/max2008/Max2008-ActorListInit.txt">this text file</a> into it.</p>
<p>Basically, we first clear any existing list items and call the Movie Service with the appropriate URL. In the result handler, we add items into the ActorList and then enable the list so that the user can make a selection (we don&#8217;t want the list accessible until the items have been loaded).</p>
<h2>CategoryList Initialize Script</h2>
<p>The CategoryList field is much the same as the ActorList field however it&#8217;ll fetch the <a href="http://forms.stefcameron.com/services/movies/?movie=0&amp;category=0">list of categories</a>.</p>
<p>Edit the CategoryList field&#8217;s Initialize event and paste the code from <a href="http://forms.stefcameron.com/samples/max2008/Max2008-CategoryListInit.txt">this text file</a> into it.</p>
<h2>GetMovies Click Script</h2>
<p>Finally, we just need to set the Click event script on the GetMovies button that will fetch the movies requested by the user (optionally filtering on actor and/or category).</p>
<p>This script is essentially the same as the first two however it&#8217;s a little more complex since the Listing table must be retrieved and then new instances of the MovieRow must be <a href="http://forms.stefcameron.com/2006/11/11/instance-manager-object-reference/">added</a> and their fields (Title, Actor, Category and Cost) populated with data from each movie returned from the service. Additionally, the button is disabled once its clicked and only re-enabled when the result or fault handler is called to prevent the user from clicking multiple times while a request is pending (since HTTPService.send() is asynchronous) and the MatchCount field is populated with the number of rows added to the Listing table (this will be important when we design the form guide in part 3).</p>
<p>Edit the GetMovies button&#8217;s Click event and paste the code from <a href="http://forms.stefcameron.com/samples/max2008/Max2008-GetMoviesClick.txt">this text file</a> into it.</p>
<h2>Solution to Part 2</h2>
<p>Try not to peek at this before you attempt to build the form on your own&#8230;</p>
<p><a href="http://forms.stefcameron.com/samples/max2008/Max2008-MovieCatalog-Part2.zip">Download Part 2 [zip]</a></p>
<p><strong>Minimum Requirements:</strong> The form should work back to Designer 8.0 however it was designed with Designer 8.2.1 SP1.</p>
<p class="postUpdate"><strong>Updated:</strong> November 22, 2008</p>
]]></content:encoded>
			<wfw:commentRss>http://forms.stefcameron.com/2008/11/18/max-2008-tutorial-part2/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>MAX 2008 Tutorial &#8211; Part 1 &#8211; Designing the Form</title>
		<link>http://forms.stefcameron.com/2008/11/17/max-2008-tutorial-part1/</link>
		<comments>http://forms.stefcameron.com/2008/11/17/max-2008-tutorial-part1/#comments</comments>
		<pubDate>Mon, 17 Nov 2008 13:00:05 +0000</pubDate>
		<dc:creator>Stefan Cameron</dc:creator>
				<category><![CDATA[Conferences]]></category>
		<category><![CDATA[Data Binding]]></category>
		<category><![CDATA[Designer]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Tables]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[XFA]]></category>

		<guid isPermaLink="false">http://forms.stefcameron.com/2008/11/17/max-2008-tutorial-part-1-designing-the-form/</guid>
		<description><![CDATA[This is the first part in a multi-part post series for Adobe MAX 2008 designed to show you how extend a form guide to import data from a website without using FlexBuilder. If you haven&#8217;t seen it already, I recommend you have a look at the demo on last Friday&#8217;s tutorial preview post to get [...]]]></description>
			<content:encoded><![CDATA[<p>This is the first part in a multi-part post series for <a href="http://max.adobe.com/">Adobe MAX 2008</a> designed to show you how extend a form guide to import data from a website <strong>without using FlexBuilder</strong>. If you haven&#8217;t seen it already, I recommend you have a look at the demo on last Friday&#8217;s <a href="http://forms.stefcameron.com/08/11/14/max-2008-tutorial-preview/">tutorial preview</a> post to get a sense of what we&#8217;re going to be building. In this first part, we will build the form necessary to provide the print/archive capabilities for the Movie Catalog.</p>
<p>Throughout the tutorial, I will assume that you&#8217;ve used Designer already and you know about things like flowed vs positioned subforms. I will also assume that you&#8217;re familiar with Guide Builder&#8217;s interface for designing Form Guides.</p>
<h2>Software Requirements</h2>
<p>Before we get started, make sure you&#8217;re using Designer 8.2.1 SP1 and Guide Builder 8.2.1 SP1. You can download an evaluation version of Designer and Guide Builder when you download the <a href="http://www.adobe.com/products/acrobatpro/tryout.html">Acrobat 9.0 Pro trial</a>. If you haven&#8217;t installed SP1 yet, you can download it from <a href="http://www.adobe.com/support/products/enterprise/200810kcs_livecyclees_8.html">here</a> (note that you only need to install the Designer SP1 update &#8212; you don&#8217;t need Workbench or even LiveCycle ES to run through this tutorial).</p>
<p>If you already have Designer but you don&#8217;t have Acrobat, you can use <a href="http://www.adobe.com/products/acrobat/readstep2.html">Reader 9.0</a> to go through the tutorial.</p>
<p><span id="more-238"></span><br />
<h2>Schema Data Connection</h2>
<p>The first step is to connect the form to a schema which we can <a href="http://forms.stefcameron.com/services/movies/?schema=movie">obtain</a> from the <a href="http://forms.stefcameron.com/services/movies/?help=1">Movie Service</a>:</p>
<pre><code>&lt;movieList&gt;
&nbsp;&nbsp;&nbsp; &lt;movie&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;movieId/&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;title/&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;cost/&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;actorName/&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;catName/&gt;
&nbsp;&nbsp;&nbsp; &lt;/movie&gt;
&nbsp;&nbsp;&nbsp; &lt;movie&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;movieId/&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;title/&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;cost/&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;actorName/&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;catName/&gt;
&nbsp;&nbsp;&nbsp; &lt;/movie&gt;
&lt;/movieList&gt;</code></pre>
<p>Save this structure to an XML file named &#8220;movieCatalog-schema.xml&#8221; somewhere where you can reference it later from your form in Designer. (It&#8217;s important that you save it as-is with the duplicated &lt;movie&gt; element since this will indicate to the Data Connection Wizard that the &lt;movie&gt; element is repeatable.)</p>
<p>Create a new blank form in Designer and then create a new data connection using the Data Connection Wizard available from the Data View palette&#8217;s menu button. On the first page, set the name to &#8220;MovieCatalogDC&#8221; and choose &#8220;Sample XML File&#8221;:</p>
<p><img src="http://forms.stefcameron.com/images/Max2008/Max2008Tutorial-Part1-1.Png"> </p>
<p>On the next page, choose the &#8220;movieCatalog-schema.xml&#8221; file you saved earlier and click &#8220;Finish&#8221;. You should now have a schema data connection in your form (note that Designer inferred the possible structure of the schema based on the sample XML file we provided for the data connection):</p>
<p><img src="http://forms.stefcameron.com/images/Max2008/Max2008Tutorial-Part1-2.Png"> </p>
<p>This data connection will help us set the correct bindings later.</p>
<h2>Page Header</h2>
<p>Next we&#8217;ll create a simple header for the form by adding a text object to the Master Page. Switch to the Master Pages tab and drag a text object onto it. Place it at the top-left and set the text to &#8220;MAX 2008 Movie Catalog&#8221;.</p>
<p>To make sure that what we&#8217;ll put on the body pages (in the Design View) doesn&#8217;t show-up over-top our header, make sure that the content area starts below the header text object:</p>
<p><img src="http://forms.stefcameron.com/images/Max2008/Max2008Tutorial-Part1-3.Png"> </p>
<h2>Movie Listing Table</h2>
<p>Back on the Design View, we now need to create a table which we&#8217;ll use to display the listings from the catalog. This is where that schema data connection will come-in handy as we&#8217;ll see a little later.</p>
<p>Our table will display 4 columns: title, actor name, category name and cost. Drag a table object onto the top-left corner of the page and give it 1 header row, 1 body row and 4 columns:</p>
<p><img src="http://forms.stefcameron.com/images/Max2008/Max2008Tutorial-Part1-4.Png"> </p>
<p>We want the table to take-up the entire width of the page but we also want the first column, title, to be wider than the other 3 since the title is usually longer than names or a dollar amount. Start by making the last 3 columns a little wider by dragging the column separator between the 2nd and 3rd and 3rd and 4th columns to the right, leaving some room to make the first column wider. Then drag the column separator between the 1st and 2nd column to the right until it won&#8217;t move anymore, which indicates that it&#8217;s the widest the first column can be made while keeping the table constrained to the page&#8217;s width.</p>
<p>Now double-click in each header cell and rename them to &#8220;Title&#8221;, &#8220;Actor&#8221;, &#8220;Category&#8221; and &#8220;Cost&#8221; from left to right.</p>
<p><img src="http://forms.stefcameron.com/images/Max2008/Max2008Tutorial-Part1-5.Png"> </p>
<p>(Here I&#8217;ve also set a linear-to-bottom background gradient color on the header row.)</p>
<p>Next, we need to set some fields into the table row where the movie data will go since they&#8217;re only text objects by default. The first 3 columns need to be text fields and the last one should be a numeric field since it&#8217;ll contain a dollar amount.</p>
<p>Using the Hierarchy palette, select the &#8220;Cell1&#8243;, &#8220;Cell2&#8243; and &#8220;Cell3&#8243; objects in the &#8220;Row1&#8243; table row and change their object type (using the Object palette) to &#8220;Text Field&#8221;. While they&#8217;re still selected, set their Value Type to &#8220;Read Only&#8221;.</p>
<p>Now select the last cell in &#8220;Row1&#8243;, &#8220;Cell4&#8243;, and change its object type to &#8220;Numeric Field&#8221;. While it&#8217;s still selected, set its Value Type to &#8220;Read Only&#8221;, its Data Format to &#8220;Float&#8221; and click on the &#8220;Patterns&#8230;&#8221; button on the Object palette&#8217;s Field tab. In there, set the Display pattern to &#8220;numeric.currency{}&#8221; and set the Data pattern to &#8220;numeric.decimal{}&#8221;:</p>
<p><img src="http://forms.stefcameron.com/images/Max2008/Max2008Tutorial-Part1-6.Png"> </p>
<p><img src="http://forms.stefcameron.com/images/Max2008/Max2008Tutorial-Part1-7.Png"> </p>
<p>This will let the field accept a decimal number as its data and will cause it to be displayed with a currency symbol (e.g. &#8220;25.50&#8243; is displayed as &#8220;$25.50&#8243;).</p>
<p>Finally, rename &#8220;Table1&#8243; to &#8220;Listing&#8221; and &#8220;Row1&#8243; to &#8220;MovieRow&#8221;. Inside &#8220;MovieRow&#8221;, rename &#8220;Cell1&#8243; to &#8220;Title&#8221;, &#8220;Cell2&#8243; to &#8220;Actor&#8221;, &#8220;Cell3&#8243; to &#8220;Category&#8221; and &#8220;Cell4&#8243; to &#8220;Cost&#8221;.</p>
<p><img src="http://forms.stefcameron.com/images/Max2008/Max2008Tutorial-Part1-8.Png"> </p>
<h2>Schema Data Bindings</h2>
<p>The next thing on the list is setting the data bindings into the schema data connection we created earlier. This will ensure that when data is merged into the form, after being retrieved from the Movie Service, that instances of the MovieRow table row are created accordingly and the Title, Actor, Category and Cost fields they contain populated with the right data for a particular movie.</p>
<p>Select the MovieRow table row object and set its binding by choosing &#8220;MovieCatalogDC &gt; movie&#8221; from the binding popup button next to the Default Binding property. This will set the binding to &#8220;$.movie[*]&#8220;:</p>
<p><img src="http://forms.stefcameron.com/images/Max2008/Max2008Tutorial-Part1-9.Png"> </p>
<p>(The button next to the field that contains &#8220;$.movie[*]&#8221; is the binding popup button.)</p>
<p>This binding, with the &#8220;[*]&#8221; syntax, indicates that the MovieRow object will bind to all occurrences of the &lt;movie&gt; data group nodes in the data that gets merged into the form.</p>
<p>Finally, make the MovieRow repeatable with no min, no max but <strong>1 initial instance</strong>:</p>
<p><img src="http://forms.stefcameron.com/images/Max2008/Max2008Tutorial-Part1-10.Png"> </p>
<p>The initial instance is essential in getting around a bug with the Form Guide Repeater Data Grid panel layout which we&#8217;ll be using in part 3 of this tutorial.</p>
<p>The last bindings we need to set are on the Title, Actor, Category and Cost fields that make-up the MovieRow. Set them as follows:</p>
<ul>
<li>Title: &#8220;$.title&#8221;
<li>Actor: &#8220;$.actorName&#8221;
<li>Category: &#8220;$.catName&#8221;
<li>Cost: &#8220;$.cost&#8221;</li>
</ul>
<p>You can set these bindings manually or you can use the binding popup button to select the appropriate node from the MovieCatalogDC data connection. If you use the binding popup button, you&#8217;ll likely get the Binding Properties dialog, in which case you should choose to <strong>not</strong> to update any related properties as follows:</p>
<p><img src="http://forms.stefcameron.com/images/Max2008/Max2008Tutorial-Part1-11.Png"> </p>
<p>Under certain circumstances, the schema may contain more information about a particular element which could be automatically applied to the field such as name, caption and default value. Since we&#8217;ve already setup the fields ourselves (and since our sample XML schema didn&#8217;t have much information to start with), we don&#8217;t need this functionality.</p>
<h2>Form Guide Only Objects</h2>
<p>The final step in the form design is to include 4 objects which we&#8217;ll use only in the form guide that we&#8217;ll create in part 3 of this tutorial. We&#8217;ll need a listbox to hold the actor names, one to hold the category names, we&#8217;ll need a numeric field to hold the movie count and we&#8217;ll need a button that the user will click to fetch the movies that match the actor and/or category they will have selected in the lists (if any).</p>
<p>This is simpler to setup than it sounds. All we need to do is drag a new subform into the page (below the Listing table) and place two listboxes, one numeric field and one button inside. Rename the subform to &#8220;GuideObjects&#8221;.</p>
<p>Rename one listbox to &#8220;ActorList&#8221; and the other to &#8220;CategoryList&#8221;. Rename the numeric field to &#8220;MatchCount&#8221; and the button to &#8220;GetMovies&#8221;.</p>
<p>Set the ActorList field&#8217;s caption to &#8220;Choose an Actor (optional):&#8221; and the CategoryList field&#8217;s caption to &#8220;Choose a Category (optional):&#8221;. Set both field&#8217;s Value Type to &#8220;Read Only&#8221; since we don&#8217;t want the user to be able to interact with the listboxes until actor and category data are loaded into them (in the Form Guide, which we&#8217;ll see later in part 3).</p>
<p>Set the MatchCount field&#8217;s caption to &#8220;Number of matches:&#8221; and set its Value Type to &#8220;Read Only&#8221; as well since we&#8217;ll just be reporting the total number of movies that matched the criteria (actor and/or category or neither) and we won&#8217;t want the user to edit the result.</p>
<p>The bindings on both listboxes and the numeric field will be &#8220;None&#8221; by default which is fine. There&#8217;s no node in the schema to bind them to and we don&#8217;t need to bind them anyway.</p>
<p>Set the GetMovies button&#8217;s caption to &#8220;Get Movies&#8221;.</p>
<p>Finally, to make sure all the guide-only objects are hidden in the form, set the Initialize script of the GuideObjects subform to hide itself if the context isn&#8217;t the Form Guide. You can determine what the context is by checking the value of the <strong>xfa.host.name</strong> property. If it&#8217;s &#8220;Flash&#8221;, then you know the script is executing within the context of the Form Guide, not Acrobat. This will be very important in part 2 when we write the ActionScript code necessary to fetch the data from the Movie Service:</p>
<pre><code>if (xfa.host.name != "Flash")
    this.presence = "hidden";</code></pre>
<p>This is what the form should look like now:</p>
<p><img src="http://forms.stefcameron.com/images/Max2008/Max2008Tutorial-Part1-12.Png"> </p>
<p>(Note that the exact placement of the objects within the GuideObjects subform doesn&#8217;t matter since they&#8217;ll be positioned correctly in the Form Guide and won&#8217;t be displayed on the form itself.)</p>
<h2>Getting Rid of the Page Subform</h2>
<p>To ensure that our Listing table is free to expand and roll-out onto additional pages if there are a lot of movies returned in the listing, we need to move the Listing table and the GuideObjects subform out of the page subform and into the root subform (&#8220;movieList&#8221; at the top of the Hierarchy tree). We could just make the unnamed page subform flowed but that would introduce an extra level of subform hierarchy that just isn&#8217;t needed.</p>
<p>This can be done simply by right-clicking on the unnamed page subform &#8220;(untitled Subform) (page 1)&#8221; object in the Hierarchy palette and choosing the &#8220;Unwrap Subform&#8221; command. The hierarchy should now look like this:</p>
<p><img src="http://forms.stefcameron.com/images/Max2008/Max2008Tutorial-Part1-13.Png"> </p>
<h2>Testing the Form</h2>
<p>Before we go on to part 2 we should make sure that what we&#8217;ve done so far works correctly. To test our form, we simply need to merge-in some movie data from the Movie Service to make sure that it gets displayed properly in the Listing table.</p>
<p>You can get the full movie catalog listing simply by hitting this URL:</p>
<p><a href="http://forms.stefcameron.com/services/movies/">http://forms.stefcameron.com/services/movies/</a></p>
<p>Save what you get into an XML file named &#8220;movieCatalog-sample.xml&#8221; and set it as the Preview Data File for the form using the Form Properties dialog.</p>
<p><img src="http://forms.stefcameron.com/images/Max2008/Max2008Tutorial-Part1-14.Png"> </p>
<p>Now preview the form using the &#8220;Preview PDF&#8221; tab. You should get something that looks like this:</p>
<p><img src="http://forms.stefcameron.com/images/Max2008/Max2008Tutorial-Part1-15.Png"> </p>
<p>After you&#8217;ve determined that the table is functioning correctly (which means that the bindings are working as expected), you should <strong>remove the Preview Data File setting</strong> since it&#8217;ll interfere with the Form Guide&#8217;s function later on. (A Preview Data File <em>can</em> be used to initialize data in a form guide however, in this case, we don&#8217;t want all the movie data to be there already; we want to query the Movie Service for it in real-time based on any actor and/or category settings the user may have specified.)</p>
<h2>Solution to Part 1</h2>
<p>Try not to peek at this before you attempt to build the form on your own&#8230;</p>
<p><a href="http://forms.stefcameron.com/samples/max2008/Max2008-MovieCatalog-Part1.zip">Download Part 1 [zip]</a></p>
<p><strong>Minimum Requirements:</strong> The form should work back to Designer 8.0 however it was designed with Designer 8.2.1 SP1.</p>
]]></content:encoded>
			<wfw:commentRss>http://forms.stefcameron.com/2008/11/17/max-2008-tutorial-part1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MAX 2008 Tutorial &#8211; Preview</title>
		<link>http://forms.stefcameron.com/2008/11/14/max-2008-tutorial-preview/</link>
		<comments>http://forms.stefcameron.com/2008/11/14/max-2008-tutorial-preview/#comments</comments>
		<pubDate>Fri, 14 Nov 2008 17:44:56 +0000</pubDate>
		<dc:creator>Stefan Cameron</dc:creator>
				<category><![CDATA[Acrobat]]></category>
		<category><![CDATA[Conferences]]></category>
		<category><![CDATA[Designer]]></category>
		<category><![CDATA[Form Guides]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://forms.stefcameron.com/?p=275</guid>
		<description><![CDATA[As I mentioned earlier, I&#8217;m working on a tutorial in the spirit of the Adobe MAX 2008 conference which I&#8217;ll make available next week. There will be 3 posts, one for each day of the conference. This tutorial will show you how to (1) design a form with a table that has a repeating row, [...]]]></description>
			<content:encoded><![CDATA[<p>As I mentioned <a href="http://forms.stefcameron.com/2008/11/11/if-i-were-going-to-max-2008/">earlier</a>, I&#8217;m working on a tutorial in the spirit of the <a href="http://max.adobe.com/">Adobe MAX 2008</a> conference which I&#8217;ll make available next week. There will be 3 posts, one for each day of the conference.</p>
<p>This tutorial will show you how to (1) design a form with a table that has a repeating row, (2) add some Flex code to it that will enable the use of the <a href="http://livedocs.adobe.com/flex/3/langref/mx/rpc/http/mxml/HTTPService.html">mx.rpc.http.HTTPService</a> class for retrieving data from my <a href="http://forms.stefcameron.com/services/movies/?help=1">Movie Service</a> and (3) design a form guide that will capture the data from the service and transfer it into the PDF which could then be used to print or archive the movie listings.</p>
<p>In an effort to wet your appetite, I thought I would get the ball rolling by showing a little <a target="_blank" href="http://my.adobe.acrobat.com/max-2008-tutorial-preview/">preview of the final solution</a>.</p>
<p>Be sure to come back every day, Monday to Wednesday next week (November 17-19, 2008), to get the full tutorial.</p>
]]></content:encoded>
			<wfw:commentRss>http://forms.stefcameron.com/2008/11/14/max-2008-tutorial-preview/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>If I were going to MAX 2008</title>
		<link>http://forms.stefcameron.com/2008/11/11/if-i-were-going-to-max-2008/</link>
		<comments>http://forms.stefcameron.com/2008/11/11/if-i-were-going-to-max-2008/#comments</comments>
		<pubDate>Tue, 11 Nov 2008 18:01:46 +0000</pubDate>
		<dc:creator>Stefan Cameron</dc:creator>
				<category><![CDATA[Conferences]]></category>

		<guid isPermaLink="false">http://forms.stefcameron.com/2008/11/11/if-i-were-going-to-max-2008/</guid>
		<description><![CDATA[There&#8217;s less than a week to go and I don&#8217;t have a ticket to MAX 2008 yet. It&#8217;s unfortunate since I was hoping to catch-up with a few colleagues, meet some of my readers and get a chance to present a couple of things: For one, the work we&#8217;ve been doing on Adobe&#8217;s new Correspondence [...]]]></description>
			<content:encoded><![CDATA[<p>There&#8217;s less than a week to go and I don&#8217;t have a ticket to <a href="http://max.adobe.com/">MAX 2008</a> yet. It&#8217;s unfortunate since I was hoping to catch-up with a few colleagues, meet some of my readers and get a chance to present a couple of things: For one, the work we&#8217;ve been doing on Adobe&#8217;s new <a href="http://www.adobe.com/products/livecycle/solutionaccelerators/correspondence.html">Correspondence Management</a> <a href="http://www.adobe.com/products/livecycle/solutionaccelerators/">Solution Accelerator</a> showcases some pretty cool PDF/Flex interaction. Thankfully, you can at least see a demo by attending the <a href="http://max.adobe.com/na/sessions/browser/#672">LiveCycle ES and Adobe Solution Accelerators</a> session while you&#8217;re there. I also would&#8217;ve liked to demonstrate a different way to <strong>import data into a dynamic PDF form using Flex</strong> via a Form Guide <strong>without using FlexBuilder</strong> (assuming you know your Flex syntax and the <a href="http://livedocs.adobe.com/flex/3/langref/mx/rpc/http/mxml/HTTPService.html">mx.rpc.http.HTTPService</a> class).</p>
<p>But why hold back? Christmas will soon be here and in the spirit of giving, I figured I would still do my part remotely and write a <strong>series of posts over the course of the conference</strong> next week that will show you how to do the data import via Flex. I hope you&#8217;ll find it useful.</p>
<p>Stay tuned&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://forms.stefcameron.com/2008/11/11/if-i-were-going-to-max-2008/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Attending BFMA Symposium 2007</title>
		<link>http://forms.stefcameron.com/2007/05/05/attending-bfma-symposium-2007/</link>
		<comments>http://forms.stefcameron.com/2007/05/05/attending-bfma-symposium-2007/#comments</comments>
		<pubDate>Sat, 05 May 2007 17:20:53 +0000</pubDate>
		<dc:creator>Stefan Cameron</dc:creator>
				<category><![CDATA[BFMA Symposium]]></category>
		<category><![CDATA[Conferences]]></category>

		<guid isPermaLink="false">http://forms.stefcameron.com/2007/05/05/attending-bfma-symposium-2007/</guid>
		<description><![CDATA[Just a quick note to let all of you know I&#8217;ll be attending BFMA Symposium 2007 in St. Louis, Missouri, over the course of the next few days. I&#8217;m looking forward to meeting many of our customers to get some feedback on Designer 8.0 and answer some questions in person for a change. I&#8217;ll also [...]]]></description>
			<content:encoded><![CDATA[<p>Just a quick note to let all of you know I&#8217;ll be attending <a href="http://www.bfma.org/training/symp07/index.php">BFMA Symposium 2007</a> in St. Louis, Missouri, over the course of the next few days. I&#8217;m looking forward to meeting many of our customers to get some feedback on <a href="http://forms.stefcameron.com/2006/11/23/little-things-matter/">Designer 8.0</a> and answer some questions in person for a change. </p>
<p>I&#8217;ll also be giving a demo of all the <a href="http://www.adobe.com/devnet/livecycle/articles/whats_new_designer8.html">new and exciting features available in Designer 8.0</a> along with a sneak peak at what&#8217;s in store for the next release during <strong>Adobe&#8217;s &#8220;Product Tutorial&#8221; session</strong> (#09 at 9:45am on Monday, May 7, for those of you attending) led by Alain Roy, one of our Product Managers. Please join us if you can!</p>
<p>If you&#8217;re attending, you&#8217;ll also want to make sure you check-out <strong>Adobe&#8217;s &#8220;E-Forms Come of Age&#8221; session</strong> (#40 at 3:00pm on Tuesday, May 8 ) where Alain will demonstrate a new feature we&#8217;ve been working-on that will <strong>completely change</strong> the way your users/customers interact with your forms &#8212; you won&#8217;t want to miss this! <br/>
                                          </p>
]]></content:encoded>
			<wfw:commentRss>http://forms.stefcameron.com/2007/05/05/attending-bfma-symposium-2007/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Designer Training at MAX</title>
		<link>http://forms.stefcameron.com/2006/09/20/designer-training-at-max/</link>
		<comments>http://forms.stefcameron.com/2006/09/20/designer-training-at-max/#comments</comments>
		<pubDate>Wed, 20 Sep 2006 16:30:45 +0000</pubDate>
		<dc:creator>Stefan Cameron</dc:creator>
				<category><![CDATA[Conferences]]></category>
		<category><![CDATA[MAX 2006]]></category>

		<guid isPermaLink="false">http://forms.stefcameron.com/blog/?p=43</guid>
		<description><![CDATA[Mike Potter will be giving a training session on LiveCycle Designer at Adobe MAX 2006 next month. As he prepares for his session, I&#8217;d like to give you an opportunity to influence what he&#8217;ll talk about so that his session is as valuable to you as possible: Are there specific features you&#8217;d like to see [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://blogs.adobe.com/mikepotter">Mike Potter</a> will be giving a <a href="http://www.adobe.com/events/max/sessions/lt101h.html">training session</a> on LiveCycle Designer at <a href="http://www.adobe.com/events/max">Adobe <span class="caps">MAX</span> 2006</a> next month.</p>
<p>As he prepares for his session, I&#8217;d like to give you an opportunity to influence what he&#8217;ll talk about so that his session is as valuable to you as possible:</p>
<ul>
<li>Are there specific features you&#8217;d like to see a demo for? Dynamic Subforms? Conditional Breaks? Data-Nominated Subforms? Data Binding?</li>
<li>Should he talk about form design methods like why and when to use repeating (dynamic) subforms, how to validate your form prior to submission, etc.?</li>
<li>Anything else?</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://forms.stefcameron.com/2006/09/20/designer-training-at-max/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
