<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Scripting Table Columns</title>
	<atom:link href="http://forms.stefcameron.com/2006/10/28/scripting-table-columns/feed/" rel="self" type="application/rss+xml" />
	<link>http://forms.stefcameron.com/2006/10/28/scripting-table-columns/</link>
	<description>Building intelligent forms using Adobe LiveCycle Designer</description>
	<lastBuildDate>Fri, 12 Mar 2010 02:03:05 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Stefan Cameron</title>
		<link>http://forms.stefcameron.com/2006/10/28/scripting-table-columns/comment-page-2/#comment-66679</link>
		<dc:creator>Stefan Cameron</dc:creator>
		<pubDate>Fri, 26 Feb 2010 03:43:03 +0000</pubDate>
		<guid isPermaLink="false">http://forms.stefcameron.com/blog/?p=50#comment-66679</guid>
		<description>Jennifer,

It sounds like you&#039;re trying to call a property (presence) on Subform2 when Subform2 doesn&#039;t exist yet.

If you&#039;re following my advice from my previous reply, then Subform2 is set to be repeatable and has a min occurrence of 0 which means it doesn&#039;t exist by default.

In order to show Subform2, you have to create an instance of it using the addInstance() method of Subform2&#039;s &lt;a href=&quot;http://forms.stefcameron.com/2006/11/11/instance-manager-object-reference/&quot; rel=&quot;nofollow&quot;&gt;Instance Manager&lt;/a&gt;:

&lt;pre&gt;&lt;code&gt;_Subform2.addInstance(0);&lt;/code&gt;&lt;/pre&gt;

After that, Subform2 will exist and you can access the fields it contains and get/set properties on it.</description>
		<content:encoded><![CDATA[<p>Jennifer,</p>
<p>It sounds like you&#8217;re trying to call a property (presence) on Subform2 when Subform2 doesn&#8217;t exist yet.</p>
<p>If you&#8217;re following my advice from my previous reply, then Subform2 is set to be repeatable and has a min occurrence of 0 which means it doesn&#8217;t exist by default.</p>
<p>In order to show Subform2, you have to create an instance of it using the addInstance() method of Subform2&#8217;s <a href="http://forms.stefcameron.com/2006/11/11/instance-manager-object-reference/" rel="nofollow">Instance Manager</a>:</p>
<pre><code>_Subform2.addInstance(0);</code></pre>
<p>After that, Subform2 will exist and you can access the fields it contains and get/set properties on it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jennifer</title>
		<link>http://forms.stefcameron.com/2006/10/28/scripting-table-columns/comment-page-2/#comment-66232</link>
		<dc:creator>Jennifer</dc:creator>
		<pubDate>Wed, 17 Feb 2010 15:01:39 +0000</pubDate>
		<guid isPermaLink="false">http://forms.stefcameron.com/blog/?p=50#comment-66232</guid>
		<description>Stefan,
I&#039;ve been working on this off and on and am still having problems.  Would you be able to elaborate a little more?

I have the subform flowable and repeatable (although the min count won&#039;t stay checked). Next I am trying to get a show/hide script to work, but am confused.  I&#039;m sure that I&#039;m missing something simple.  I tried a few different variations to get the script to work and ended up with &quot;Error: accessor &#039;Subform2.presence&#039; is unknown&quot;

The presence of the Subform2 that I want to show when the checkbox in Subform1 is checked is currently set to visible.

Any suggestions?
Thanks!</description>
		<content:encoded><![CDATA[<p>Stefan,<br />
I&#8217;ve been working on this off and on and am still having problems.  Would you be able to elaborate a little more?</p>
<p>I have the subform flowable and repeatable (although the min count won&#8217;t stay checked). Next I am trying to get a show/hide script to work, but am confused.  I&#8217;m sure that I&#8217;m missing something simple.  I tried a few different variations to get the script to work and ended up with &#8220;Error: accessor &#8216;Subform2.presence&#8217; is unknown&#8221;</p>
<p>The presence of the Subform2 that I want to show when the checkbox in Subform1 is checked is currently set to visible.</p>
<p>Any suggestions?<br />
Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jennifer</title>
		<link>http://forms.stefcameron.com/2006/10/28/scripting-table-columns/comment-page-2/#comment-65881</link>
		<dc:creator>Jennifer</dc:creator>
		<pubDate>Thu, 11 Feb 2010 14:15:03 +0000</pubDate>
		<guid isPermaLink="false">http://forms.stefcameron.com/blog/?p=50#comment-65881</guid>
		<description>Stefan,
Ah-ha! That makes sense. Thank you very much!</description>
		<content:encoded><![CDATA[<p>Stefan,<br />
Ah-ha! That makes sense. Thank you very much!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stefan Cameron</title>
		<link>http://forms.stefcameron.com/2006/10/28/scripting-table-columns/comment-page-1/#comment-65748</link>
		<dc:creator>Stefan Cameron</dc:creator>
		<pubDate>Mon, 08 Feb 2010 20:29:38 +0000</pubDate>
		<guid isPermaLink="false">http://forms.stefcameron.com/blog/?p=50#comment-65748</guid>
		<description>Jennifer,

You&#039;re welcome!

It sounds like you might be adding/removing an instance of Table2 rather than showing/hiding it which leads you to attempting to remove it when it has already been removed (&quot;index out of bounds&quot;) or adding a second instance when Table2 isn&#039;t repeatable (&quot;element [max] has violated its allowable number of occurrences&quot;).

Assuming only one customer may fill Table2 even if two customers have checked the &quot;Drink&quot; box, then you should first place Table2 in a flowable subform and make it repeatable with a min number of 0 instances and a max of 1. Then, in your script associated to the checkbox which displays Table2, you should check, before adding an instance, if there is already an instance that exists. You can do this by using the &quot;count&quot; property of Table2&#039;s &lt;a href=&quot;http://forms.stefcameron.com/2006/11/11/instance-manager-object-reference/&quot; rel=&quot;nofollow&quot;&gt;Instance Manager&lt;/a&gt; to get the number of existing instances of Table2: _Table2.count.

You would then do the opposite when removing Table2: Check the count to see if it has already been removed (count of 0) and only remove the instance of Table2 if there is an instance currently in existence.</description>
		<content:encoded><![CDATA[<p>Jennifer,</p>
<p>You&#8217;re welcome!</p>
<p>It sounds like you might be adding/removing an instance of Table2 rather than showing/hiding it which leads you to attempting to remove it when it has already been removed (&#8220;index out of bounds&#8221;) or adding a second instance when Table2 isn&#8217;t repeatable (&#8220;element [max] has violated its allowable number of occurrences&#8221;).</p>
<p>Assuming only one customer may fill Table2 even if two customers have checked the &#8220;Drink&#8221; box, then you should first place Table2 in a flowable subform and make it repeatable with a min number of 0 instances and a max of 1. Then, in your script associated to the checkbox which displays Table2, you should check, before adding an instance, if there is already an instance that exists. You can do this by using the &#8220;count&#8221; property of Table2&#8217;s <a href="http://forms.stefcameron.com/2006/11/11/instance-manager-object-reference/" rel="nofollow">Instance Manager</a> to get the number of existing instances of Table2: _Table2.count.</p>
<p>You would then do the opposite when removing Table2: Check the count to see if it has already been removed (count of 0) and only remove the instance of Table2 if there is an instance currently in existence.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stefan Cameron</title>
		<link>http://forms.stefcameron.com/2006/10/28/scripting-table-columns/comment-page-1/#comment-65747</link>
		<dc:creator>Stefan Cameron</dc:creator>
		<pubDate>Mon, 08 Feb 2010 20:20:52 +0000</pubDate>
		<guid isPermaLink="false">http://forms.stefcameron.com/blog/?p=50#comment-65747</guid>
		<description>Deepak,

I&#039;m afraid I don&#039;t know what &quot;ADLC&quot; stands for.

As far as I know, relocating the subform should result in all contained children to follow along and retain their positions relative to the subform&#039;s top/left corner.

When you say the subform moves to approx. 8in or 9in when you assign &quot;4in&quot; to its y coordinate, could the resulting position appear to be greater than 4in since it would be relative to the subform&#039;s parent which might be 4in from the top of the page?</description>
		<content:encoded><![CDATA[<p>Deepak,</p>
<p>I&#8217;m afraid I don&#8217;t know what &#8220;ADLC&#8221; stands for.</p>
<p>As far as I know, relocating the subform should result in all contained children to follow along and retain their positions relative to the subform&#8217;s top/left corner.</p>
<p>When you say the subform moves to approx. 8in or 9in when you assign &#8220;4in&#8221; to its y coordinate, could the resulting position appear to be greater than 4in since it would be relative to the subform&#8217;s parent which might be 4in from the top of the page?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jennifer</title>
		<link>http://forms.stefcameron.com/2006/10/28/scripting-table-columns/comment-page-1/#comment-65024</link>
		<dc:creator>Jennifer</dc:creator>
		<pubDate>Fri, 29 Jan 2010 18:00:41 +0000</pubDate>
		<guid isPermaLink="false">http://forms.stefcameron.com/blog/?p=50#comment-65024</guid>
		<description>Stefan,
First off, thank you for all of your work on this site. I absolutely love it!

I&#039;m not sure if this is the best place to put my question, but it sort of relates.

I have a table with an add row button.  Several of the cells in the table have checkboxes. If one is checked, then a new table pops up for more information regarding that specific item.  
Short Example (not specifically what I&#039;m doing, but trying to keep it generic in case this post can help others too):
Column 1 = Customer Name
Column 2 = Drink
If the cell in column 2 is checked, then Table 2 is displayed and it has them select what type of drink they would like, if they want it hot or cold, what size, etc.

The first issue that I am having is that if I add an additional row and both of the users check the checkbox for the drink then I get the error, &quot;Error: The element [max] has violated its allowable number of occurances&quot;.

The next issue I have is that if they change their mind and remove the check from one of the customers, but not the other (I would still want the table to show up since one user needs to reference the table) the table is removed.  Also, if I remove all checks then I get the error, &quot;Error: Index value is out of bounds&quot;. 

Any help you could provide would be greatly appreciated! Several people are really excited about this form; I just need to get it working! :)  Thank you!</description>
		<content:encoded><![CDATA[<p>Stefan,<br />
First off, thank you for all of your work on this site. I absolutely love it!</p>
<p>I&#8217;m not sure if this is the best place to put my question, but it sort of relates.</p>
<p>I have a table with an add row button.  Several of the cells in the table have checkboxes. If one is checked, then a new table pops up for more information regarding that specific item.<br />
Short Example (not specifically what I&#8217;m doing, but trying to keep it generic in case this post can help others too):<br />
Column 1 = Customer Name<br />
Column 2 = Drink<br />
If the cell in column 2 is checked, then Table 2 is displayed and it has them select what type of drink they would like, if they want it hot or cold, what size, etc.</p>
<p>The first issue that I am having is that if I add an additional row and both of the users check the checkbox for the drink then I get the error, &#8220;Error: The element [max] has violated its allowable number of occurances&#8221;.</p>
<p>The next issue I have is that if they change their mind and remove the check from one of the customers, but not the other (I would still want the table to show up since one user needs to reference the table) the table is removed.  Also, if I remove all checks then I get the error, &#8220;Error: Index value is out of bounds&#8221;. </p>
<p>Any help you could provide would be greatly appreciated! Several people are really excited about this form; I just need to get it working! :)  Thank you!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Deepak</title>
		<link>http://forms.stefcameron.com/2006/10/28/scripting-table-columns/comment-page-1/#comment-65017</link>
		<dc:creator>Deepak</dc:creator>
		<pubDate>Fri, 29 Jan 2010 14:18:48 +0000</pubDate>
		<guid isPermaLink="false">http://forms.stefcameron.com/blog/?p=50#comment-65017</guid>
		<description>Hi Stefan

Your expert guidance is requested...!!! :)

This is with regard to repositioning the Subform layout dynamically. I need to reposition the x or y coordinates of a Subform (which is &quot;positioned&quot; and contains sub elements in it like text fields and others) within the same page only.

It works fine in ADLC...just change the y coordinate (say from 6in to 4in) and the whole subform is moved to that location correctly with elements intact. 

If the same conversion is done using javascript (for example: Page1.Subform1.y=&quot;4.1239in&quot;;), the subform indeed repositions but in wrong place... (instead of going to 4in, it goes to 8 or 9in.. )

I tried to follow the example given by John (http://blogs.adobe.com/formfeed/2009/04/layout_methods_to_find_page_po.html), however was not able to figure out how to use it for my scenario. From the blog of John, it seems that we also need to recalculate the positions of the elements in the subform in javascript. 

How can we reposition the subform with easyness as we do in ADLC..?? 

Thanks
Deepak</description>
		<content:encoded><![CDATA[<p>Hi Stefan</p>
<p>Your expert guidance is requested&#8230;!!! :)</p>
<p>This is with regard to repositioning the Subform layout dynamically. I need to reposition the x or y coordinates of a Subform (which is &#8220;positioned&#8221; and contains sub elements in it like text fields and others) within the same page only.</p>
<p>It works fine in ADLC&#8230;just change the y coordinate (say from 6in to 4in) and the whole subform is moved to that location correctly with elements intact. </p>
<p>If the same conversion is done using javascript (for example: Page1.Subform1.y=&#8221;4.1239in&#8221;;), the subform indeed repositions but in wrong place&#8230; (instead of going to 4in, it goes to 8 or 9in.. )</p>
<p>I tried to follow the example given by John (<a href="http://blogs.adobe.com/formfeed/2009/04/layout_methods_to_find_page_po.html" rel="nofollow">http://blogs.adobe.com/formfeed/2009/04/layout_methods_to_find_page_po.html</a>), however was not able to figure out how to use it for my scenario. From the blog of John, it seems that we also need to recalculate the positions of the elements in the subform in javascript. </p>
<p>How can we reposition the subform with easyness as we do in ADLC..?? </p>
<p>Thanks<br />
Deepak</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stefan Cameron</title>
		<link>http://forms.stefcameron.com/2006/10/28/scripting-table-columns/comment-page-1/#comment-64690</link>
		<dc:creator>Stefan Cameron</dc:creator>
		<pubDate>Fri, 22 Jan 2010 14:02:13 +0000</pubDate>
		<guid isPermaLink="false">http://forms.stefcameron.com/blog/?p=50#comment-64690</guid>
		<description>Deepak,

Thanks for the great feedback, I appreciate it! :)</description>
		<content:encoded><![CDATA[<p>Deepak,</p>
<p>Thanks for the great feedback, I appreciate it! :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Deepak</title>
		<link>http://forms.stefcameron.com/2006/10/28/scripting-table-columns/comment-page-1/#comment-64683</link>
		<dc:creator>Deepak</dc:creator>
		<pubDate>Fri, 22 Jan 2010 10:56:07 +0000</pubDate>
		<guid isPermaLink="false">http://forms.stefcameron.com/blog/?p=50#comment-64683</guid>
		<description>Hi Stefan

Thank you for your reply. Initially, I had done the same but the data in the table was not getting populated. Later I found out that, there was some script error and hence the problem.

The articles by you are excellent and gives real insights and solutions for any complex Form development...!!! Thanks a ton... :)

Thanks
Deepak</description>
		<content:encoded><![CDATA[<p>Hi Stefan</p>
<p>Thank you for your reply. Initially, I had done the same but the data in the table was not getting populated. Later I found out that, there was some script error and hence the problem.</p>
<p>The articles by you are excellent and gives real insights and solutions for any complex Form development&#8230;!!! Thanks a ton&#8230; :)</p>
<p>Thanks<br />
Deepak</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stefan Cameron</title>
		<link>http://forms.stefcameron.com/2006/10/28/scripting-table-columns/comment-page-1/#comment-64538</link>
		<dc:creator>Stefan Cameron</dc:creator>
		<pubDate>Tue, 19 Jan 2010 22:36:38 +0000</pubDate>
		<guid isPermaLink="false">http://forms.stefcameron.com/blog/?p=50#comment-64538</guid>
		<description>Deepak,

You should be able to drag other field types from the Object palette onto a cell and have that cell&#039;s field replaced by the one you just dropped on it. Alternatively, you can select the cell and use the &quot;Object palette &gt; Field/Draw tab &gt; Type property&quot; to change the object&#039;s type (e.g. from a Text Field to a Numeric Field).

This is all done at design-time. There are no scripts involved.</description>
		<content:encoded><![CDATA[<p>Deepak,</p>
<p>You should be able to drag other field types from the Object palette onto a cell and have that cell&#8217;s field replaced by the one you just dropped on it. Alternatively, you can select the cell and use the &#8220;Object palette > Field/Draw tab > Type property&#8221; to change the object&#8217;s type (e.g. from a Text Field to a Numeric Field).</p>
<p>This is all done at design-time. There are no scripts involved.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
