<?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>Assure HSC &#124; Blog &#187; LiveCycle</title>
	<atom:link href="http://assurehsc.ie/blog/index.php/category/livecycle/feed" rel="self" type="application/rss+xml" />
	<link>http://assurehsc.ie/blog</link>
	<description>Technology and Safety</description>
	<lastBuildDate>Tue, 23 Nov 2010 20:34:31 +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>Referencing Objects</title>
		<link>http://assurehsc.ie/blog/index.php/2010/08/referencing-objects/</link>
		<comments>http://assurehsc.ie/blog/index.php/2010/08/referencing-objects/#comments</comments>
		<pubDate>Sun, 01 Aug 2010 12:11:48 +0000</pubDate>
		<dc:creator>Niall O'Donovan</dc:creator>
				<category><![CDATA[LiveCycle]]></category>
		<category><![CDATA[Samples]]></category>
		<category><![CDATA[LC Designer]]></category>
		<category><![CDATA[linkedin]]></category>
		<category><![CDATA[XFA Form]]></category>

		<guid isPermaLink="false">http://assurehsc.ie/blog/?p=317</guid>
		<description><![CDATA[When referencing objects in LiveCycle Designer ES2, you need to ensure that you are providing a sufficiently complete reference to the objects. If you do &#8211; the script will work; whereas if you don&#8217;t &#8211; the script may fail silently. A sample form is available here. Tip 1: name objects as you go! First off [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fassurehsc.ie%2Fblog%2Findex.php%2F2010%2F08%2Freferencing-objects%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fassurehsc.ie%2Fblog%2Findex.php%2F2010%2F08%2Freferencing-objects%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>When referencing objects in LiveCycle Designer ES2, you need to ensure that you are providing a sufficiently complete reference to the objects. If you do &#8211; the script will work; whereas if you don&#8217;t &#8211; the script may fail silently.</p>
<p><span id="more-317"></span></p>
<p><a title="Click here to open the sample in a new window..." href="http://assurehsc.ie/blog/wp-content/uploads/2010/08/2010-08-01-Referencing-Objects-A.pdf" target="_blank"><strong>A sample form is available here</strong></a>.</p>
<p><strong><span style="color: #003300;"><span style="text-decoration: underline;">Tip 1:</span> name objects as you go!</span></strong></p>
<p>First off you should name objects as you develop your form. This applies to pages, subforms and other objects like textFields and numericFields. When objects are named it makes it so much easier to reference them in script.  For example if we take an object (&#8220;myTextField&#8221;) which is inside a subform (&#8220;mySubform&#8221;), then referencing this object from outside the subform is straightforward:</p>
<blockquote><p><em>this.rawValue = mySubform.myTextField.rawValue;</em></p></blockquote>
<p>On the other hand if the subform is not named, it has to be resolved in the script first:</p>
<blockquote><p><em>this.rawValue = xfa.resolveNode(&#8220;#subform[1].myTextField&#8221;).rawValue;</em></p></blockquote>
<p>Both of the above scripts will work; however the second takes additional resources (xfa.resolveNode) and makes the script logic difficult to follow.</p>
<p><strong><span style="color: #003300;"><span style="text-decoration: underline;">Tip 2:</span> use Control+Click to insert references</span></strong></p>
<p>LC Designer ES2 has a very handy tool, where you can insert the right amount of the object&#8217;s reference that is needed in the script. When you are in the script editor, hover your mouse over the object that you want to reference in your script. When you press and hold the Control key, you will notice that the mouse changes to a &#8216;V&#8217;. Now when you click the object, LC Designer ES2 will insert the correct reference into the script.</p>
<p>This feature is extremely useful and you should get into the habit of using it. Two big benefits:</p>
<ul>
<li>Your object references will be correct.</li>
<li>You will be quicker scripting events.</li>
</ul>
<p><span style="text-decoration: underline;"><span style="color: #003300;"><strong>A demonstration</strong></span></span></p>
<p>The <a title="Click here to open the sample..." href="http://assurehsc.ie/blog/wp-content/uploads/2010/08/2010-08-01-Referencing-Objects.pdf" target="_blank"><strong>sample</strong></a> provides examples of how different objects are referenced, depending on the relative path in-between the objects.</p>
<p>On each pages there are three &#8216;lights&#8217; that are controlled by their respective on/off button. In addition each page has a toggle state button, that controls each of the on/off buttons.</p>
<p>The main difference between the four pages is the manner in which objects are wrapped in subforms.</p>
<p>Notice that on page 4, the subforms have the same name, which allows the forms developer to use a loop script.</p>
<p>The form is available <strong><a title="Click here to open the form..." href="http://assurehsc.ie/blog/wp-content/uploads/2010/08/2010-08-01-Referencing-Objects-A.pdf" target="_blank">here</a></strong>.</p>
]]></content:encoded>
			<wfw:commentRss>http://assurehsc.ie/blog/index.php/2010/08/referencing-objects/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adobe Enterprise Café</title>
		<link>http://assurehsc.ie/blog/index.php/2010/06/adobe-enterprise-cafe/</link>
		<comments>http://assurehsc.ie/blog/index.php/2010/06/adobe-enterprise-cafe/#comments</comments>
		<pubDate>Tue, 15 Jun 2010 21:31:34 +0000</pubDate>
		<dc:creator>Niall O'Donovan</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[LiveCycle]]></category>
		<category><![CDATA[LC Designer]]></category>

		<guid isPermaLink="false">http://assurehsc.ie/blog/?p=207</guid>
		<description><![CDATA[Adobe have launched the next generation community resource! This is a significant improvement on LiveCycle Café, as to now integrates LiveCycle with other Adobe resources. Including: Acrobat Connect Pro ColdFusion Flash Platform The Café gives access to community and developer resources from RSS feeds to community forums. The application also includes samples and code snippets [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fassurehsc.ie%2Fblog%2Findex.php%2F2010%2F06%2Fadobe-enterprise-cafe%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fassurehsc.ie%2Fblog%2Findex.php%2F2010%2F06%2Fadobe-enterprise-cafe%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Adobe have launched the next generation community resource! <span id="more-207"></span></p>
<p>This is a significant improvement on LiveCycle Café, as to now integrates LiveCycle with other Adobe resources. Including:</p>
<ul>
<li>Acrobat</li>
<li>Connect Pro</li>
<li>ColdFusion</li>
<li>Flash Platform</li>
</ul>
<p>The Café gives access to community and developer resources from RSS feeds to community forums. The application also includes samples and code snippets in Tour de LiveCycle and Tour de Flex.</p>
<p><a href="http://assurehsc.ie/blog/wp-content/uploads/2010/06/Enterprise-Cafe2.png"><img class="alignleft size-full wp-image-217" title="Adobe Enterprise Café" src="http://assurehsc.ie/blog/wp-content/uploads/2010/06/Enterprise-Cafe2.png" alt="This is a screenshot.." width="586" height="437" /></a></p>
<p>Download it today!</p>
<p>The AIR application can be downloaded by clicking the Install below:<br />
<iframe width="224" height="200" frameborder=0 scrolling="no" src="http://cafe.host.adobe.com/download/"></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://assurehsc.ie/blog/index.php/2010/06/adobe-enterprise-cafe/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Laying out a form</title>
		<link>http://assurehsc.ie/blog/index.php/2010/06/laying-out-a-form/</link>
		<comments>http://assurehsc.ie/blog/index.php/2010/06/laying-out-a-form/#comments</comments>
		<pubDate>Sat, 12 Jun 2010 17:29:02 +0000</pubDate>
		<dc:creator>Niall O'Donovan</dc:creator>
				<category><![CDATA[LiveCycle]]></category>
		<category><![CDATA[Samples]]></category>
		<category><![CDATA[LC Designer]]></category>
		<category><![CDATA[linkedin]]></category>
		<category><![CDATA[XFA Form]]></category>

		<guid isPermaLink="false">http://assurehsc.ie/blog/?p=170</guid>
		<description><![CDATA[As a forms developer, there are many options available to you when laying out your form. This post is not intended as a detailed explanation of forms design, merely a technical description of the specific options in LiveCycle Designer ES2 when using objects. To keep users happy, you should consider the layout of your form. [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fassurehsc.ie%2Fblog%2Findex.php%2F2010%2F06%2Flaying-out-a-form%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fassurehsc.ie%2Fblog%2Findex.php%2F2010%2F06%2Flaying-out-a-form%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>As a forms developer, there are many options available to you when laying out your form. This post is not intended as a detailed explanation of forms design, merely a technical description of the specific options in LiveCycle Designer ES2 when using objects. <span id="more-170"></span></p>
<p>To keep users happy, you should consider the layout of your form. It is easy to pull objects into the form; however the manner in which you layout these objects and set the captions can affect the quality of the information that the user sends back to you.</p>
<p>Here is a <a title="Click here to open the sample..." href="http://assurehsc.ie/blog/wp-content/uploads/2010/11/2010-06-13-Some-options-for-laying-out-text-objects.pdf" target="_blank"><strong>sample form</strong></a>.</p>
<p>You can view the form in Acrobat/Reader. If you want to examine the script you will need to open the sample in LiveCycle Designer.</p>
<p>This sample demonstrate several options that are available to you. When you view the sample in Acrobat, the various options will appear to be quite similar. However the implementation in LiveCycle Designer is different for each one. The sample is a collection of objects, each one attempting to gather information about the user.</p>
<p>The usability of your form can be affected by a number of factors, including:</p>
<ul>
<li>font type and size.</li>
<li>font weight and colour.</li>
<li>paragraph alignment for the caption and value.</li>
<li>spacing of objects and relative alignment.</li>
</ul>
<p>Designing a form with a clear and crisp layout, will help the user complete the form.</p>
<p>Most objects in LiveCycle Designer come with a caption by default. The best solution is to use this caption, as it simplifies the layout process and form will render quicker.</p>
<p>When it comes to designing the form, we would recommend <em>Forms that Work &#8211; Designing web forms for usability</em>, by Caroline Jarrett and Gerry Gaffney. This is an excellent book that balances the technical aspects of LC Designer. You can get further information <a title="Click here for info..." href="http://formsthatwork.com/" target="_blank"><strong>here</strong></a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://assurehsc.ie/blog/index.php/2010/06/laying-out-a-form/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Picture puzzle</title>
		<link>http://assurehsc.ie/blog/index.php/2010/06/picture-puzzle/</link>
		<comments>http://assurehsc.ie/blog/index.php/2010/06/picture-puzzle/#comments</comments>
		<pubDate>Wed, 02 Jun 2010 00:15:59 +0000</pubDate>
		<dc:creator>Niall O'Donovan</dc:creator>
				<category><![CDATA[LiveCycle]]></category>
		<category><![CDATA[Samples]]></category>
		<category><![CDATA[LC Designer]]></category>
		<category><![CDATA[XFA Form]]></category>

		<guid isPermaLink="false">http://assurehsc.ie/blog/?p=112</guid>
		<description><![CDATA[This form demonstrates a few tricks albeit in a irreverent way. Firstly using an &#8216;Adobe&#8217; grey as a background allows your form to be part of the application, rather than sitting on top it. The second uses script to allow the use to select a part of the puzzle and move it into the correct [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fassurehsc.ie%2Fblog%2Findex.php%2F2010%2F06%2Fpicture-puzzle%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fassurehsc.ie%2Fblog%2Findex.php%2F2010%2F06%2Fpicture-puzzle%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>This form demonstrates a few tricks albeit in a irreverent way. Firstly using an &#8216;Adobe&#8217; grey as a background allows your form to be part of the application, rather than sitting on top it. The second uses script to allow the use to select a part of the puzzle and move it into the correct position. <span id="more-112"></span></p>
<p>This won&#8217;t be winning any prizes in the games market, however it is not intended to be a serious puzzle. It just demonstrates some of the dynamic features of LiveCycle Designer ES2.</p>
<p>When you open the form, the puzzle elements are spread across the page. The challenge is to get the pieces into the correct position, in order to see the hidden screen.</p>
<p><a href="http://assurehsc.ie/blog/wp-content/uploads/2010/06/puzzle1.png"><img class="alignnone size-large wp-image-115" title="Start of the puzzle" src="http://assurehsc.ie/blog/wp-content/uploads/2010/06/puzzle1-1024x730.png" alt="start of the puzzle" width="614" height="438" /></a></p>
<p>Because Adobe changed the application grey from 103,103,103 in Acrobat 8 to 51,51,51 in Acrobat 9 (RGB), we need a script in the initialise event in order to affect the colour of the rectangle on the master page:</p>
<p><em>if (app.viewerVersion &gt;= 9)</em></p>
<p><em>{</em></p>
<p><em>background.value.rectangle.fill.color.value = &#8220;51,51,51&#8243;;</em></p>
<p><em>}</em></p>
<p><em>else</em></p>
<p><em>{</em></p>
<p><em>background.value.rectangle.fill.color.value = &#8220;103,103,103&#8243;;</em></p>
<p><em>}</em></p>
<p><em>this.access = &#8220;readOnly&#8221;;</em></p>
<p>The pieces are regular buttons with an image behind the button. The script that allows the user to move the pieces on clicking is a bit involved, but in essence monitors the x,y coordinates of the mouse on the click event.</p>
<p>Here is the final image you are striving for:</p>
<p><a rel="attachment wp-att-119" href="http://assurehsc.ie/blog/index.php/2010/06/picture-puzzle/puzzle3/"><img class="alignnone size-full wp-image-119" title="Completed puzzle" src="http://assurehsc.ie/blog/wp-content/uploads/2010/06/Puzzle3.png" alt="completed puzzle" width="617" height="440" /></a></p>
<p>You can access the puzzle (sample form) <a title="Click here to open the puzzle..." href="http://assurehsc.ie/blog/wp-content/uploads/2010/06/2009-08-12-Jigsaw-puzzle.pdf" target="_blank">here</a>.</p>
<p>In case you don&#8217;t make it to the end of the puzzle, here is the video of Hook Head lighthouse.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="500" height="405" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/s-1OJb03SPI&amp;hl=en_US&amp;fs=1&amp;rel=0&amp;color1=0x234900&amp;color2=0x4e9e00&amp;border=1" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="500" height="405" src="http://www.youtube.com/v/s-1OJb03SPI&amp;hl=en_US&amp;fs=1&amp;rel=0&amp;color1=0x234900&amp;color2=0x4e9e00&amp;border=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>Have fun!</p>
]]></content:encoded>
			<wfw:commentRss>http://assurehsc.ie/blog/index.php/2010/06/picture-puzzle/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Keeping track of scores</title>
		<link>http://assurehsc.ie/blog/index.php/2010/05/keeping-track-of-scores/</link>
		<comments>http://assurehsc.ie/blog/index.php/2010/05/keeping-track-of-scores/#comments</comments>
		<pubDate>Mon, 31 May 2010 19:21:38 +0000</pubDate>
		<dc:creator>Niall O'Donovan</dc:creator>
				<category><![CDATA[LiveCycle]]></category>
		<category><![CDATA[Samples]]></category>
		<category><![CDATA[LC Designer]]></category>
		<category><![CDATA[linkedin]]></category>
		<category><![CDATA[XFA Form]]></category>

		<guid isPermaLink="false">http://assurehsc.ie/blog/?p=99</guid>
		<description><![CDATA[Forms can de used to ask users questions. Sometimes the question is a simple yes or no. Other times you may have questions with more than two choices or with complicated scoring requirements. This sample will show you two options for keeping scores. The first sample considers a series of yes/no questions. Each question is [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fassurehsc.ie%2Fblog%2Findex.php%2F2010%2F05%2Fkeeping-track-of-scores%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fassurehsc.ie%2Fblog%2Findex.php%2F2010%2F05%2Fkeeping-track-of-scores%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Forms can de used to ask users questions. Sometimes the question is a simple yes or no. Other times you may have questions with more than two choices or with complicated scoring requirements. This sample will show you two options for keeping scores. <span id="more-99"></span></p>
<p>The first sample considers a series of yes/no questions. Each question is bound to a radio group where yes scores 1 and no scores 0 (zero). This is relatively easy to keep track of, because a simple sum function or addition of the rawValues will keep the overall score.</p>
<p>On the other hand, once you introduce more than two options, with differing marking schemes things can become a little heated.</p>
<p>The main thing is to plan out the approach first, as this can affect how you are going to name objects. For example in the second sample we have used a loop to look at each of the questions in turn. Using loops help keep your script lean and maintainable. But to get the most out a loop, it is easier if the objects have the same name. The loop then just looks at each instance of the specified objects.</p>
<p>Have a look at the sample which is available here:</p>
<p>The sample for is available <a title="Click here to open the sample form in Acrobat/Reader..." href="http://assurehsc.ie/blog/wp-content/uploads/2010/06/2010-06-02-Scoring-three-options.pdf" target="_blank">here</a>.</p>
<p>The main scripts are shown within the page layout. If you open the form in LC Designer you can dive right into the scripts. Please feel free to make changes and to adapt these examples to suit your requirements.</p>
<p>Good luck!</p>
]]></content:encoded>
			<wfw:commentRss>http://assurehsc.ie/blog/index.php/2010/05/keeping-track-of-scores/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Repeating non-null table data</title>
		<link>http://assurehsc.ie/blog/index.php/2010/05/repeating-non-null-table-data/</link>
		<comments>http://assurehsc.ie/blog/index.php/2010/05/repeating-non-null-table-data/#comments</comments>
		<pubDate>Sun, 30 May 2010 11:46:12 +0000</pubDate>
		<dc:creator>Niall O'Donovan</dc:creator>
				<category><![CDATA[Samples]]></category>
		<category><![CDATA[LC Designer]]></category>

		<guid isPermaLink="false">http://assurehsc.ie/blog/?p=70</guid>
		<description><![CDATA[There may be situations where you only want the user to print a table with rows that contain data. This is particularly useful where a user is presented with a table containing many rows. Once the user has selected the rows that are applicable, the print buttons allow the user to print only the information [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fassurehsc.ie%2Fblog%2Findex.php%2F2010%2F05%2Frepeating-non-null-table-data%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fassurehsc.ie%2Fblog%2Findex.php%2F2010%2F05%2Frepeating-non-null-table-data%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>There may be situations where you only want the user to print a table with rows that contain data. This is particularly useful where a user is presented with a table containing many rows. Once the user has selected the rows that are applicable, the print buttons allow the user to print only the information that is relevant. <span id="more-70"></span></p>
<p>Here is a sample, which examines two options:</p>
<ol>
<li>Hide the rows that are not selected before printing and then restore after printing.</li>
<li>Hide the page containing the table and show a hidden page, which contains a dynamic table that is populated with the rows that the user has already selected. After printing the original page is restored.</li>
</ol>
<p>The form contains two print buttons with script in the click and postPrint events. When you have decided on a method, you could mode the portion of the script dealing with presence, to the prePrint event, so that the same behaviour will occur when the user selects print from the menu.</p>
<p>The click event of the print button hiding the null rows includes this loop:</p>
<p><em>for (var i=0; i&lt;=13; i++)</em></p>
<p><em>{</em></p>
<p style="padding-left: 30px;"><em>var oRow = xfa.resolveNode(&#8220;Table1.Row1[" + i + "]&#8220;);</em></p>
<p style="padding-left: 30px;"><em>if (oRow.supply.rawValue == &#8220;0&#8243;)</em></p>
<p style="padding-left: 30px;"><em>{</em></p>
<p style="padding-left: 60px;"><em>oRow.presence = &#8220;hidden&#8221;;</em></p>
<p style="padding-left: 30px;"><em>}</em></p>
<p><em>}</em></p>
<p>We have also included a performance indicator, from <a title="John Brinkman's blog" href="http://blogs.adobe.com/formfeed/" target="_blank">John Brinkman&#8217;s blog</a>. This indicates that the first option is more efficient, generally completing the hide script within 6 milliseconds. The second option&#8217;s performance decreases as more rows need to be duplicated on the second table. For example duplicating 14 rows took on average 35 milliseconds.</p>
<p>Overall, the first option is the cleanest, more robust and more efficient.</p>
<p>You can download the sample <a title="Click here to open the form in Acrobat/Reader" href="http://assurehsc.ie/blog/wp-content/uploads/2010/05/2010-05-28-Duplicate-table-data-if-not-null1.pdf" target="_blank">here</a>.</p>
<p>The sample can be opened in Acrobat/Reader. If you want to examine the script you will need to open the sample in LiveCycle Designer ES2.</p>
]]></content:encoded>
			<wfw:commentRss>http://assurehsc.ie/blog/index.php/2010/05/repeating-non-null-table-data/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>How often events fire and their sequence</title>
		<link>http://assurehsc.ie/blog/index.php/2010/05/how-often-events-fire-and-their-sequence/</link>
		<comments>http://assurehsc.ie/blog/index.php/2010/05/how-often-events-fire-and-their-sequence/#comments</comments>
		<pubDate>Sun, 30 May 2010 00:21:21 +0000</pubDate>
		<dc:creator>Niall O'Donovan</dc:creator>
				<category><![CDATA[Cookbooks]]></category>
		<category><![CDATA[LC Designer]]></category>
		<category><![CDATA[linkedin]]></category>

		<guid isPermaLink="false">http://assurehsc.ie/blog/?p=47</guid>
		<description><![CDATA[This is a good study of LC Designer events. It highlights the sequence of events and how often some events fire. ]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fassurehsc.ie%2Fblog%2Findex.php%2F2010%2F05%2Fhow-often-events-fire-and-their-sequence%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fassurehsc.ie%2Fblog%2Findex.php%2F2010%2F05%2Fhow-often-events-fire-and-their-sequence%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Some events fire more often than others. Depending on what the designer is trying to achieve, this can be inefficient and may not have the desired effect at runtime. Another issue is the sequence in which events fire. A designer may have a requirement for several scripts to fire in a certain sequence. Having an understanding of how LC Designer and Acrobat fire events can help at design time.<span id="more-47"></span></p>
<p>I original had the idea of having a form that set out the pros and cons of each event and giving examples of script that could be used in each event. In the end, it has focused on the number of times that different events fire and the sequence. To view this form you will need Acrobat/Reader version 9 or above. This is because it contains script against the preOpen and postOpen events. Also it used setItems to populate the listbox.</p>
<p>The attached form has a lead-in page to introduce the different types of events and how to use the form.</p>
<p>The second page contains the &#8220;test area&#8221;, which is where you can decide which objects you are going to look at, via the dropdown list. There are textfields, numericfields, buttons, subforms, dropdown lists, etc. Some of the objects are standalone, while others are bound together. For example a textfield will have the following in the calculate event:</p>
<pre><em>this.rawValue = textField2.rawValue;</em></pre>
<p>Below the test area are counters for the three types of events (Process; Interactive; and Application). These show how often each event fires.</p>
<p>You can show and hide the different types of events, for example if you want to focus on a particular group.</p>
<p>Even though there are other objects in the form, only those in the test area are counted, as events fire.</p>
<p>All of the objects in the test area have scripts in each event. Generally these script are triggering the counters; however a couple are also binding objects together. This is useful in demonstrating the firing of calculate and validate events for objects that are bound.</p>
<p>There is a log showing the sequence in which the events have fired. When you go into the test area the log with automatically hide. Clicking the show button will make it visible again. Note that clicking the hide button will also clear the log.</p>
<p>There were quite a few challenges in developing this:</p>
<ul>
<li>The calculate; validate; and layout:ready events were bound by the counters. So it took several attempts to separate out the calculate and validate events from the counters, so that they did not run away with themselves.  In the end we broadcast the counter value out and the objects are not linked;</li>
<li>Getting the log to record the events as they fired and have the most recent events visible at the bottom of the log. We used the new setItems script to populate the listbox with a global variable.</li>
</ul>
<p>The form has some &#8220;interesting&#8221; script, but not much that has purpose in a real world form.</p>
<p>It is more of a point of interest to look at the interaction of events and how often some events like layout:ready fire.</p>
<p>The sample form is available <a title="Click here to open the form in Acrobat/Reader..." href="http://assurehsc.ie/blog/wp-content/uploads/2010/05/2009-11-17-LiveCycle-Designer-Script-Events.pdf" target="_blank">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://assurehsc.ie/blog/index.php/2010/05/how-often-events-fire-and-their-sequence/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Moving objects around a form</title>
		<link>http://assurehsc.ie/blog/index.php/2010/05/moving-objects-around-a-form/</link>
		<comments>http://assurehsc.ie/blog/index.php/2010/05/moving-objects-around-a-form/#comments</comments>
		<pubDate>Sun, 30 May 2010 00:10:59 +0000</pubDate>
		<dc:creator>Niall O'Donovan</dc:creator>
				<category><![CDATA[Cookbooks]]></category>
		<category><![CDATA[LC Designer]]></category>

		<guid isPermaLink="false">http://assurehsc.ie/blog/?p=41</guid>
		<description><![CDATA[This sample just shows some of the potential in accessing the current mouse position. ]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fassurehsc.ie%2Fblog%2Findex.php%2F2010%2F05%2Fmoving-objects-around-a-form%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fassurehsc.ie%2Fblog%2Findex.php%2F2010%2F05%2Fmoving-objects-around-a-form%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Allowing a user to move objects (in this case buttons) around the form. We wanted the user to be able position markers within a grid. The number (caption) of the button related to a particular solution in a table.<span id="more-41"></span></p>
<p>This solution is based on the &#8220;fly swatter&#8221; example by Thom Parker (http://www.pdfscripting.com) and samples by John Brinkman (http://blogs.adobe.com/formfeed/) looking at x, y, w and h properties.</p>
<p>The attached form contains three examples where buttons can be moved within set constraints.</p>
<ul>
<li>The first example has three sliders for setting red, green, blue values for an image.</li>
<li>The second example uses a single slider to change the size of an image.</li>
<li>The third has a series of markers which can be placed within a grid.</li>
</ul>
<p>The basic approach is to set the x,y coordinates of the object based on the current mouse position.</p>
<p>You will notice that all three examples are in subforms which are located at 0,0 on the page. This is necessary so that the coordinates of the mouse will match the coordinates of the objects in the subform. If the subform was positioned down and to the right, then the script would need an offset constant.</p>
<p>The main script is in the exit event of the buttons. The first step is to establish the dimensions and position of the rectangle in which you will allow the buttons to move.</p>
<pre><em>var gridX = xfa.layout.x(gridPICK);
var gridY = xfa.layout.y(gridPICK);
var gridW = xfa.layout.w(gridPICK);
var gridH = xfa.layout.h(gridPICK);</em></pre>
<p>The next step is to get the dimensions of the button/marker:</p>
<pre><em>var markerDim = xfa.layout.w(marker1) / 2;</em></pre>
<p>We can then set variables for the x,y coordinates of the mouse position and for the new coordinates of the object.</p>
<pre><em>var mouseX = event.target.mouseX;
var newX = (mouseX + "points").toString();
var mouseY = 595.276 - event.target.mouseY;
var newY = (mouseY + "points").toString();</em></pre>
<p>The only step left is to determine of the x,y coordinates are within the rectangle or outside the rectangle. If the mouse is outside the rectangle then the coordinates are set to the rectangle boundaries.</p>
<pre><em>if (mouseX &lt;= gridX + markerDim)
{
   this.x = (gridX + markerDim + "points").toString();
}
else if (mouseX &gt;= gridX + gridW - markerDim)
{
   this.x = (gridX + gridW - markerDim + "points").toString();
}
else
{
   this.x = newX;
}</em></pre>
<p>The first two examples only move the buttons along the x-axis. Whereas the third example moves objects horizontally and vertically.</p>
<p>Because the script is in the exit event of the buttons, then movement is not in real time and requires the user to click twice. Once to activate the button and the second to position the button in a new position.</p>
<p>Not as smooth as other Flash/Flex solutions, but as best as I could achieve in LiveCycle Designer.</p>
<p>Suggested improvements are welcomed.</p>
<p>Sample form is available <a title="Click here to open the form in Acrobat/Reader..." href="http://assurehsc.ie/blog/wp-content/uploads/2010/05/2009-11-15-Moving-objects.pdf" target="_blank">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://assurehsc.ie/blog/index.php/2010/05/moving-objects-around-a-form/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using LiveCycle forms in Acrobat and Reader</title>
		<link>http://assurehsc.ie/blog/index.php/2010/05/using-livecycle-forms-in-acrobat-and-reader/</link>
		<comments>http://assurehsc.ie/blog/index.php/2010/05/using-livecycle-forms-in-acrobat-and-reader/#comments</comments>
		<pubDate>Sat, 29 May 2010 22:21:07 +0000</pubDate>
		<dc:creator>Niall O'Donovan</dc:creator>
				<category><![CDATA[Cookbooks]]></category>
		<category><![CDATA[LC Designer]]></category>
		<category><![CDATA[Reader Extensions]]></category>

		<guid isPermaLink="false">http://assurehsc.ie/blog/?p=29</guid>
		<description><![CDATA[After you develop a form in LiveCycle, the users can have very different experiences with the form depending on the software they are using and if / how the form has been Reader Enabled. The various options that are available or disabled can be confusing. This PDF sets out the four options that a developer should consider before you deploy the form. In essence you are looking at the user and the likelihood that they only have Reader and not the full Acrobat. If this is the case then they may not be able to use all of the features that you built into the form. ]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fassurehsc.ie%2Fblog%2Findex.php%2F2010%2F05%2Fusing-livecycle-forms-in-acrobat-and-reader%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fassurehsc.ie%2Fblog%2Findex.php%2F2010%2F05%2Fusing-livecycle-forms-in-acrobat-and-reader%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Sometimes a person will develop a form and test it on their PC with Acrobat. When they are happy with the look, feel and functionality they will send it out to users. If the users have Reader then some of the functionality may not be available, leading to frustration.<span id="more-29"></span></p>
<p>LiveCycle Designer ES has a handy feature where the developer can set the target version of Acrobat/Reader and then check the warnings tab to verify that the form will work in that target version. However this does not take into account whether the form will be Reader Enabled.</p>
<p>The attached PDF does not present new information, merely gathers information on enabled features and restrictions together in one location. The information focuses on users who have the free Adobe Reader.</p>
<p>As I see it there are four possible options when deploying a form. The first considers when the users have Acrobat and the other three deal with Reader:</p>
<ul>
<li>All of the users will have Acrobat, so that the form does not need to be Reader Enabled. In this case there are no restrictions and the users will have full functionality;</li>
</ul>
<ul>
<li>Where users have Reader and the form has not been Reader Enabled. This is the most restricted;</li>
</ul>
<ul>
<li>When the form is Reader Enabled in Acrobat, users with Reader can save the form but they are still some features that are restricted. Note that certain licence restrictions apply;</li>
</ul>
<ul>
<li>The last option considers the form being Reader Enabled using LiveCycle Reader Extensions ES (or ES2). The degree of functionality will depend on the options selected by the developer during the process.</li>
</ul>
<p>The sample outlines what users will be able to do and what restrictions apply depending on how the form is deployed.</p>
<p>This example does not contain any script, its just a reference document. It was created using InDesign and exported to PDF. Buttons were added to provide the rollover examples.</p>
<p>The summary is available <a title="Click here to open the summary in Acrobat/Reader..." href="http://assurehsc.ie/blog/wp-content/uploads/2010/05/2009-10-14-LiveCycle-Forms-in-Acrobat-and-Reader.pdf" target="_blank">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://assurehsc.ie/blog/index.php/2010/05/using-livecycle-forms-in-acrobat-and-reader/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Script to access Acrobat menu items</title>
		<link>http://assurehsc.ie/blog/index.php/2010/05/script-to-access-acrobat-menu-items/</link>
		<comments>http://assurehsc.ie/blog/index.php/2010/05/script-to-access-acrobat-menu-items/#comments</comments>
		<pubDate>Sat, 29 May 2010 22:08:51 +0000</pubDate>
		<dc:creator>Niall O'Donovan</dc:creator>
				<category><![CDATA[Cookbooks]]></category>
		<category><![CDATA[AcroForm]]></category>
		<category><![CDATA[LC Designer]]></category>
		<category><![CDATA[XFA]]></category>

		<guid isPermaLink="false">http://assurehsc.ie/blog/?p=18</guid>
		<description><![CDATA[I had been trying to access Acrobat menu commands from within an XFA form. Some of these are readably available, however the problem remained however as the command I wanted to access was restricted for security reasons. There are a wide range of scripts that can be used to access menu items in Acrobat. However some [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fassurehsc.ie%2Fblog%2Findex.php%2F2010%2F05%2Fscript-to-access-acrobat-menu-items%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fassurehsc.ie%2Fblog%2Findex.php%2F2010%2F05%2Fscript-to-access-acrobat-menu-items%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>I had been trying to access Acrobat menu commands from within an XFA form. Some of these are readably available, however the problem remained however as the command I wanted to access was restricted for security reasons.<span id="more-18"></span></p>
<p>There are a wide range of scripts that can be used to access menu items in Acrobat. However some of these are blocked for security reasons. There are a range of menu items that are still accessible; however the syntax is not always clear.  This PDF (XFA form) provides the script for the Acrobat menu items that are currently permitted. It also has XFA equivalents and Acrobat JavaScript equivalents, where these are available. The form is set up so that you can access the scripts by clicking the buttons. The scripts appear in a dialogue and can be copied directly into LiveCycle Designer.</p>
<p>Still, armed with the list of commands I prepared a form in which to test each of the commands and create a library of commands that worked.</p>
<p>I have loosely grouped the scripts by function. You can preview the script by clicking the button. This allows you easy access to the script without having to open the form in LC Designer:</p>
<div id="attachment_19" class="wp-caption alignnone" style="width: 310px"><a href="http://assurehsc.ie/blog/wp-content/uploads/2010/05/AcrobatScreenSnapz005.png"><img class="size-medium wp-image-19" title="AcrobatScreenSnapz005" src="http://assurehsc.ie/blog/wp-content/uploads/2010/05/AcrobatScreenSnapz005-300x231.png" alt="acrobatmenuitems" width="300" height="231" /></a><p class="wp-caption-text">Accessing Acrobat menu items</p></div>
<p>The user can copy the script direct from the dialogue window.</p>
<p>Where there is an XFA equivalent, I have provided this as an option:</p>
<div id="attachment_20" class="wp-caption alignnone" style="width: 310px"><a href="http://assurehsc.ie/blog/wp-content/uploads/2010/05/AcrobatScreenSnapz006.png"><img class="size-medium wp-image-20" title="AcrobatScreenSnapz006" src="http://assurehsc.ie/blog/wp-content/uploads/2010/05/AcrobatScreenSnapz006-300x297.png" alt="XFA equivalent script" width="300" height="297" /></a><p class="wp-caption-text">Alternative scripts are available</p></div>
<p>Lastly, where a function can be accessed via a menu item and via Acrobat JavaScript I have included this as well:</p>
<div id="attachment_21" class="wp-caption alignnone" style="width: 310px"><a href="http://assurehsc.ie/blog/wp-content/uploads/2010/05/AcrobatScreenSnapz007.png"><img class="size-medium wp-image-21" title="AcrobatScreenSnapz007" src="http://assurehsc.ie/blog/wp-content/uploads/2010/05/AcrobatScreenSnapz007-300x297.png" alt="Acroform equivalent" width="300" height="297" /></a><p class="wp-caption-text">Acroform commands</p></div>
<p>At this stage I am reasonable happy that the list of scripts accessing menu items is complete (currently not restricted). In relation to XFA equivalents and Acrobat JavaScript equivalents, there may be some that I have missed.</p>
<p>This mini-project started out with the aim of having a list of Acrobat menu items that could be accessed in LC Designer. Clearly there is a wide range of other Acrobat functionality that is not associated with a menu that can be accessed via JavaScript. These are not cataloged here.</p>
<p>Here I am providing an updated version of the form. This version has not being signed, so functions like attaching a file now work.</p>
<p>The sample form is available <a title="Click here to open the form..." href="http://assurehsc.ie/blog/wp-content/uploads/2010/05/2009-11-25-PDF-Menu-Items.pdf" target="_blank">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://assurehsc.ie/blog/index.php/2010/05/script-to-access-acrobat-menu-items/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
