<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6459223225750839541</id><updated>2024-09-19T10:22:57.803-07:00</updated><category term="Adobe LiveCycle Digital Signatures"/><category term="Digital Signatures"/><category term="JavaScript"/><category term="LiveCycle Designer ES"/><category term="Obtaining digital signature data with JavaScript in Adobe LiveCycle Designer"/><title type='text'>Adobe LiveCycle and E-Forms Development with Toni Williams</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://eco-forms.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6459223225750839541/posts/default'/><link rel='alternate' type='text/html' href='http://eco-forms.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Toni Williams   - Adobe LiveCycle Developer</name><uri>http://www.blogger.com/profile/06896978389094826583</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgi_nO9Be_NkXBwd8vnqXhUkQf0N40PHU9j7x3YAyVreJmpl_Ko3ebe3V4Q4exN_HODD6IyK_q6RMW8N5AmopdsGDJsA2rrIxsm8BRbwLosVD6NnTjd4qYWvPk-bIw9vgw/s1600/toni_cartoon2.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>2</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6459223225750839541.post-6634731325512560927</id><published>2013-05-26T14:14:00.002-07:00</published><updated>2013-05-26T14:14:21.691-07:00</updated><title type='text'>LiveCycle Designer - Easy script to reset dynamic tables</title><content type='html'>There are numerous examples on generating and populating dynamic tables in Adobe LiveCycle Designer, but very few demonstrating how to reset tables tables to their original state. &amp;nbsp;&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
A very common request I get is to render a table based on certain selection criteria, which results in the table continuously changing. &amp;nbsp;Since the table and data are &#39;dynamic&#39;, it&#39;s important that the form properly redender when this selection are made. &amp;nbsp;&lt;span style=&quot;font-size: x-small;&quot;&gt;(The data in the form below is being populated by a web service that I developed in Adobe LiveCycle ES3)&lt;/span&gt;&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
In the form below, there is a dynamic table that changes based on the which user is selected in the drop-down field. &amp;nbsp;The number of rows for the resulting tables in unknown, so in order to properly re-render the table correctly, I reset the table to its initial state. &amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh91DlO-L931za_YHWBDuSajP8Uj-9k_v6yI4mK_9n9vS0rzZxA7DiUAaEX4JlT-olEmg5OLPdQXvJdOStVDRuIlwU4ytc39lLw0RTAVfnCtYKPHxw60smCiIb0eSRzy82f2_aho64amKH_/s1600/Screen+shot+2013-05-26+at+5.01.49+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh91DlO-L931za_YHWBDuSajP8Uj-9k_v6yI4mK_9n9vS0rzZxA7DiUAaEX4JlT-olEmg5OLPdQXvJdOStVDRuIlwU4ytc39lLw0RTAVfnCtYKPHxw60smCiIb0eSRzy82f2_aho64amKH_/s1600/Screen+shot+2013-05-26+at+5.01.49+PM.png&quot; height=&quot;346&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
I&#39;ve created a simple function below for this purpose. &amp;nbsp;It accepts the row object reference as an input paramater. &amp;nbsp;The function gets the total number of rows in the table, and removes all instances expect the first instance. &amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRy-kgro0eKJZV4sQiVB1RJAXdXHf5weTtYmh9R9L_WUFnSMvdBHWdBi-uV1mXxcbFbFdcL3ydxBksCn_Q2iuyPHFApPFG26CRJ3El55ZOL3se3VcNmTwH__nIohuJZ-dSRn6t2Y0bbpYI/s1600/Screen+shot+2013-05-26+at+5.09.32+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRy-kgro0eKJZV4sQiVB1RJAXdXHf5weTtYmh9R9L_WUFnSMvdBHWdBi-uV1mXxcbFbFdcL3ydxBksCn_Q2iuyPHFApPFG26CRJ3El55ZOL3se3VcNmTwH__nIohuJZ-dSRn6t2Y0bbpYI/s1600/Screen+shot+2013-05-26+at+5.09.32+PM.png&quot; height=&quot;160&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://eco-forms.blogspot.com/feeds/6634731325512560927/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://eco-forms.blogspot.com/2013/05/livecycle-designer-easy-script-to-reset.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6459223225750839541/posts/default/6634731325512560927'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6459223225750839541/posts/default/6634731325512560927'/><link rel='alternate' type='text/html' href='http://eco-forms.blogspot.com/2013/05/livecycle-designer-easy-script-to-reset.html' title='LiveCycle Designer - Easy script to reset dynamic tables'/><author><name>Toni Williams   - Adobe LiveCycle Developer</name><uri>http://www.blogger.com/profile/06896978389094826583</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgi_nO9Be_NkXBwd8vnqXhUkQf0N40PHU9j7x3YAyVreJmpl_Ko3ebe3V4Q4exN_HODD6IyK_q6RMW8N5AmopdsGDJsA2rrIxsm8BRbwLosVD6NnTjd4qYWvPk-bIw9vgw/s1600/toni_cartoon2.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh91DlO-L931za_YHWBDuSajP8Uj-9k_v6yI4mK_9n9vS0rzZxA7DiUAaEX4JlT-olEmg5OLPdQXvJdOStVDRuIlwU4ytc39lLw0RTAVfnCtYKPHxw60smCiIb0eSRzy82f2_aho64amKH_/s72-c/Screen+shot+2013-05-26+at+5.01.49+PM.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6459223225750839541.post-1496731566414287406</id><published>2013-05-26T11:23:00.003-07:00</published><updated>2013-05-26T22:28:47.154-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Adobe LiveCycle Digital Signatures"/><category scheme="http://www.blogger.com/atom/ns#" term="Digital Signatures"/><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript"/><category scheme="http://www.blogger.com/atom/ns#" term="LiveCycle Designer ES"/><category scheme="http://www.blogger.com/atom/ns#" term="Obtaining digital signature data with JavaScript in Adobe LiveCycle Designer"/><title type='text'>LiveCycle Designer - Parsing digital signature data with JavaScript</title><content type='html'>Validating and extracting data from Digital Signatures in Adobe LiveCycle Designer is a topic that I&#39;m frequently asked about. &amp;nbsp;One frequently requested requirement involves displaying the signature date and the common name of the person that signed the digital signature; however, many people do not know that there is much more that can be obtained from the digital signature using JavaScript. &lt;br /&gt;
&lt;br /&gt;
In addition to the date and common name, the following elements can be obtained using JavaScript:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Validity Start Date&lt;/li&gt;
&lt;li&gt;Validity End Date&lt;/li&gt;
&lt;li&gt;Serial Number&lt;/li&gt;
&lt;li&gt;Issuer DN (Distinguished Date)&lt;/li&gt;
&lt;li&gt;Contact Information&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
Before attempting to extract data from a digital signature, the signature should be validated. &amp;nbsp;When a user selects the signature field, a pop-up prompting them to select their signature and or enter a password is displayed. &amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisjgk5xfcPiRJwNDKstzfj8awOd-I59HrjG-MOQiEtipXzMe4W1_jruyDN2nS6JOs7YvyALBNPHtHGG18F962HKKlYvohCshbJS09isDl9czGYjSZQfSY9euOMDMzClhdQl3u7A2ksw_Fp/s1600/Screen+shot+2013-05-26+at+9.44.30+AM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisjgk5xfcPiRJwNDKstzfj8awOd-I59HrjG-MOQiEtipXzMe4W1_jruyDN2nS6JOs7YvyALBNPHtHGG18F962HKKlYvohCshbJS09isDl9czGYjSZQfSY9euOMDMzClhdQl3u7A2ksw_Fp/s1600/Screen+shot+2013-05-26+at+9.44.30+AM.png&quot; height=&quot;433&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
To validate the digital signature in JavaScript, the &#39;signatureValidate()&#39; method is used. &amp;nbsp;In the code below, the oState variable will be assigned one of the following possible values.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;
-1 &amp;nbsp;not a signature field&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
0 &amp;nbsp; signature is blank&lt;/div&gt;
&lt;div&gt;
1 &amp;nbsp; unknown status&lt;/div&gt;
&lt;div&gt;
2 &amp;nbsp; signature is invalid&lt;/div&gt;
&lt;div&gt;
3 &amp;nbsp; signature is valid, identity of signer could not be verified&lt;/div&gt;
&lt;div&gt;
4 &amp;nbsp; signature and identity of signer are both valid&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
In the code below I am only checking to ensure that a the signature is valid signature. &amp;nbsp;I will use Adobe LiveCycle Digital Signatures ES3 to validate the identity of the signer and certificate.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
Please note the full path is used when referencing the Signature field object. &lt;br /&gt;
If you wanted to ensure the identity of the signature was valid, you could do so by changing the condition to:&lt;br /&gt;
&amp;nbsp;&lt;i&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;if(oState == 4)&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div class=&quot;p1&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span class=&quot;s1&quot;&gt;var&lt;/span&gt; oState &lt;span class=&quot;s1&quot;&gt;=&lt;/span&gt; event.target.getField(&quot;form1[0].signatureForm[0].SignatureField1[0]&quot;).signatureValidate();&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVUkGUqHuOyWXAp0uv35TgSrrZl0Z3L7KZSTPMq5iB02sm5LN0BfXZ71zueMI-kLa9vAsoS_Fug7mzmhbecCb9D2w_hiA2jNmaw0jflmRrHMCY3CKN88t5lauvPsy-N7Mp_oF6vnrqPHVE/s1600/Screen+shot+2013-05-26+at+12.24.24+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVUkGUqHuOyWXAp0uv35TgSrrZl0Z3L7KZSTPMq5iB02sm5LN0BfXZ71zueMI-kLa9vAsoS_Fug7mzmhbecCb9D2w_hiA2jNmaw0jflmRrHMCY3CKN88t5lauvPsy-N7Mp_oF6vnrqPHVE/s1600/Screen+shot+2013-05-26+at+12.24.24+PM.png&quot; height=&quot;142&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
The next step is getting the signature and certificate information. &amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
In the image above, the variables &#39;signatureInformation&#39; and &#39;signatureCertificate&#39; are defined. &amp;nbsp;The &#39;signatureInformation&#39; variable is used to store the the signature information data returned from the &#39;signatureInfo()&#39; method. &amp;nbsp;The &#39;signatureCertificate&#39; variable stores the certificate information of the digital signature that was used to sign the referenced signature field. &amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;A few useful signatureInfo() properties:&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;name - Name of the user that created the signature (returns String)&lt;/li&gt;
&lt;li&gt;contactInfo - The user-specified contact information for determining trust (returns String)&lt;/li&gt;
&lt;li&gt;date - The date and time that the signature was created, returned as a JavaScript Date object.&lt;/li&gt;
&lt;li&gt;timestamp - The URL of the server for time-stamping &amp;nbsp;(returns String)&lt;/li&gt;
&lt;li&gt;verifyDate - The date and time that the signature was verified (if the signature has been verified), returned as a JavaScript Date object.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;A few useful certificate properties:&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&amp;nbsp;subjectCN -&amp;nbsp;The common name of the signer (returns String)&lt;/li&gt;
&lt;li&gt;serialNumber -&amp;nbsp;A unique identifier for this certificate, used in conjunction with issuerDN (returns String)&lt;/li&gt;
&lt;li&gt;validityStart - The validity start date of the certificate. Before a digital ID can be used for signing Acrobat, ensures that the signing time is more recent than the validityStart date, returned as a JavaScript Date object.&lt;/li&gt;
&lt;li&gt;validityEnd - The validity end date of the certificate. Before a digital ID can be used for signing, Acrobat ensures that the signing time is prior to the validityEnd date.&lt;/li&gt;
&lt;li&gt;issuerDN - The distinguished name of the issuer of the certificate, returned as an RDN object. &amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
Some of the properties of the RDN object include:&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;cn - common name&lt;/li&gt;
&lt;li&gt;dateOfBirth&lt;/li&gt;
&lt;li&gt;countryOfCitizenship&lt;/li&gt;
&lt;li&gt;givenName&lt;/li&gt;
&lt;li&gt;initials&lt;/li&gt;
&lt;li&gt;name&lt;/li&gt;
&lt;li&gt;dc - domain component&lt;/li&gt;
&lt;li&gt;o - organization&lt;/li&gt;
&lt;li&gt;ou - organizational unit&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
The code below demonstrates how signatureInfo, certificate and RDN properties can be used to obtain information about the digital signature.&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNTxcFmV5JRcVJ_4g0oUy447UbTfITFzBG-XmxFFe0sGq5TdcFXeAegLPQSBU2wqk7fuZBGC8wqLOyVngHp_f4p5e8R4Mgf2Gmz0yrHljaDOQc86rdbwAmPCrCQQaSjKvP1NWImK9g_K2d/s1600/Screen+shot+2013-05-26+at+2.16.50+PM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNTxcFmV5JRcVJ_4g0oUy447UbTfITFzBG-XmxFFe0sGq5TdcFXeAegLPQSBU2wqk7fuZBGC8wqLOyVngHp_f4p5e8R4Mgf2Gmz0yrHljaDOQc86rdbwAmPCrCQQaSjKvP1NWImK9g_K2d/s1600/Screen+shot+2013-05-26+at+2.16.50+PM.png&quot; height=&quot;254&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
To learn more about me and my development services, please visit&amp;nbsp;&lt;a href=&quot;http://www.toniwilliams.net/&quot;&gt;www.toniwilliams.net&lt;/a&gt;.&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://eco-forms.blogspot.com/feeds/1496731566414287406/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://eco-forms.blogspot.com/2013/05/livecycle-designer-parsing-digital.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6459223225750839541/posts/default/1496731566414287406'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6459223225750839541/posts/default/1496731566414287406'/><link rel='alternate' type='text/html' href='http://eco-forms.blogspot.com/2013/05/livecycle-designer-parsing-digital.html' title='LiveCycle Designer - Parsing digital signature data with JavaScript'/><author><name>Toni Williams   - Adobe LiveCycle Developer</name><uri>http://www.blogger.com/profile/06896978389094826583</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgi_nO9Be_NkXBwd8vnqXhUkQf0N40PHU9j7x3YAyVreJmpl_Ko3ebe3V4Q4exN_HODD6IyK_q6RMW8N5AmopdsGDJsA2rrIxsm8BRbwLosVD6NnTjd4qYWvPk-bIw9vgw/s1600/toni_cartoon2.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisjgk5xfcPiRJwNDKstzfj8awOd-I59HrjG-MOQiEtipXzMe4W1_jruyDN2nS6JOs7YvyALBNPHtHGG18F962HKKlYvohCshbJS09isDl9czGYjSZQfSY9euOMDMzClhdQl3u7A2ksw_Fp/s72-c/Screen+shot+2013-05-26+at+9.44.30+AM.png" height="72" width="72"/><thr:total>3</thr:total></entry></feed>