Congratulations!

[Valid RSS] This is a valid RSS feed.

Recommendations

This feed is valid, but interoperability with the widest range of feed readers could be improved by implementing the following recommendations.

Source: http://notesspeak.blogspot.com/feeds/posts/default?alt=rss

  1. <?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom="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" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-4805395909933518229</atom:id><lastBuildDate>Mon, 28 May 2018 01:53:52 +0000</lastBuildDate><category>xpages</category><category>Java</category><category>DB2</category><category>Bootstrap</category><category>education</category><category>Eclipse</category><category>JDBC</category><category>Oracle</category><category>javascript</category><category>XSL-FO</category><category>jQuery</category><category>Angular.JS</category><category>ExtJS</category><category>CSS</category><category>dojo</category><category>php</category><title>Notes Speak</title><description>To share the occasional insight relating to XPages programming in IBM Notes and Domino. (2013-2015) &lt;br&gt;&lt;br&gt;&#xa;To share insights that I discover as I delve deeper in the world of Java Programming (2016 - ?)  </description><link>http://notesspeak.blogspot.com/</link><managingEditor>[email protected] (The Zavocki&#39;s)</managingEditor><generator>Blogger</generator><openSearch:totalResults>78</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4805395909933518229.post-9145408229409616236</guid><pubDate>Thu, 22 Sep 2016 02:05:00 +0000</pubDate><atom:updated>2016-09-21T20:05:00.467-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Eclipse</category><category domain="http://www.blogger.com/atom/ns#">Java</category><title>Eclipse Tip: Using an Built-In Variable to Customize a Linked File Location in the Build Path</title><description>&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;&quot;&gt;Today, we came across this issue and I thought I would share this information since we couldn’t find much out on the net about this subject. &lt;i&gt;Warning: This is a very narrow use case.&lt;/i&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;&quot;&gt;&lt;i&gt;Author Note:&lt;/i&gt; This post is my first java-centric blog since I have moved on from my Domino/XPages role. I hope to blog more about java related topics in the coming months, thanks to those who encouraged me to continue blogging. I have several ideas in the pipeline.&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;&quot;&gt;&lt;b&gt;&lt;i&gt;Background:&lt;/i&gt;&lt;/b&gt;&amp;nbsp; My Tech Lead and I are creating three java web services.&amp;nbsp; We often pair program but also want to be able to work alone. We use Rational Application Developer, which is a flavor of the Eclipse IDE. To manage our code, we use SVN for source control, and I making the assumption that everyone knows the basics of how that works. We are both currently working local, and the code is not on a shared server yet.&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;&quot;&gt;As part of our project, there are some file resources in which we need to read. These resources are in a folder that we need to add to our build path and to do so we use a linked source folder. &amp;nbsp;Also worth noting, we are not allowed to use Maven in our environment.&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;&quot;&gt;&lt;b style=&quot;background-color: white;&quot;&gt;&lt;i&gt;The Problem&lt;/i&gt;&lt;/b&gt;&lt;span style=&quot;background-color: white;&quot;&gt;:&amp;nbsp; When each of us, link to the source folder on our hard drive it is stored with an absolute path. When we commit this to our shared repository and then&amp;nbsp;&lt;/span&gt;&lt;i style=&quot;background-color: white;&quot;&gt;Update to Head&lt;/i&gt;&lt;span style=&quot;background-color: white;&quot;&gt;, we get the other person’s absolute path.&amp;nbsp; Each of our user folders is based on our five digit ID so the path is always different.&amp;nbsp; We needed a way to avoid absolute paths when we link source.&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;&quot;&gt;&lt;b style=&quot;background-color: white;&quot;&gt;&lt;i&gt;The solution:&lt;/i&gt;&lt;/b&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;We used a variable to specify the Linked File Location which translates to our individual paths. This works well, but it is quite confusing initially, until you understand how it works.&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;&quot;&gt;&lt;b&gt;&lt;i&gt;How to Implement Solution:&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;&quot;&gt;Follow these five steps to use a variable for the Linked File Location:&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style=&quot;text-indent: -0.25in;&quot;&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;1)&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; text-indent: -0.25in;&quot;&gt;Configure the Build Path of the project and click on the ‘&lt;/span&gt;&lt;i style=&quot;font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; text-indent: -0.25in;&quot;&gt;Source&lt;/i&gt;&lt;span style=&quot;font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; text-indent: -0.25in;&quot;&gt;’ tab as show here. &amp;nbsp;&lt;/span&gt;&lt;div&gt;&lt;div style=&quot;text-indent: -24px;&quot;&gt;&lt;span style=&quot;font-family: Calibri, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://2.bp.blogspot.com/-iJDCqvxCYMs/V-M03vBgtvI/AAAAAAAAHsw/Ns5P7sghYWYES6mwJ9RV-94sq2ULvdWdwCLcB/s1600/Capture9-20a.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;314&quot; src=&quot;https://2.bp.blogspot.com/-iJDCqvxCYMs/V-M03vBgtvI/AAAAAAAAHsw/Ns5P7sghYWYES6mwJ9RV-94sq2ULvdWdwCLcB/s640/Capture9-20a.JPG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style=&quot;text-indent: -0.25in;&quot;&gt;&lt;div style=&quot;font-size: 7pt;&quot;&gt;&lt;span style=&quot;font-size: 7pt; text-indent: -0.25in;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;text-indent: -0.25in;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;2a) &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; text-indent: -0.25in;&quot;&gt;If creating a new location, click on ‘&lt;/span&gt;&lt;i style=&quot;background-color: white; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; text-indent: -0.25in;&quot;&gt;Link Source&lt;/i&gt;&lt;span style=&quot;background-color: white; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; text-indent: -0.25in;&quot;&gt;’&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;text-indent: -24px;&quot;&gt;&lt;span style=&quot;font-family: Calibri, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://2.bp.blogspot.com/-1lMthULTZp4/V-M1QttYiwI/AAAAAAAAHs0/aLHGCYI3RukpW0_aRuzLN0K74wyYYlCOACLcB/s1600/Capture9-20b.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;https://2.bp.blogspot.com/-1lMthULTZp4/V-M1QttYiwI/AAAAAAAAHs0/aLHGCYI3RukpW0_aRuzLN0K74wyYYlCOACLcB/s400/Capture9-20b.JPG&quot; width=&quot;388&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style=&quot;font-family: Calibri, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;div&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;2b)&amp;nbsp;&lt;span style=&quot;background-color: white; text-indent: -0.25in;&quot;&gt;Alternatively if you already have a link source then select it, and press&amp;nbsp;&lt;/span&gt;&lt;i style=&quot;text-indent: -0.25in;&quot;&gt;edit&lt;/i&gt;&lt;span style=&quot;background-color: white; text-indent: -0.25in;&quot;&gt;&amp;nbsp;to see this similar window&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;text-indent: -24px;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://1.bp.blogspot.com/-Wen4TybDC4k/V-M2XSdnBtI/AAAAAAAAHtA/e8DL4tZNdtQsVg07tp-TrBgEmklw-WBoQCLcB/s1600/Capture9-20c.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;331&quot; src=&quot;https://1.bp.blogspot.com/-Wen4TybDC4k/V-M2XSdnBtI/AAAAAAAAHtA/e8DL4tZNdtQsVg07tp-TrBgEmklw-WBoQCLcB/s400/Capture9-20c.JPG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-indent: -24px;&quot;&gt;&lt;span style=&quot;font-family: Calibri, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;background-color: white; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; text-indent: -0.25in;&quot;&gt;3) From either window above, select the ‘&lt;/span&gt;&lt;i style=&quot;font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; text-indent: -0.25in;&quot;&gt;Variables&lt;/i&gt;&lt;span style=&quot;background-color: white; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; text-indent: -0.25in;&quot;&gt;’ button and you will see a window like this. These four variables/constants are created by default. You could also add your own here if you have a need to do so.&amp;nbsp; Make a note of the variable name or write it down because you cannot copy the name to the clipboard.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; text-indent: -0.25in;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://2.bp.blogspot.com/-T0Y_slHe0Ss/V-M2luEHf1I/AAAAAAAAHtI/dybXKthFDukZ1_gbIwFEJvhUxcVbiNaawCLcB/s1600/Capture9-20d.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;192&quot; src=&quot;https://2.bp.blogspot.com/-T0Y_slHe0Ss/V-M2luEHf1I/AAAAAAAAHtI/dybXKthFDukZ1_gbIwFEJvhUxcVbiNaawCLcB/s400/Capture9-20d.JPG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-indent: -24px;&quot;&gt;&lt;span style=&quot;font-family: Calibri, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;background-color: white; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; text-indent: -0.25in;&quot;&gt;4) In the linked file location add the variable “WORKSPACE_LOC” instead of the concrete path. Hit &#39;&lt;i&gt;Finish&lt;/i&gt;&#39; to save.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; text-indent: -0.25in;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://1.bp.blogspot.com/-1LBog5otlfA/V-M26utgSiI/AAAAAAAAHtQ/9vhXdiVRSToz9bs2DywG6-9kCbT-iCAMgCLcB/s1600/Capture9-20e.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;258&quot; src=&quot;https://1.bp.blogspot.com/-1LBog5otlfA/V-M26utgSiI/AAAAAAAAHtQ/9vhXdiVRSToz9bs2DywG6-9kCbT-iCAMgCLcB/s400/Capture9-20e.JPG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style=&quot;font-family: Calibri, Arial, Helvetica, sans-serif;&quot;&gt;&lt;div&gt;&lt;span style=&quot;font-family: Calibri, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; text-indent: -0.25in;&quot;&gt;The variable will show in the Build Properties now prior to hitting&amp;nbsp;&lt;/span&gt;&lt;i style=&quot;font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; text-indent: -0.25in;&quot;&gt;OK&lt;/i&gt;&lt;span style=&quot;background-color: white; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; text-indent: -0.25in;&quot;&gt;&amp;nbsp;to save. However once it is saved, it will show the complete path without the variable you entered.&amp;nbsp;&lt;b&gt; This is very confusing.&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; text-indent: -0.25in;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://1.bp.blogspot.com/-TIZBGTrgFLQ/V-M3mUvhPAI/AAAAAAAAHtY/JHTfHmbLptAr3ESctWErJZBeMTT948IigCLcB/s1600/Capture9-20f.JPG&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://1.bp.blogspot.com/-TIZBGTrgFLQ/V-M3mUvhPAI/AAAAAAAAHtY/JHTfHmbLptAr3ESctWErJZBeMTT948IigCLcB/s640/Capture9-20f.JPG&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;span style=&quot;background-color: white; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; text-indent: -0.25in;&quot;&gt;5) Despite the confusion, if you followed the steps right, the variable is saved. I would recommend verifying that the variable change took by opening the &lt;b&gt;&lt;i&gt;.project&lt;/i&gt;&lt;/b&gt; XML file and checking to see if the variable is in the path.&amp;nbsp; You need to use the Navigator window to find the &lt;i&gt;&lt;b&gt;.project&lt;/b&gt;&lt;/i&gt; file. &amp;nbsp;If the change took, it will look like below.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; text-indent: -0.25in;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://3.bp.blogspot.com/-ERnOyznifRY/V-M4_8jh7JI/AAAAAAAAHtk/PowchVN3Tl4n7cypgTzQtQsSGSNnulg3gCLcB/s1600/Capture9-20g.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;96&quot; src=&quot;https://3.bp.blogspot.com/-ERnOyznifRY/V-M4_8jh7JI/AAAAAAAAHtk/PowchVN3Tl4n7cypgTzQtQsSGSNnulg3gCLcB/s640/Capture9-20g.JPG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description><link>http://notesspeak.blogspot.com/2016/09/eclipse-tip-using-built-in-variable-to.html</link><author>[email protected] (The Zavocki&#39;s)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://2.bp.blogspot.com/-iJDCqvxCYMs/V-M03vBgtvI/AAAAAAAAHsw/Ns5P7sghYWYES6mwJ9RV-94sq2ULvdWdwCLcB/s72-c/Capture9-20a.JPG" height="72" width="72"/><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4805395909933518229.post-7233897895404280939</guid><pubDate>Fri, 16 Sep 2016 16:50:00 +0000</pubDate><atom:updated>2016-09-16T10:50:55.705-06:00</atom:updated><title>Thoughts on my XPages Experience</title><description>&lt;div class=&quot;ecxMsoNormal&quot; style=&quot;background-color: white; color: #444444; line-height: 21.3px; margin-bottom: 1.35em;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;It is painfully obvious that XPages is on its &lt;a href=&quot;http://redpillnow.com/beyond-xpages/&quot; target=&quot;_blank&quot;&gt;way out as a technology solution&lt;/a&gt;.&amp;nbsp; Although I will always have a fondness for XPages, its time of relevancy was &lt;b&gt;much&lt;/b&gt; shorter than I ever expected.&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;ecxMsoNormal&quot; style=&quot;background-color: white; color: #444444; line-height: 21.3px; margin-bottom: 1.35em;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;As someone who dived head first into XPages, I have no regrets learning the technology. What learning XPages taught me was invaluable for moving forward in the world of software development.&amp;nbsp; For me personally I am currently immersed in the java world. &amp;nbsp;Right now, I am only working on back end services, but I hope that this changes in the future.&amp;nbsp; Getting the job I have now would not have been possible without the experience gained using java within XPages. I plan on staying where I am for a long, long time.&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;ecxMsoNormal&quot; style=&quot;background-color: white; color: #444444; line-height: 21.3px; margin-bottom: 1.35em;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;So it occurred to me that sure, learning OneUI was a waste, there were many more lasting benefits that I gained from learning XPages. &amp;nbsp;Here are a few that come to mind.&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;ecxMsoListParagraphCxSpMiddle&quot; style=&quot;background-color: white; color: #444444; line-height: 21.3px; margin-bottom: 1.35em; text-indent: -0.25in;&quot;&gt;&lt;/div&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;line-height: 21.3px; text-indent: -0.25in;&quot;&gt;Hands on Java.&amp;nbsp; I embraced the use of java managed beans, and used them over SSJS whenever it made sense.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;line-height: 21.3px; text-indent: -0.25in;&quot;&gt;Javascript. Even proprietary SSJS was beneficial in becoming very comfortable with the language of the web. The more you use something the better you are at it.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;line-height: 21.3px; text-indent: -0.25in;&quot;&gt;Bootstrap – still very popular and another skill used everywhere.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;line-height: 21.3px; text-indent: -0.25in;&quot;&gt;JQuery – I used this heavily, and another skill that any developer is expected to know.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;line-height: 21.3px; text-indent: -0.25in;&quot;&gt;Relational database exposure – Because my company had a policy of using backend DB2 with XPages, I benefited greatly.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;line-height: 21.3px; text-indent: -0.25in;&quot;&gt;Dojo – I am not all that fond of dojo, but it is a skill that is good to know outside XPages. For instance, my company uses dojo as part of one of their key applications (not XPages).&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;line-height: 21.3px; text-indent: -0.25in;&quot;&gt;Front end javascripts frameworks. This is the &lt;b&gt;future&lt;/b&gt; here, and XPages opened the door for me in this area.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;line-height: 21.3px; text-indent: -0.25in;&quot;&gt;REST services – it was the XPages Extension Library that introduced me to this concept. &amp;nbsp;This goes hand in hand with the previous bullet point.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;line-height: 21.3px; text-indent: -0.25in;&quot;&gt;Using frameworks in General.&amp;nbsp; XPages taught me to see the benefit of using established framework to structure an application.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;ecxMsoNormal&quot; style=&quot;background-color: white; color: #444444; line-height: 21.3px; margin-bottom: 1.35em;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;There are probably even more, but this is the list of skills that helped me the most. Because of these skills, I have entirely no regrets about diving headfirst into XPages. I loved working with it, and in some ways wished that time lasted longer.&amp;nbsp; XPages is still an incredible technology developed by some brilliant people, but market trends and business decisions have brought us to its current state.&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;ecxMsoNormal&quot; style=&quot;background-color: white; color: #444444; line-height: 21.3px; margin-bottom: 1.35em;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;If you are still developing XPages, do not feel that you are spinning your wheels, but also proactively plan for the future.&lt;/span&gt;&lt;/div&gt;</description><link>http://notesspeak.blogspot.com/2016/09/thoughts-on-my-xpages-experience.html</link><author>[email protected] (The Zavocki&#39;s)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4805395909933518229.post-3363882907236235592</guid><pubDate>Mon, 27 Jun 2016 13:00:00 +0000</pubDate><atom:updated>2016-06-27T07:00:31.937-06:00</atom:updated><title>New Directions</title><description>&lt;div style=&quot;background-color: white; color: #444444; line-height: 21.3px; margin-bottom: 1.35em;&quot;&gt;&lt;span style=&quot;font-family: inherit; line-height: normal;&quot;&gt;It has been a long time since I have posted any blog updates, so I wanted to give an update on what is happening in my world.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #444444; line-height: 21.3px; margin-bottom: 1.35em;&quot;&gt;&lt;span style=&quot;font-family: inherit; line-height: normal;&quot;&gt;As I write, it seems like a very long time since I attended IBM Connect 2016 this past January/February. &amp;nbsp;It was a great conference and I came home from it very optimistic and fired up about the future. &amp;nbsp;I was nearly 100% sure that I would soon be moving on from my current position as a contract XPages developer at Navy Federal and finding a new position somewhere else as a Notes Domino/XPages developer. &amp;nbsp;I had several encouraging meetings at the conference and I left sure that one of them would work out for me.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #444444; line-height: 21.3px; margin-bottom: 1.35em;&quot;&gt;&lt;span style=&quot;font-family: inherit; line-height: normal;&quot;&gt;In March, I came very close to being hired for one particular position that would have had me working with some of the best XPages developers in the business. &amp;nbsp;After a very positive interview, that job fell through due to factors beyond mine and their control. &amp;nbsp; It&#39;s also worth noting that in the last year, I started to notice a decline in the number of XPages job postings. &amp;nbsp;It seems like a year ago, there were always 5-7 postings out there, sometimes more, sometimes less. &amp;nbsp;It seems now the only postings are in the DC or New York areas, two places in which I do not wish to move.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #444444; line-height: 21.3px; margin-bottom: 1.35em;&quot;&gt;&lt;span style=&quot;font-family: inherit; line-height: normal;&quot;&gt;While I love the platform and have a long and positive history with Notes, I knew and have known for years that it was only a matter of time before I would need to move on to other technologies. Years ago in the mid 2000’s I immersed myself in Java with the intent of moving in that direction. &amp;nbsp;I thought that my ideal job would be where I can get in the door as a Notes developer and then transition to Java without taking the big pay cut that would occur if I went the Junior Developer route. &amp;nbsp;This was my plan, but I kept getting interesting and well-paying Notes developer jobs. &amp;nbsp;When XPages came out, I immersed myself in learning it, and found that my prior Java studies have paid off greatly in that area. &amp;nbsp;While I like backend java, I really loved front end work and I think I am a decent UI designer.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #444444; line-height: 21.3px; margin-bottom: 1.35em;&quot;&gt;&lt;span style=&quot;font-family: inherit; line-height: normal;&quot;&gt;In early April, I found myself working as contract developer and working on doing mostly Notes development. &amp;nbsp;For some reason, Navy Federal has decided not to create any more XPages projects so most of the work would be maintenance projects on existing Notes client applications. &amp;nbsp;I was not getting serious interest for other jobs developing XPages despite the honor of being an IBM Champion. &amp;nbsp;Meanwhile my manager, for whom I have a lot of respect, continued to encourage me to apply for a full time Java developer position in which I would still report to him. &amp;nbsp;After much reflection, discussion, and prayer I did decide that I would move forward and accept a position if it was offered. &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #444444; line-height: 21.3px; margin-bottom: 1.35em;&quot;&gt;&lt;span style=&quot;font-family: inherit; line-height: normal;&quot;&gt;At the end of April I accepted a full time position as an ISD Developer III and will be working on Java and whatever else they ask me to do. &amp;nbsp;I hope to get to eventually get to work with the front end again, but for now it will be mostly back end. &amp;nbsp;I still might work occasionally with Notes if they assign me those projects. &amp;nbsp;It is very unlikely that I will work with XPages again any time soon.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #444444; line-height: 21.3px; margin-bottom: 1.35em;&quot;&gt;&lt;span style=&quot;font-family: inherit; line-height: normal;&quot;&gt;It is not without some sadness that I move on from the Yellow Bubble (Notes Community). &amp;nbsp;Even though I am moving on, I hope to maintain contact with the friends I have made. &amp;nbsp;I remain extremely honored to have been named an IBM Champion for 2016. In some ways it feels like going out on top. &amp;nbsp;I look back to my goal of ten years ago of transitioning to a Java developer internally from Notes, and realize that I have obtained that goal over 10-12 years after making it.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #444444; line-height: 21.3px; margin-bottom: 1.35em;&quot;&gt;&lt;span style=&quot;font-family: inherit; line-height: normal;&quot;&gt;After I accepted the job but prior to my start date, Navy Federal was kind enough to let me take six weeks of leave to catch up on family visits and move the last of my possessions in storage from Utah to Florida. &amp;nbsp;Despite many miles of driving, we had great visits in Texas, Utah, Missouri, Minnesota, Indiana, Pennsylvania, and Virginia. &amp;nbsp;I also got to add 62 miles towards my goal of completing the Appalachian Trail in my lifetime.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #444444; line-height: 21.3px; margin-bottom: 1.35em;&quot;&gt;&lt;span style=&quot;font-family: inherit; line-height: normal;&quot;&gt;So as of today, Monday June 27, I am now a Navy Federal full time employee. &amp;nbsp;I plan to stay for a while and we will settle here in the Florida panhandle. I have peace about my decision and am excited for the future. &amp;nbsp;I am also relieved to not have to worry about my future employment for a long time.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #444444; line-height: 21.3px; margin-bottom: 1.35em;&quot;&gt;&lt;span style=&quot;font-family: inherit; line-height: normal;&quot;&gt;As far as this blog, I hope to continue to blog whenever I find topics that I think will be of interest, and/or topics that I need to make sure I remember for later.&lt;/span&gt;&lt;/div&gt;</description><link>http://notesspeak.blogspot.com/2016/06/new-directions.html</link><author>[email protected] (The Zavocki&#39;s)</author><thr:total>4</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4805395909933518229.post-3610774945408106405</guid><pubDate>Fri, 25 Mar 2016 16:45:00 +0000</pubDate><atom:updated>2016-03-25T10:45:37.839-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Java</category><title>A Java Agent Which Extracts a File Attachment to the D:\ Drive of the Server</title><description>&lt;div class=&quot;ecxMsoNormal&quot; style=&quot;background-color: white; color: #444444; line-height: 21.3px; margin-bottom: 1.35em;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Recently I was given an assignment to extract a file from a Notes document and place it on the server’s D:\ drive.&amp;nbsp; The file would then be picked up and delivered elsewhere.&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;ecxMsoNormal&quot; style=&quot;background-color: white; color: #444444; line-height: 21.3px; margin-bottom: 1.35em;&quot;&gt;&lt;span style=&quot;line-height: 21.3px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;I was originally asked to place this file in a network share but I knew that Notes security only allows access to the file system of the server itself.&amp;nbsp; I decided to create a scheduled java agent to perform the extract because I just couldn’t bring myself to create something new in Lotusscript.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;h3 style=&quot;background-color: white; color: #444444; line-height: 21.3px; margin-bottom: 1.35em;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Background&lt;/span&gt;&lt;/h3&gt;&lt;div class=&quot;ecxMsoNormal&quot; style=&quot;background-color: white; color: #444444; line-height: 21.3px; margin-bottom: 1.35em;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Each document only contains a single attachment so I didn’t have to worry about multiple attachments.&amp;nbsp; The code would have to be modified to accommodate that use case. &amp;nbsp;The attachment directory also needed to be kept in a keyword document in case the location is moved at a later point in time.&lt;/span&gt;&lt;/div&gt;&lt;h3 style=&quot;background-color: white; color: #444444; line-height: 21.3px; margin-bottom: 1.35em;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Functionality&lt;/span&gt;&lt;/h3&gt;&lt;div class=&quot;ecxMsoNormal&quot; style=&quot;background-color: white; color: #444444; line-height: 21.3px; margin-bottom: 1.35em;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;The code also is robust enough to write a status back to the database whether the extract was successful or not.&amp;nbsp;&lt;span style=&quot;line-height: 21.3px;&quot;&gt;&amp;nbsp;The database contains a view has a column that reports back the result.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;ecxMsoNormal&quot; style=&quot;background-color: white; color: #444444; line-height: 21.3px; margin-bottom: 1.35em;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;The agent first checks whether the file is already there, and then fails if it is. Obviously it is impossible for one to have two files of the same name in the same directory.&amp;nbsp; The agent then performs the extract and then verifies that the file is now in the directory.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;h3 style=&quot;background-color: white; color: #444444; line-height: 21.3px; margin-bottom: 1.35em;&quot;&gt;The Code&lt;/h3&gt;&lt;div&gt;The code here is self explanatory so I am don&#39;t think there is a need to do a code explanation. The comments tell what is happening.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;import java.io.File;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;import java.util.Enumeration;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;import java.util.Vector;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;import lotus.domino.*;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;public class JavaAgent extends AgentBase {&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; public void NotesMain() {&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; try {&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Session session = getSession();&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AgentContext agentContext = session.getAgentContext();&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Database db = session.getCurrentDatabase();&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Get Keyword containing attachment location&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; String searchKWString = &quot;SELECT Form = &#39;frmKeyword&#39; &amp;amp; Keyword = &#39;AttachmentDirectory&#39;&quot;;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DocumentCollection locationCol = db.search(searchKWString);&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Document locationDoc = locationCol.getFirstDocument();&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; String location = locationDoc.getItemValueString(&quot;Choices&quot;);&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Get all Unprocessed Documents&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; String searchString = &quot;SELECT Form = &#39;Document&#39; &amp;amp; VCC_Upload != &#39;Y&#39;&quot;;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DocumentCollection unprocessedCol = db.search(searchString);&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Document doc = unprocessedCol.getFirstDocument();&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Document tempDoc = null;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while(doc != null){&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Extract attachment to location on server. Documents only have one attachment.&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Item item = null;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Vector attachmentNames = new Vector();&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Enumeration itemEnum = doc.getItems().elements();&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while (itemEnum.hasMoreElements()){&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; item = (Item) itemEnum.nextElement();&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (item.getType() == Item.ATTACHMENT) {&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; attachmentNames.add(item.getValueString());&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; String attachmentName = (String) attachmentNames.firstElement(); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; EmbeddedObject eo = doc.getAttachment(attachmentName);&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(eo != null){&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Check if File already present in folder&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; File file = new File(location + eo.getName());&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; boolean existsBefore = file.exists();&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; boolean existsAfter = false;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(!existsBefore){&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Perform Extract &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; eo.extractFile(location + eo.getName());&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; existsAfter = file.exists();&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Mark document as processed&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(existsAfter){&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; doc.appendItemValue(&quot;VCC_Upload&quot;, &quot;Y&quot;);&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; doc.appendItemValue(&quot;Upload_Time&quot;, new java.util.Date().toString());&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; doc.appendItemValue(&quot;UploadMessage&quot;, &quot;Upload Successful&quot;);&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; doc.save();&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } else {&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Mark document as unsuccessful&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; doc.appendItemValue(&quot;VCC_Upload&quot;, &quot;Y&quot;); //prevents document from being considered in future runnings&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; doc.appendItemValue(&quot;Failure_Time&quot;, new java.util.Date().toString());&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; doc.appendItemValue(&quot;UploadMessage&quot;, &quot;Extract Failed Due to file being extracted previously&quot;);&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; doc.save(); &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(!existsBefore &amp;amp;&amp;amp; !existsAfter){&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//Mark document as unsuccessful&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; doc.appendItemValue(&quot;VCC_Upload&quot;, &quot;N&quot;);&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; doc.appendItemValue(&quot;Failure_Time&quot;, new java.util.Date().toString());&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; doc.appendItemValue(&quot;UploadMessage&quot;, &quot;Extract Failed&quot;);&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; doc.save(); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Get next unprocessed document&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tempDoc = unprocessedCol.getNextDocument(doc);&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; doc.recycle();&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; doc = tempDoc;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; } catch(Exception e) {&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; e.printStackTrace();&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.3px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;ecxMsoNormal&quot; style=&quot;background-color: white; color: #444444; line-height: 21.3px; margin-bottom: 1.35em;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;background-color: white; color: #444444; line-height: 21.3px; margin-bottom: 1.35em;&quot;&gt;Conclusion&lt;/h3&gt;&lt;div class=&quot;ecxMsoNormal&quot; style=&quot;background-color: white; color: #444444; line-height: 21.3px; margin-bottom: 1.35em;&quot;&gt;I realize that this is a limited use case, and is certainly nothing cutting edge, but hopefully this is of use to someone or future me when they need it. &amp;nbsp;A big hat tip to Jesse Gallagher who pointed me in the right direction.&lt;/div&gt;</description><link>http://notesspeak.blogspot.com/2016/03/a-java-agent-which-extracts-file.html</link><author>[email protected] (The Zavocki&#39;s)</author><thr:total>2</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4805395909933518229.post-4733917686160635207</guid><pubDate>Sat, 06 Feb 2016 18:23:00 +0000</pubDate><atom:updated>2016-02-06T11:23:17.860-07:00</atom:updated><title>Thoughts on IBM Connect 2016</title><description>&lt;span style=&quot;font-family: inherit;&quot;&gt;Three days have passed since I returned home from IBM Connect in Orlando. This was my fourth ‘Sphere’ with my last being two years ago. This is my first time to attend as an IBM Champion! My overall impression was extremely positive. It certainly exceeded my expectations, and my expectations were pretty high.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;h3&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;My Goals for a Successful Conference&lt;/span&gt;&lt;/h3&gt;&lt;div&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;My personal goals were split into three equal parts:&lt;/span&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Spend time with existing friends/acquaintances as part of the finest software community in the world&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Network, network, network which overlaps with #1&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Increase my knowledge by attending technical sessions&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;h5&gt;&lt;span style=&quot;font-family: inherit; font-size: small;&quot;&gt;Community&lt;/span&gt;&lt;/h5&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;The community was out in force this year with just a few notable exceptions. The community we have really is something special, amazing really. I am tempted to list all the names of people I enjoyed seeing but don’t want to miss anyone. It was great to meet some people that I knew of but never met such as John Dalsgaard, Simon Peek, Greg Reeder, and Jeff Twardowski.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;I also really enjoyed spending time with my Navy Federal coworkers Ernie Javier and Blair Armeau. Prior to this, I had only known Blair via sametime so it was great to meet in person. To me now, they are friends, not just coworkers.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;When it was time to leave immediately after the closing session, I was tired and ready to see my family, but still it felt hard to leave such a group of amazing people.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;I would be remiss if I didn’t mention the people whose presence was missed. It would have been better with Marky Roden, David Leedy, Mike McGarel, Peter Presnell, Ulrich Krause, and Shean McManus.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;/span&gt; &lt;h5&gt;&lt;span style=&quot;font-family: inherit; font-size: small;&quot;&gt;Networking&lt;/span&gt;&lt;/h5&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Connect 2016 was also very productive for me on the networking front. At my current employer they don’t have any more XPages projects in the works so I have to decide whether to stay or go. This conference really gave me clarity for the future. I don’t know how things will play out, but I had some conversations that were very encouraging. Along those lines, if anyone reading this is looking for a developer with 20 years of total experience and 3.5 years of XPages then please reach out to me at [email protected]&lt;/span&gt;&lt;br /&gt;&lt;h5&gt;&lt;span style=&quot;font-family: inherit; font-size: small;&quot;&gt;Sessions&lt;/span&gt;&lt;/h5&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;The quality of sessions this year was definitely on par with past conferences. The topic that really surprised me this year was Bluemix. Although I had seen sessions on it before, the progress that the team has made was very impressive. It has definitely caught my attention.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;These were my favorite sessions:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;The XPages of Things: Integrate Bluemix into your XPages Applications for a World of Possibilities. I think that John Jardin blew everyone away with what he demonstrated in this session. For me, the relevance of BlueMix went way up with this session.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Get Hands-On with XPages Apps for Bluemix – Martin Donnelly and Brian Gleason gave more details on what Bluemix with plenty of demos. Because I previously had been inspired by John, this session has more meaning for me.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;The Grid, the Brad, and the Ugly: Using Grids to Improve Your Applications – This session by super champions Brad Balassaitis and Paul Calhoun was very informative and the audience was extremely engaged. Even though I had a fair amount of experience with the topic I certainly learn quite a bit.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Real-time Video Chat XPage Application using Websocket and WebTRC Technologies – first time attendee and hopefully future champion Csaba Kiss showed two methods of having a real time chat application inside of XPages. The material was comprehensive and he covered a lot, and certainly inspired the developer audience to think of ways to integrate this into new and existing applications.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Once You Go Graph… Nathan Freeman is obviously extremely passionate and knowledgeable on this topic. I had been wanting to see this session at MWLUG, but it was presented opposite of the one I was giving. I first heard of graph databases two years ago, the first and only time I met the late great Tim Tripcony. He was just as passionate on Graph database and spent a half hour explaining them to me. I like sessions that inspire you to want to learn more on your own.&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;h3&gt;&lt;br /&gt;&lt;/h3&gt;&lt;h3&gt;General Impressions&lt;/h3&gt;&lt;h3 style=&quot;font-size: medium; font-weight: normal;&quot;&gt;&lt;/h3&gt;&lt;h5&gt;&lt;span style=&quot;font-size: small;&quot;&gt;OGS&lt;/span&gt;&lt;/h5&gt;&lt;h3&gt;&lt;div&gt;&lt;span style=&quot;font-family: inherit; font-size: small; font-weight: normal;&quot;&gt;For the most part, I really liked the OGS, compared to past years it seems to take itself less seriously.&lt;/span&gt;&lt;/div&gt;&lt;/h3&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;I was very unimpressed with the guest speaker Jason Silva. I thought his message was intellectual cotton candy, and visually distracting. I was very impressed with the case study from West Africa on how an XPages application has helped improve fair trading between farmers and the middlemen who deliver the product to market.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;The drama where they showed the new products being used was funny and well done. It was obviously contrived and very staged, but that is to be expected with this type of demo. I thought the break in the middle was a good idea.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;h5&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Universal Studios&lt;/span&gt;&lt;/h5&gt;&lt;h3&gt;&lt;div style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Whenever I go on rides at parks like Universal, I get reminded that I am not a kid anymore. Even though I got queasy, I &amp;nbsp;enjoyed spending time with John Jardin, Andre Horak, and Paul Withers on the Harry Potter ride. The castle there is extremely impressive as were the animated paintings. After that John convinced me to ride the dragon coaster. It might have been the fastest coaster I ever went on. I would have liked to ride it again but the stomach would not allow.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/h3&gt;&lt;h5&gt;&lt;span style=&quot;font-size: small;&quot;&gt;The Venue&lt;/span&gt;&lt;/h5&gt;&lt;h3&gt;&lt;span style=&quot;font-family: inherit; font-size: small; font-weight: normal;&quot;&gt;I had no problem with the venue. I hope that they continue it there next year, although nothing was announced. I like the fact that I could stay nearby at the Days Inn which was only a five minute walk. This year I am paying my own way to be at the conference so having reasonably priced hotel and food options nearby is a huge plus. When we were on Disney property, we had none of that. News like &lt;a href=&quot;http://www.nytimes.com/2015/06/04/us/last-task-after-layoff-at-disney-train-foreign-replacements.html&quot; target=&quot;_blank&quot;&gt;this &lt;/a&gt;doesn’t make we want to spend money on the mouse, even if they backtracked later due to public pressure.&amp;nbsp;&lt;/span&gt;&lt;/h3&gt;&lt;h5&gt;&lt;span style=&quot;font-size: small;&quot;&gt;An Apology&lt;/span&gt;&lt;/h5&gt;&lt;h3&gt;&lt;div style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: inherit; font-size: small;&quot;&gt;I feel the need to apologize for my awful cough which I am sure was annoying to those sitting around me. I know that I was a distraction and I appreciate that everyone seemed to be understanding.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-size: medium; font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/h3&gt;&lt;h3&gt;Final Thoughts&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;font-size: medium; font-weight: normal;&quot;&gt;&lt;/h3&gt;&lt;h3&gt;&lt;div style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: inherit; font-size: small;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;Overall, I felt a very positive vibe from those around me. It was encouraging to see many first time attendees, as well as some very engaged younger developers. The conference is alive and well, and I hope IBM does &lt;/span&gt;nothing radical&lt;span style=&quot;font-weight: normal;&quot;&gt; to change that next year.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: inherit; font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;font-weight: normal; margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://3.bp.blogspot.com/-5L2CubWnYPI/VrY4v8Cc-TI/AAAAAAAAHpk/7P-0BTwMdqg/s1600/IMAG1675%255B1%255D.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;362&quot; src=&quot;https://3.bp.blogspot.com/-5L2CubWnYPI/VrY4v8Cc-TI/AAAAAAAAHpk/7P-0BTwMdqg/s640/IMAG1675%255B1%255D.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif; font-size: small;&quot;&gt;It was an big honor to have my photo on the big screen before the OGS&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/h3&gt;</description><link>http://notesspeak.blogspot.com/2016/02/thoughts-on-ibm-connect-2016.html</link><author>[email protected] (The Zavocki&#39;s)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://3.bp.blogspot.com/-5L2CubWnYPI/VrY4v8Cc-TI/AAAAAAAAHpk/7P-0BTwMdqg/s72-c/IMAG1675%255B1%255D.jpg" height="72" width="72"/><thr:total>5</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4805395909933518229.post-7713711203039261354</guid><pubDate>Thu, 21 Jan 2016 03:30:00 +0000</pubDate><atom:updated>2016-01-20T20:30:53.434-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">education</category><title>Looking Forward to IBM Connect 2016</title><description>In less than two weeks I am excited to attend IBM Connect 2016 in Orlando. It is now a full twenty years that I have worked in the yellow bubble. &amp;nbsp;I was just a newbie when I attended my first Lotusphere in 1996. I went again in 1999, and then not again for another fifthteen years until 2014. This will be my fourth time.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;As is always the case, there are many great sessions this year. The sessions are only part of what makes the conference great, the other part is the people you meet.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3&gt;These are my top 5 sessions that I am most looking forward to attending.&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;1) Real-Time Video Chat XPage Application Using Websockets and WebRTC Technologies&lt;/b&gt;: &amp;nbsp;This seems like a fascinating session and I am excited to hear from Csaba Kiss who I met at MWLUG this past August.&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;2) Optimus XPages: An Explosion of Techniques and Best Practices:&lt;/b&gt; I am excited to see my friend John Jardin again. He is a dynamic speaker with a passion to share knowledge.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;3) The Grid, the Brad, and the Ugly: Using Grids to Improve Your Applications: &lt;/b&gt;&amp;nbsp;Brad Balassaitis&#39;s blog has been a huge help to nearly every XPages developer. It will be great to hear his latest take on the grid choices that we have now.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;4) &#39;Marty, You&#39;re Just Not Thinking Fourth Dimensionally&#39;: Troubleshooting XPages:&lt;/b&gt; Paul Withers is a brilliant developer and I am really looking forward to his session.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;5) Outside the Box: Integrating with Non-Domino Apps Using XPages and Java:&lt;/b&gt; This is an area where I have quite a bit of recent experience. It will be great to hear what Julian Robichaux and Kathy Brown have to say on the subject.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;There are many other sessions I am looking forward to as well. &amp;nbsp;If you are still considering whether to attend the conference this year it is not too late. The nice thing this year about being off Disney property is that there are several nearby hotels within walking distance that have very reasonable prices. &amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3&gt;Thank You, Thank You, Thank You&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I also have unfinished business in thanking those who nominated me for IBM Champion. It is a great honor to have been chosen this year. I want to specifically thank Mark Roden who told me 2 years ago that I could be a champion. I didn&#39;t know what to think at the time, but that confidence did motivate and encourage me,&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</description><link>http://notesspeak.blogspot.com/2016/01/looking-forward-to-ibm-connect-2016.html</link><author>[email protected] (The Zavocki&#39;s)</author><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4805395909933518229.post-4154602742614334692</guid><pubDate>Tue, 17 Nov 2015 12:26:00 +0000</pubDate><atom:updated>2015-11-17T05:26:23.844-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">javascript</category><category domain="http://www.blogger.com/atom/ns#">xpages</category><title>Limiting Keyboard Input in XPages</title><description>&lt;span style=&quot;font-family: inherit;&quot;&gt;One way to make your validation easier is limit the types of characters allowed in a specific input field. For example, if you have a numeric field you simply don’t allow the user to type a letter in that field. If you know that an email address cannot contain special characters, you can simply prevent the user from typing those special characters. I would caution that if using this technique for public facing applications, that the use of tooltips or helper text be considered.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Last Thursday I was told that in my application, the field was allowing the entry of numbers from the main keyboard but not the numeric keypad. I discovered that the behavior of the dojo combobox differs from that of the core controls. &lt;b&gt;In this post, I will explain the usage of the keypress event in general, and then explain how to use it with a dojo combobox.&lt;/b&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Before I begin, I have to laugh at the irony of this new Stack Overflow question (&lt;a href=&quot;http://stackoverflow.com/questions/33680515/how-to-prevent-special-characters-input-into-edit-box&quot;&gt;http://stackoverflow.com/questions/33680515/how-to-prevent-special-characters-input-into-edit-box&lt;/a&gt;) about this very subject that appeared a few hours after working on this. Amazingly no one had answered it by the time I saw it, and of course it was fresh on my mind, so I answered it with what I was already going to put in this new blog post.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;h3&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Keyboard Events&lt;/span&gt;&lt;/h3&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;There are three key events that you can use. The onkeypress, and the okeydown, and the onkeyup. As the name implies these are keyboard events. In XPages you can assign client and/or server code to each. I would strongly caution for performance reasons against doing anything serverside that is more complicated then setting a scoped variable. The code that we want to use to limit certain keys is all &lt;b&gt;clientside&lt;/b&gt; javascript.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;h3&gt;Usage in an Edit Control&lt;/h3&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;http://3.bp.blogspot.com/-vD84LjqFLPA/VksZj8kz9PI/AAAAAAAAHpI/Zco0slY9WIg/s1600/Capture11-12.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;234&quot; src=&quot;http://3.bp.blogspot.com/-vD84LjqFLPA/VksZj8kz9PI/AAAAAAAAHpI/Zco0slY9WIg/s640/Capture11-12.PNG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This code shown here will only allow numbers and the backspace key. In XPages, if applied to a core control, this also allows the numeric keyboard to work even though it uses different keycodes. The&lt;br /&gt;keycodes for the numeric keyboard are 96-105. For an edit box the only event you need is the onKeyPress.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Usage in a Dojo Combobox&lt;/h3&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;One of the nice features of the dojo combobox is that you can choose from the list or type in a value. You also get built in type ahead. The key events work differently in two specific ways though. If you just use the onkeypress event, then if the user types really fast they can bypass the event and type an unwanted character. These are the types of things the quality assurance people are happy to point out to you. The way to prevent this behavior is to put the code in both the onkeydown and onkeyup events.&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;http://2.bp.blogspot.com/-mxprdMxrm8k/VksaIyQerLI/AAAAAAAAHpQ/7mvvAY6wiVE/s1600/Capture11-13.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;204&quot; src=&quot;http://2.bp.blogspot.com/-mxprdMxrm8k/VksaIyQerLI/AAAAAAAAHpQ/7mvvAY6wiVE/s640/Capture11-13.PNG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3&gt;How to selectively include or exclude any key&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;My example above on specifically includes numbers, your needs may differ. You can use &lt;a href=&quot;http://keycode.info/&quot;&gt;http://keycode.info/&lt;/a&gt; to easily figure out any keycode. Modify the code below to meet your specific requirements. This example only allows letters, numbers, backspace, and delete.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;var keyCode = event.keyCode;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;if((keyCode &amp;gt;= 48 &amp;amp;&amp;amp; keyCode &amp;lt;= 57) || (keyCode &amp;gt;= 65 &amp;amp;&amp;amp; keyCode &amp;lt;= 90)|| keyCode == 8 || keyCode == 46){&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp;event.returnValue = true;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;}else{&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp;event.returnValue = false;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;</description><link>http://notesspeak.blogspot.com/2015/11/limiting-keyboard-input-in-xpages.html</link><author>[email protected] (The Zavocki&#39;s)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-vD84LjqFLPA/VksZj8kz9PI/AAAAAAAAHpI/Zco0slY9WIg/s72-c/Capture11-12.PNG" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4805395909933518229.post-3593510341950584027</guid><pubDate>Thu, 01 Oct 2015 10:38:00 +0000</pubDate><atom:updated>2015-10-01T04:38:08.396-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Java</category><category domain="http://www.blogger.com/atom/ns#">xpages</category><title>Creating JSON objects in Java using the JSON.simple toolkit</title><description>&lt;span style=&quot;font-family: inherit;&quot;&gt;I needed a way to create JSON objects in Java for displaying in a grid. There are several options for doing this that I could have chosen. There is GSON from Google, or I could roll my own using StringBuilder. After doing some research, I decided to use the JSON.simple toolkit because, the examples looked simple and straightforward to me. &amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;In this post, I will explain how I used JSON.simple and give two real life examples.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;  &lt;br /&gt;&lt;h3&gt;Installation&lt;/h3&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;To use JSON.simple you need to download the jar and add to your build path. The jar is available here: &lt;a href=&quot;https://code.google.com/p/json-simple/&quot;&gt;https://code.google.com/p/json-simple/&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;h3&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Creating a Single Object&lt;/span&gt;&lt;/h3&gt;&lt;div&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;In this snippet, contents of a NotesDocument are added to a JSON object and then that object is passed back to the caller of the method. &lt;i&gt;Note this example uses the Name class from the original Notes,jar to format the Notes name. It is the java version of @Name.&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #741b47; font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #351c75; font-family: Courier New, Courier, monospace;&quot;&gt;Document doc = col.getFirstDocument();&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #351c75; font-family: Courier New, Courier, monospace;&quot;&gt;JSONObject json = new JSONObject();&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #351c75; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #351c75; font-family: Courier New, Courier, monospace;&quot;&gt;if(doc != null){&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #351c75; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp;Name name = session.createName(doc.getItemValueString(&quot;EmployeeName&quot;));&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #351c75; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp;json.put(&quot;employeeName&quot;, name.getCommon());&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #351c75; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp;json.put(&quot;employeeID&quot;, doc.getItemValueString(&quot;EmployeeID&quot;));&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #351c75; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp;json.put(&quot;employeeLocation&quot;, doc.getItemValueString(&quot;locationdesc&quot;));&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #351c75; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp;json.put(&quot;employeeRole&quot;, getEmployeeRole(name.getCommon()));&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #351c75; font-family: Courier New, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #351c75; font-family: Courier New, Courier, monospace;&quot;&gt;returnValue = json.toJSONString();&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #351c75; font-family: Courier New, Courier, monospace;&quot;&gt;...&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #351c75; font-family: Courier New, Courier, monospace;&quot;&gt;return returnValue;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;The result will look something like this:&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: purple; font-family: Arial, Helvetica, sans-serif;&quot;&gt;{&quot;employeeLocation&quot;:&quot;Pensacola Milton&quot;,&quot;employeeRole&quot;:&quot;Intern to the Intern&quot;,&quot;employeeID&quot;:&quot;12345&quot;,&quot;employeeName&quot;:&quot;Dwain Wuerfel&quot;}&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: purple; font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;  &lt;br /&gt;&lt;h3&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Creating a Collection of Objects&lt;/span&gt;&lt;/h3&gt;&lt;div&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;In this snippet, the contents of a multi-value document are traversed and a JSON object is created for each item. Many will recognize that I am grabbing the members of a Name &amp;amp; Address Book group. For each member I create a new object and then that object is added to a JSONArray object called ‘result’ which is then returned to the calling method. Each object will be a displayed on a separate row in the grid.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #351c75; font-family: Courier New, Courier, monospace;&quot;&gt;JSONArray result = new JSONArray();&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #351c75; font-family: Courier New, Courier, monospace;&quot;&gt;if(nabDoc != null){&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #351c75; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp;Item item = nabDoc.getFirstItem(&quot;Members&quot;);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;&amp;nbsp; &amp;nbsp;Vector&amp;lt;String&amp;gt; v = item.getValues();&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: #351c75;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #351c75; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp;for(String person : v){&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #351c75; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp;Name name = session.createName(person);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #351c75; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp;JSONObject json = new JSONObject();&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #351c75; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp;json.put(&quot;employeeName&quot;, name.getCommon());&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #351c75; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp;json.put(&quot;employeeRole&quot;, employeeRole);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #351c75; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp;json.put(&quot;employeeID&quot;, EmployeeID);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #351c75; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp;json.put(&quot;employeeLocation&quot;, EmployeeLocation);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #351c75; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp;result.add(json);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #351c75; font-family: Courier New, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #351c75; font-family: Courier New, Courier, monospace;&quot;&gt;returnValue = result.toJSONString();&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #351c75; font-family: Courier New, Courier, monospace;&quot;&gt;...&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #351c75; font-family: Courier New, Courier, monospace;&quot;&gt;return returnValue;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;The result will look like this if there are three JSON objects in the array:&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: purple; font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;[{&quot;employeeLocation&quot;:&quot;Pensacola Milton&quot;,&quot;employeeRole&quot;:[&quot;Minion&quot;],&quot;employeeID&quot;:&quot;12345&quot;,&quot;employeeName&quot;:&quot;Dwain Wuerfel&quot;}, {&quot;employeeLocation&quot;:&quot;Pensacola Milton&quot;,&quot;employeeRole&quot;:[&quot;Blog Author&quot;],&quot;employeeID&quot;:&quot;91984&quot;,&quot;employeeName&quot;:&quot;Steve Zavocki&quot;},{&quot;employeeLocation&quot;:&quot;Pensacola Milton&quot;,&quot;employeeRole&quot;:[&quot;Cast Member&quot;],&quot;employeeID&quot;:&quot;54321&quot;,&quot;employeeName&quot;:&quot;Vernon Miles&quot;}]&lt;/span&gt;&lt;span style=&quot;background-color: white; line-height: 21.3px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Conclusion&lt;/h3&gt;&lt;div&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;As the name implies the JSON.simple toolkit is simple to use, and a good option to consider if you need to create JSON objects within your java code. In case you are interested in learning more about your other options, &lt;a href=&quot;http://blog.takipi.com/the-ultimate-json-library-json-simple-vs-gson-vs-jackson-vs-json/&quot; target=&quot;_blank&quot;&gt;here is an article&lt;/a&gt; that compares three different json toolkits including JSON.simple.&lt;/span&gt;</description><link>http://notesspeak.blogspot.com/2015/10/creating-json-objects-in-java-using.html</link><author>[email protected] (The Zavocki&#39;s)</author><thr:total>10</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4805395909933518229.post-739191097540270839</guid><pubDate>Tue, 22 Sep 2015 00:55:00 +0000</pubDate><atom:updated>2015-09-22T19:09:05.524-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Java</category><category domain="http://www.blogger.com/atom/ns#">xpages</category><title>Sorting a Java ArrayList of SelectItem Objects</title><description>Recently I had a task where I needed to read all the names from several groups in the Name &amp;amp; Address Book. &amp;nbsp;I needed to get all the names sorted and unique for presenting in a Combobox.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;In this post, I will show you how I did this, but more importantly I will show how I used the Java Collections Framework to my advantage.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;In case you aren’t aware, the SelectItem object is the object type that Java Server Faces (thereby XPages) uses for the values of a Combo Box. It contains a value and a label, of which the label is what is shown and the value is what is saved.&lt;br /&gt;&lt;br /&gt;Because the SelectItem does not implement the Comparator interface, you cannot easily sort an ArrayList of SelectItems. You could write your own sorting method if you like using the instructions outlined in &lt;a href=&quot;http://blog.moes.as/2008/07/easy-sort-of-list-of-selectitems.html&quot; target=&quot;_blank&quot;&gt;this blog post.&lt;/a&gt; I considered this but then thought of an easier way to accomplish the same thing.&lt;br /&gt;&lt;br /&gt;Here is what I did to solve this: Instead of creating just an ArrayList of SelectItems, I also created one of Strings. Strings of course are easily sortable since the String class does implement Comparator interface. Prior to sorting the list, I need to removed duplicates. To do this, I first create a HashSet and assign the values to it. A &lt;a href=&quot;https://docs.oracle.com/javase/tutorial/collections/interfaces/set.html&quot; target=&quot;_blank&quot;&gt;Set&lt;/a&gt; in java does not allow duplicates, so assigning all the values to the HashSet was the easiest way to remove the dupes. After this is done, I assign all the values back into the ArrayList and then sort the list. I then create an SelectItem ArrayList with the unique sorted values.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Note: This would be a lot more complicated if I needed my SelectItem object to have different Strings for Label and Value. I would probably use a HashMap instead of an ArrayList&amp;lt;String&amp;gt; if this was the case.&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Code Example&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;OutlineElement Ltr SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: white; clear: both; cursor: text; direction: ltr; font-family: &#39;Segoe UI&#39;, Tahoma, Verdana, sans-serif; margin: 0px; overflow: visible; padding: 0px; position: relative;&quot;&gt;&lt;div class=&quot;Paragraph SCX152143174&quot; paraeid=&quot;{229e9aa5-05e0-46ed-ba7a-595af1628244}{198}&quot; paraid=&quot;878908516&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: windowtext; padding: 0px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; color: #7f0055; font-family: &#39;Courier New&#39;, monospace; font-weight: bold; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;public&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;&amp;nbsp;List&amp;lt;&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;SelectItem&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;getUserList&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;(String schema){&lt;/span&gt;&lt;span class=&quot;EOP SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;OutlineElement Ltr SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: white; clear: both; cursor: text; direction: ltr; margin: 0px; overflow: visible; padding: 0px; position: relative;&quot;&gt;&lt;div class=&quot;Paragraph SCX152143174&quot; paraeid=&quot;{229e9aa5-05e0-46ed-ba7a-595af1628244}{208}&quot; paraid=&quot;1653290923&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: windowtext; padding: 0px; text-indent: 48px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;span style=&quot;color: blue; font-weight: bold; line-height: 18.2px;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: blue; font-weight: bold; line-height: 18.2px;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier New, monospace;&quot;&gt;List&amp;lt;String&amp;gt; options =&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; color: #7f0055; font-family: &#39;Courier New&#39;, monospace; font-weight: bold; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;ArrayList&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;&amp;lt;String&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;&amp;gt;(&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;EOP SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;OutlineElement Ltr SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: white; clear: both; cursor: text; direction: ltr; font-family: &#39;Segoe UI&#39;, Tahoma, Verdana, sans-serif; margin: 0px; overflow: visible; padding: 0px; position: relative;&quot;&gt;&lt;div class=&quot;Paragraph SCX152143174&quot; paraeid=&quot;{229e9aa5-05e0-46ed-ba7a-595af1628244}{223}&quot; paraid=&quot;677555538&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: windowtext; padding: 0px; text-indent: 48px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;List&amp;lt;&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;SelectItem&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;sortedOptions&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;&amp;nbsp;=&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; color: #7f0055; font-family: &#39;Courier New&#39;, monospace; font-weight: bold; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;ArrayList&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;SelectItem&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;&amp;gt;(&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;Paragraph SCX152143174&quot; paraeid=&quot;{229e9aa5-05e0-46ed-ba7a-595af1628244}{223}&quot; paraid=&quot;677555538&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: windowtext; padding: 0px; text-indent: 48px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: #7f0055; font-family: &#39;Courier New&#39;, monospace; font-weight: bold; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;Paragraph SCX152143174&quot; paraeid=&quot;{229e9aa5-05e0-46ed-ba7a-595af1628244}{223}&quot; paraid=&quot;677555538&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: windowtext; padding: 0px; text-indent: 48px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: #7f0055; font-family: &#39;Courier New&#39;, monospace; font-weight: bold; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;try&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: windowtext; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;&amp;nbsp;{&lt;/span&gt;&lt;span class=&quot;EOP SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: windowtext; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;OutlineElement Ltr SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: white; clear: both; cursor: text; direction: ltr; font-family: &#39;Segoe UI&#39;, Tahoma, Verdana, sans-serif; margin: 0px; overflow: visible; padding: 0px; position: relative;&quot;&gt;&lt;div class=&quot;Paragraph SCX152143174&quot; paraeid=&quot;{229e9aa5-05e0-46ed-ba7a-595af1628244}{231}&quot; paraid=&quot;1510048786&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: windowtext; padding: 0px; text-indent: 48px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: windowtext; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px; text-indent: 96px;&quot; xml:lang=&quot;EN-US&quot;&gt;&amp;nbsp; Session&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: windowtext; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px; text-indent: 96px;&quot; xml:lang=&quot;EN-US&quot;&gt;&lt;span class=&quot;SpellingError SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: inherit; background-image: url(data:image/gif; background-position: 0% 100%; background-repeat: repeat-x; border-bottom-color: transparent; border-bottom-style: solid; border-bottom-width: 1px; margin: 0px; padding: 0px;&quot;&gt;session&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: windowtext; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px; text-indent: 96px;&quot; xml:lang=&quot;EN-US&quot;&gt;&amp;nbsp;=&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: windowtext; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px; text-indent: 96px;&quot; xml:lang=&quot;EN-US&quot;&gt;getCurrentSession&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: windowtext; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px; text-indent: 96px;&quot; xml:lang=&quot;EN-US&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: windowtext; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px; text-indent: 96px;&quot; xml:lang=&quot;EN-US&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;EOP SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: windowtext; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px; text-indent: 96px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;Paragraph SCX152143174&quot; paraeid=&quot;{229e9aa5-05e0-46ed-ba7a-595af1628244}{231}&quot; paraid=&quot;1510048786&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: windowtext; padding: 0px; text-indent: 48px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: windowtext; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px; text-indent: 96px;&quot; xml:lang=&quot;EN-US&quot;&gt;&amp;nbsp; Database nab =&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: windowtext; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px; text-indent: 96px;&quot; xml:lang=&quot;EN-US&quot;&gt;session.getDatabase&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: windowtext; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px; text-indent: 96px;&quot; xml:lang=&quot;EN-US&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: windowtext; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px; text-indent: 96px;&quot; xml:lang=&quot;EN-US&quot;&gt;session.getCurrentDatabase&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: windowtext; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px; text-indent: 96px;&quot; xml:lang=&quot;EN-US&quot;&gt;().&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: windowtext; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px; text-indent: 96px;&quot; xml:lang=&quot;EN-US&quot;&gt;getServer&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: windowtext; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px; text-indent: 96px;&quot; xml:lang=&quot;EN-US&quot;&gt;(),&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: #2a00ff; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px; text-indent: 96px;&quot; xml:lang=&quot;EN-US&quot;&gt;&quot;names&quot;&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: windowtext; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px; text-indent: 96px;&quot; xml:lang=&quot;EN-US&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;OutlineElement Ltr SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: white; clear: both; cursor: text; direction: ltr; font-family: &#39;Segoe UI&#39;, Tahoma, Verdana, sans-serif; margin: 0px; overflow: visible; padding: 0px; position: relative;&quot;&gt;&lt;div class=&quot;Paragraph SCX152143174&quot; paraeid=&quot;{56751e44-74a0-41d5-814e-fe7156f4e7c4}{3}&quot; paraid=&quot;841568188&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: windowtext; padding: 0px; text-indent: 144px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;OutlineElement Ltr SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: white; clear: both; cursor: text; direction: ltr; font-family: &#39;Segoe UI&#39;, Tahoma, Verdana, sans-serif; margin: 0px; overflow: visible; padding: 0px; position: relative;&quot;&gt;&lt;div class=&quot;Paragraph SCX152143174&quot; paraeid=&quot;{56751e44-74a0-41d5-814e-fe7156f4e7c4}{10}&quot; paraid=&quot;1628602048&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: windowtext; padding: 0px; text-indent: 48px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; color: #7f0055; font-family: &#39;Courier New&#39;, monospace; font-weight: bold; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;if&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;&lt;span class=&quot;NormalTextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: inherit; margin: 0px; padding: 0px;&quot;&gt;nab.&lt;/span&gt;&lt;span class=&quot;SpellingError SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: inherit; background-image: url(data:image/gif; background-position: 0% 100%; background-repeat: repeat-x; border-bottom-color: transparent; border-bottom-style: solid; border-bottom-width: 1px; margin: 0px; padding: 0px;&quot;&gt;isOpen&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;()) {&lt;/span&gt;&lt;span class=&quot;EOP SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;OutlineElement Ltr SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: white; clear: both; cursor: text; direction: ltr; font-family: &#39;Segoe UI&#39;, Tahoma, Verdana, sans-serif; margin: 0px; overflow: visible; padding: 0px; position: relative;&quot;&gt;&lt;div class=&quot;Paragraph SCX152143174&quot; paraeid=&quot;{56751e44-74a0-41d5-814e-fe7156f4e7c4}{20}&quot; paraid=&quot;786928497&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: windowtext; padding: 0px; text-indent: 96px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;View&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;&lt;span class=&quot;SpellingError SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: inherit; background-image: url(data:image/gif; background-position: 0% 100%; background-repeat: repeat-x; border-bottom-color: transparent; border-bottom-style: solid; border-bottom-width: 1px; margin: 0px; padding: 0px;&quot;&gt;view&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;&amp;nbsp;=&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;nab.getView&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; color: #2a00ff; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;&quot;Groups&quot;&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;EOP SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;OutlineElement Ltr SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: white; clear: both; cursor: text; direction: ltr; font-family: &#39;Segoe UI&#39;, Tahoma, Verdana, sans-serif; margin: 0px; overflow: visible; padding: 0px; position: relative;&quot;&gt;&lt;div class=&quot;Paragraph SCX152143174&quot; paraeid=&quot;{56751e44-74a0-41d5-814e-fe7156f4e7c4}{27}&quot; paraid=&quot;1200987108&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: windowtext; padding: 0px; text-indent: 96px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; color: #7f0055; font-family: &#39;Courier New&#39;, monospace; font-weight: bold; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;&amp;nbsp;(view !=&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; color: #7f0055; font-family: &#39;Courier New&#39;, monospace; font-weight: bold; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;null&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;) {&lt;/span&gt;&lt;span class=&quot;EOP SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;OutlineElement Ltr SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: white; clear: both; cursor: text; direction: ltr; font-family: &#39;Segoe UI&#39;, Tahoma, Verdana, sans-serif; margin: 0px; overflow: visible; padding: 0px; position: relative;&quot;&gt;&lt;div class=&quot;Paragraph SCX152143174&quot; paraeid=&quot;{56751e44-74a0-41d5-814e-fe7156f4e7c4}{39}&quot; paraid=&quot;460921408&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: windowtext; padding: 0px; text-indent: 144px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;Document doc =&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;view.getDocumentByKey&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; color: #2a00ff; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; color: #2a00ff; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;Group 1&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; color: #2a00ff; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; color: #7f0055; font-family: &#39;Courier New&#39;, monospace; font-weight: bold; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;EOP SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;Paragraph SCX152143174&quot; paraeid=&quot;{56751e44-74a0-41d5-814e-fe7156f4e7c4}{39}&quot; paraid=&quot;460921408&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: windowtext; padding: 0px; text-indent: 144px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: #7f0055; font-family: &#39;Courier New&#39;, monospace; font-weight: bold; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: windowtext; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;&amp;nbsp;(doc !=&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: #7f0055; font-family: &#39;Courier New&#39;, monospace; font-weight: bold; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;null&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: windowtext; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;) {&lt;/span&gt;&lt;span class=&quot;EOP SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: windowtext; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;OutlineElement Ltr SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: white; clear: both; cursor: text; direction: ltr; font-family: &#39;Segoe UI&#39;, Tahoma, Verdana, sans-serif; margin: 0px; overflow: visible; padding: 0px; position: relative;&quot;&gt;&lt;div class=&quot;Paragraph SCX152143174&quot; paraeid=&quot;{56751e44-74a0-41d5-814e-fe7156f4e7c4}{56}&quot; paraid=&quot;792765710&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: windowtext; padding: 0px; text-indent: 192px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;Item&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;&lt;span class=&quot;SpellingError SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: inherit; background-image: url(data:image/gif; background-position: 0% 100%; background-repeat: repeat-x; border-bottom-color: transparent; border-bottom-style: solid; border-bottom-width: 1px; margin: 0px; padding: 0px;&quot;&gt;item&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;&amp;nbsp;=&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;doc.getFirstItem&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; color: #2a00ff; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;&quot;Members&quot;&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;EOP SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;OutlineElement Ltr SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: white; clear: both; cursor: text; direction: ltr; font-family: &#39;Segoe UI&#39;, Tahoma, Verdana, sans-serif; margin: 0px; overflow: visible; padding: 0px; position: relative;&quot;&gt;&lt;div class=&quot;Paragraph SCX152143174&quot; paraeid=&quot;{56751e44-74a0-41d5-814e-fe7156f4e7c4}{63}&quot; paraid=&quot;1603065147&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: windowtext; padding: 0px; text-indent: 192px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Trebuchet MS&#39;, sans-serif; font-weight: bold; line-height: 18.2px; text-indent: 48px;&quot;&gt;2&amp;nbsp;&lt;/span&gt;Vector&amp;lt;String&amp;gt; v =&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;item.getValues&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;EOP SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;OutlineElement Ltr SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: white; clear: both; cursor: text; direction: ltr; font-family: &#39;Segoe UI&#39;, Tahoma, Verdana, sans-serif; margin: 0px; overflow: visible; padding: 0px; position: relative;&quot;&gt;&lt;div class=&quot;Paragraph SCX152143174&quot; paraeid=&quot;{56751e44-74a0-41d5-814e-fe7156f4e7c4}{69}&quot; paraid=&quot;1810585851&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: windowtext; padding: 0px; text-indent: 192px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; color: #7f0055; font-family: &#39;Courier New&#39;, monospace; font-weight: bold; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;for&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;String person : v){&lt;/span&gt;&lt;span class=&quot;EOP SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;OutlineElement Ltr SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: white; clear: both; cursor: text; direction: ltr; font-family: &#39;Segoe UI&#39;, Tahoma, Verdana, sans-serif; margin: 0px; overflow: visible; padding: 0px; position: relative;&quot;&gt;&lt;div class=&quot;Paragraph SCX152143174&quot; paraeid=&quot;{56751e44-74a0-41d5-814e-fe7156f4e7c4}{82}&quot; paraid=&quot;2084019101&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: windowtext; padding: 0px; text-indent: 240px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Trebuchet MS&#39;, sans-serif; font-weight: bold; line-height: 18.2px; text-indent: 48px;&quot;&gt;3&amp;nbsp;&lt;/span&gt;Name&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;&lt;span class=&quot;SpellingError SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: inherit; background-image: url(data:image/gif; background-position: 0% 100%; background-repeat: repeat-x; border-bottom-color: transparent; border-bottom-style: solid; border-bottom-width: 1px; margin: 0px; padding: 0px;&quot;&gt;name&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;&amp;nbsp;=&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;session.createName&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;person);&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;options.add&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;&lt;span class=&quot;NormalTextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: inherit; margin: 0px; padding: 0px;&quot;&gt;name.&lt;/span&gt;&lt;span class=&quot;SpellingError SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: inherit; background-image: url(data:image/gif; background-position: 0% 100%; background-repeat: repeat-x; border-bottom-color: transparent; border-bottom-style: solid; border-bottom-width: 1px; margin: 0px; padding: 0px;&quot;&gt;getCommon&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;());&lt;/span&gt;&lt;span class=&quot;EOP SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;OutlineElement Ltr SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: white; clear: both; cursor: text; direction: ltr; font-family: &#39;Segoe UI&#39;, Tahoma, Verdana, sans-serif; margin: 0px; overflow: visible; padding: 0px; position: relative;&quot;&gt;&lt;div class=&quot;Paragraph SCX152143174&quot; paraeid=&quot;{56751e44-74a0-41d5-814e-fe7156f4e7c4}{86}&quot; paraid=&quot;1985873280&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: windowtext; padding: 0px; text-indent: 192px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;EOP SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;OutlineElement Ltr SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: white; clear: both; cursor: text; direction: ltr; font-family: &#39;Segoe UI&#39;, Tahoma, Verdana, sans-serif; margin: 0px; overflow: visible; padding: 0px; position: relative;&quot;&gt;&lt;div class=&quot;Paragraph SCX152143174&quot; paraeid=&quot;{56751e44-74a0-41d5-814e-fe7156f4e7c4}{92}&quot; paraid=&quot;148672264&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: windowtext; padding: 0px; text-indent: 192px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;doc.recycle&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;EOP SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;OutlineElement Ltr SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: white; clear: both; cursor: text; direction: ltr; font-family: &#39;Segoe UI&#39;, Tahoma, Verdana, sans-serif; margin: 0px; overflow: visible; padding: 0px; position: relative;&quot;&gt;&lt;div class=&quot;Paragraph SCX152143174&quot; paraeid=&quot;{56751e44-74a0-41d5-814e-fe7156f4e7c4}{98}&quot; paraid=&quot;1109101072&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: windowtext; padding: 0px; text-indent: 192px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;item.recycle&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;EOP SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;OutlineElement Ltr SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: white; clear: both; cursor: text; direction: ltr; font-family: &#39;Segoe UI&#39;, Tahoma, Verdana, sans-serif; margin: 0px; overflow: visible; padding: 0px; position: relative;&quot;&gt;&lt;div class=&quot;Paragraph SCX152143174&quot; paraeid=&quot;{56751e44-74a0-41d5-814e-fe7156f4e7c4}{104}&quot; paraid=&quot;556345679&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: windowtext; padding: 0px; text-indent: 192px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;}&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; color: #7f0055; font-family: &#39;Courier New&#39;, monospace; font-weight: bold; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;else&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;&amp;nbsp;{&lt;/span&gt;&lt;span class=&quot;EOP SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;OutlineElement Ltr SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: white; clear: both; cursor: text; direction: ltr; font-family: &#39;Segoe UI&#39;, Tahoma, Verdana, sans-serif; margin: 0px; overflow: visible; padding: 0px; position: relative;&quot;&gt;&lt;div class=&quot;Paragraph SCX152143174&quot; paraeid=&quot;{56751e44-74a0-41d5-814e-fe7156f4e7c4}{116}&quot; paraid=&quot;1670630745&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: windowtext; padding: 0px; text-indent: 192px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;log.error&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; color: #2a00ff; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; color: #2a00ff; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;Group 1 cannot be opened&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; color: #2a00ff; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;.&quot;&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;EOP SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;OutlineElement Ltr SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: white; clear: both; cursor: text; direction: ltr; font-family: &#39;Segoe UI&#39;, Tahoma, Verdana, sans-serif; margin: 0px; overflow: visible; padding: 0px; position: relative;&quot;&gt;&lt;div class=&quot;Paragraph SCX152143174&quot; paraeid=&quot;{56751e44-74a0-41d5-814e-fe7156f4e7c4}{120}&quot; paraid=&quot;1593711441&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: windowtext; padding: 0px; text-indent: 240px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;EOP SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;OutlineElement Ltr SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: white; clear: both; cursor: text; direction: ltr; font-family: &#39;Segoe UI&#39;, Tahoma, Verdana, sans-serif; margin: 0px; overflow: visible; padding: 0px; position: relative;&quot;&gt;&lt;div class=&quot;Paragraph SCX152143174&quot; paraeid=&quot;{56751e44-74a0-41d5-814e-fe7156f4e7c4}{133}&quot; paraid=&quot;1925424607&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: windowtext; padding: 0px; text-indent: 144px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;doc&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;&amp;nbsp;=&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;view.getDocumentByKey&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; color: #2a00ff; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; color: #2a00ff; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;Group 2&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; color: #2a00ff; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; color: #7f0055; font-family: &#39;Courier New&#39;, monospace; font-weight: bold; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;EOP SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;OutlineElement Ltr SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: white; clear: both; cursor: text; direction: ltr; font-family: &#39;Segoe UI&#39;, Tahoma, Verdana, sans-serif; margin: 0px; overflow: visible; padding: 0px; position: relative;&quot;&gt;&lt;div class=&quot;Paragraph SCX152143174&quot; paraeid=&quot;{56751e44-74a0-41d5-814e-fe7156f4e7c4}{140}&quot; paraid=&quot;341940143&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: windowtext; padding: 0px; text-indent: 96px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; color: #7f0055; font-family: &#39;Courier New&#39;, monospace; font-weight: bold; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;&amp;nbsp;(doc !=&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; color: #7f0055; font-family: &#39;Courier New&#39;, monospace; font-weight: bold; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;null&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;) {&lt;/span&gt;&lt;span class=&quot;EOP SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;OutlineElement Ltr SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: white; clear: both; cursor: text; direction: ltr; font-family: &#39;Segoe UI&#39;, Tahoma, Verdana, sans-serif; margin: 0px; overflow: visible; padding: 0px; position: relative;&quot;&gt;&lt;div class=&quot;Paragraph SCX152143174&quot; paraeid=&quot;{56751e44-74a0-41d5-814e-fe7156f4e7c4}{150}&quot; paraid=&quot;850240654&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: windowtext; padding: 0px; text-indent: 144px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;Item&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;&lt;span class=&quot;SpellingError SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: inherit; background-image: url(data:image/gif; background-position: 0% 100%; background-repeat: repeat-x; border-bottom-color: transparent; border-bottom-style: solid; border-bottom-width: 1px; margin: 0px; padding: 0px;&quot;&gt;item&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;&amp;nbsp;=&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;doc.getFirstItem&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; color: #2a00ff; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;&quot;Members&quot;&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;EOP SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;OutlineElement Ltr SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: white; clear: both; cursor: text; direction: ltr; font-family: &#39;Segoe UI&#39;, Tahoma, Verdana, sans-serif; margin: 0px; overflow: visible; padding: 0px; position: relative;&quot;&gt;&lt;div class=&quot;Paragraph SCX152143174&quot; paraeid=&quot;{56751e44-74a0-41d5-814e-fe7156f4e7c4}{157}&quot; paraid=&quot;1763253108&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: windowtext; padding: 0px; text-indent: 144px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;Vector&amp;lt;String&amp;gt; v =&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;item.getValues&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;EOP SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;OutlineElement Ltr SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: white; clear: both; cursor: text; direction: ltr; font-family: &#39;Segoe UI&#39;, Tahoma, Verdana, sans-serif; margin: 0px; overflow: visible; padding: 0px; position: relative;&quot;&gt;&lt;div class=&quot;Paragraph SCX152143174&quot; paraeid=&quot;{56751e44-74a0-41d5-814e-fe7156f4e7c4}{163}&quot; paraid=&quot;2090047473&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: windowtext; padding: 0px; text-indent: 144px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; color: #7f0055; font-family: &#39;Courier New&#39;, monospace; font-weight: bold; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;for&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;String person : v){&lt;/span&gt;&lt;span class=&quot;EOP SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;OutlineElement Ltr SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: white; clear: both; cursor: text; direction: ltr; font-family: &#39;Segoe UI&#39;, Tahoma, Verdana, sans-serif; margin: 0px; overflow: visible; padding: 0px; position: relative;&quot;&gt;&lt;div class=&quot;Paragraph SCX152143174&quot; paraeid=&quot;{56751e44-74a0-41d5-814e-fe7156f4e7c4}{172}&quot; paraid=&quot;492265594&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: windowtext; padding: 0px; text-indent: 192px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;Name&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;&lt;span class=&quot;SpellingError SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: inherit; background-image: url(data:image/gif; background-position: 0% 100%; background-repeat: repeat-x; border-bottom-color: transparent; border-bottom-style: solid; border-bottom-width: 1px; margin: 0px; padding: 0px;&quot;&gt;name&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;&amp;nbsp;=&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;session.createName&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;person);&lt;/span&gt;&lt;span class=&quot;EOP SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;OutlineElement Ltr SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: white; clear: both; cursor: text; direction: ltr; font-family: &#39;Segoe UI&#39;, Tahoma, Verdana, sans-serif; margin: 0px; overflow: visible; padding: 0px; position: relative;&quot;&gt;&lt;div class=&quot;Paragraph SCX152143174&quot; paraeid=&quot;{56751e44-74a0-41d5-814e-fe7156f4e7c4}{179}&quot; paraid=&quot;101893239&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: windowtext; padding: 0px; text-indent: 192px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;options.add&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;name.getCommon&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;());&lt;/span&gt;&lt;span class=&quot;EOP SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;OutlineElement Ltr SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: white; clear: both; cursor: text; direction: ltr; font-family: &#39;Segoe UI&#39;, Tahoma, Verdana, sans-serif; margin: 0px; overflow: visible; padding: 0px; position: relative;&quot;&gt;&lt;div class=&quot;Paragraph SCX152143174&quot; paraeid=&quot;{56751e44-74a0-41d5-814e-fe7156f4e7c4}{183}&quot; paraid=&quot;2015049275&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: windowtext; padding: 0px; text-indent: 192px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;EOP SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;OutlineElement Ltr SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: white; clear: both; cursor: text; direction: ltr; font-family: &#39;Segoe UI&#39;, Tahoma, Verdana, sans-serif; margin: 0px; overflow: visible; padding: 0px; position: relative;&quot;&gt;&lt;div class=&quot;Paragraph SCX152143174&quot; paraeid=&quot;{56751e44-74a0-41d5-814e-fe7156f4e7c4}{189}&quot; paraid=&quot;1339786447&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: windowtext; padding: 0px; text-indent: 192px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;doc.recycle&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;EOP SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;OutlineElement Ltr SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: white; clear: both; cursor: text; direction: ltr; font-family: &#39;Segoe UI&#39;, Tahoma, Verdana, sans-serif; margin: 0px; overflow: visible; padding: 0px; position: relative;&quot;&gt;&lt;div class=&quot;Paragraph SCX152143174&quot; paraeid=&quot;{56751e44-74a0-41d5-814e-fe7156f4e7c4}{195}&quot; paraid=&quot;1096131104&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: windowtext; padding: 0px; text-indent: 192px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;item.recycle&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;EOP SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;OutlineElement Ltr SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: white; clear: both; cursor: text; direction: ltr; font-family: &#39;Segoe UI&#39;, Tahoma, Verdana, sans-serif; margin: 0px; overflow: visible; padding: 0px; position: relative;&quot;&gt;&lt;div class=&quot;Paragraph SCX152143174&quot; paraeid=&quot;{56751e44-74a0-41d5-814e-fe7156f4e7c4}{201}&quot; paraid=&quot;1761321500&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: windowtext; padding: 0px; text-indent: 192px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;}&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; color: #7f0055; font-family: &#39;Courier New&#39;, monospace; font-weight: bold; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;else&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;&amp;nbsp;{&lt;/span&gt;&lt;span class=&quot;EOP SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;OutlineElement Ltr SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: white; clear: both; cursor: text; direction: ltr; font-family: &#39;Segoe UI&#39;, Tahoma, Verdana, sans-serif; margin: 0px; overflow: visible; padding: 0px; position: relative;&quot;&gt;&lt;div class=&quot;Paragraph SCX152143174&quot; paraeid=&quot;{56751e44-74a0-41d5-814e-fe7156f4e7c4}{213}&quot; paraid=&quot;2015295080&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: windowtext; padding: 0px; text-indent: 240px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;log.error&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; color: #2a00ff; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; color: #2a00ff; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;Group&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; color: #2a00ff; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;2&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; color: #2a00ff; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;cannot be found, or opened.&quot;&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;EOP SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;OutlineElement Ltr SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: white; clear: both; cursor: text; direction: ltr; font-family: &#39;Segoe UI&#39;, Tahoma, Verdana, sans-serif; margin: 0px; overflow: visible; padding: 0px; position: relative;&quot;&gt;&lt;div class=&quot;Paragraph SCX152143174&quot; paraeid=&quot;{56751e44-74a0-41d5-814e-fe7156f4e7c4}{217}&quot; paraid=&quot;1906900619&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: windowtext; padding: 0px; text-indent: 192px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;EOP SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;OutlineElement Ltr SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: white; clear: both; cursor: text; direction: ltr; font-family: &#39;Segoe UI&#39;, Tahoma, Verdana, sans-serif; margin: 0px; overflow: visible; padding: 0px; position: relative;&quot;&gt;&lt;div class=&quot;Paragraph SCX152143174&quot; paraeid=&quot;{56751e44-74a0-41d5-814e-fe7156f4e7c4}{221}&quot; paraid=&quot;1275838561&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: windowtext; padding: 0px; text-indent: 192px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;……………… //get names from third group&lt;/span&gt;&lt;span class=&quot;EOP SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;OutlineElement Ltr SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: white; clear: both; cursor: text; direction: ltr; font-family: &#39;Segoe UI&#39;, Tahoma, Verdana, sans-serif; margin: 0px; overflow: visible; padding: 0px; position: relative;&quot;&gt;&lt;div class=&quot;Paragraph SCX152143174&quot; paraeid=&quot;{56751e44-74a0-41d5-814e-fe7156f4e7c4}{225}&quot; paraid=&quot;1596744725&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: windowtext; padding: 0px; text-indent: 192px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;EOP SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;OutlineElement Ltr SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: white; clear: both; cursor: text; direction: ltr; font-family: &#39;Segoe UI&#39;, Tahoma, Verdana, sans-serif; margin: 0px; overflow: visible; padding: 0px; position: relative;&quot;&gt;&lt;div class=&quot;Paragraph SCX152143174&quot; paraeid=&quot;{56751e44-74a0-41d5-814e-fe7156f4e7c4}{231}&quot; paraid=&quot;176702148&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: windowtext; padding: 0px; text-indent: 144px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;}&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; color: #7f0055; font-family: &#39;Courier New&#39;, monospace; font-weight: bold; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;else&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;&amp;nbsp;{&lt;/span&gt;&lt;span class=&quot;EOP SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;OutlineElement Ltr SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: white; clear: both; cursor: text; direction: ltr; font-family: &#39;Segoe UI&#39;, Tahoma, Verdana, sans-serif; margin: 0px; overflow: visible; padding: 0px; position: relative;&quot;&gt;&lt;div class=&quot;Paragraph SCX152143174&quot; paraeid=&quot;{56751e44-74a0-41d5-814e-fe7156f4e7c4}{241}&quot; paraid=&quot;416506160&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: windowtext; padding: 0px; text-indent: 192px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;log.error&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; color: #2a00ff; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; color: #2a00ff; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;Address Book is not found, or able to be opened.&quot;&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;EOP SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;OutlineElement Ltr SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: white; clear: both; cursor: text; direction: ltr; font-family: &#39;Segoe UI&#39;, Tahoma, Verdana, sans-serif; margin: 0px; overflow: visible; padding: 0px; position: relative;&quot;&gt;&lt;div class=&quot;Paragraph SCX152143174&quot; paraeid=&quot;{56751e44-74a0-41d5-814e-fe7156f4e7c4}{245}&quot; paraid=&quot;2124529344&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: windowtext; padding: 0px; text-indent: 144px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;EOP SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;OutlineElement Ltr SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: white; clear: both; cursor: text; direction: ltr; font-family: &#39;Segoe UI&#39;, Tahoma, Verdana, sans-serif; margin: 0px; overflow: visible; padding: 0px; position: relative;&quot;&gt;&lt;div class=&quot;Paragraph SCX152143174&quot; paraeid=&quot;{56751e44-74a0-41d5-814e-fe7156f4e7c4}{253}&quot; paraid=&quot;1708679957&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: windowtext; padding: 0px; text-indent: 96px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;}&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; color: #7f0055; font-family: &#39;Courier New&#39;, monospace; font-weight: bold; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;catch&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;&amp;nbsp;(&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;&lt;span class=&quot;SpellingError SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: inherit; background-image: url(data:image/gif; background-position: 0% 100%; background-repeat: repeat-x; border-bottom-color: transparent; border-bottom-style: solid; border-bottom-width: 1px; margin: 0px; padding: 0px;&quot;&gt;NotesException&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;&amp;nbsp;e) {&lt;/span&gt;&lt;span class=&quot;EOP SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;OutlineElement Ltr SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: white; clear: both; cursor: text; direction: ltr; font-family: &#39;Segoe UI&#39;, Tahoma, Verdana, sans-serif; margin: 0px; overflow: visible; padding: 0px; position: relative;&quot;&gt;&lt;div class=&quot;Paragraph SCX152143174&quot; paraeid=&quot;{28359706-bc53-455e-b634-e3fb9307c248}{10}&quot; paraid=&quot;1972456417&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: windowtext; padding: 0px; text-indent: 144px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;log.error&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; color: #2a00ff; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;&quot;EXCEPTION in&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; color: #2a00ff; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; color: #2a00ff; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;UserList&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; color: #2a00ff; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;(): &quot;&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;&amp;nbsp;+&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;e.toString&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;());&lt;/span&gt;&lt;span class=&quot;EOP SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;OutlineElement Ltr SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: white; clear: both; cursor: text; direction: ltr; font-family: &#39;Segoe UI&#39;, Tahoma, Verdana, sans-serif; margin: 0px; overflow: visible; padding: 0px; position: relative;&quot;&gt;&lt;div class=&quot;Paragraph SCX152143174&quot; paraeid=&quot;{28359706-bc53-455e-b634-e3fb9307c248}{16}&quot; paraid=&quot;1903415365&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: windowtext; padding: 0px; text-indent: 144px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;e.printStackTrace&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;EOP SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;OutlineElement Ltr SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: white; clear: both; cursor: text; direction: ltr; font-family: &#39;Segoe UI&#39;, Tahoma, Verdana, sans-serif; margin: 0px; overflow: visible; padding: 0px; position: relative;&quot;&gt;&lt;div class=&quot;Paragraph SCX152143174&quot; paraeid=&quot;{28359706-bc53-455e-b634-e3fb9307c248}{20}&quot; paraid=&quot;1814548029&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: windowtext; padding: 0px; text-indent: 96px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;EOP SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;OutlineElement Ltr SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: white; clear: both; cursor: text; direction: ltr; font-family: &#39;Segoe UI&#39;, Tahoma, Verdana, sans-serif; margin: 0px; overflow: visible; padding: 0px; position: relative;&quot;&gt;&lt;div class=&quot;Paragraph SCX152143174&quot; paraeid=&quot;{28359706-bc53-455e-b634-e3fb9307c248}{23}&quot; paraid=&quot;811170815&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: windowtext; padding: 0px; text-indent: 96px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;OutlineElement Ltr SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: white; clear: both; cursor: text; direction: ltr; font-family: &#39;Segoe UI&#39;, Tahoma, Verdana, sans-serif; margin: 0px; overflow: visible; padding: 0px; position: relative;&quot;&gt;&lt;div class=&quot;Paragraph SCX152143174&quot; paraeid=&quot;{28359706-bc53-455e-b634-e3fb9307c248}{41}&quot; paraid=&quot;1783841147&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: windowtext; padding: 0px; text-indent: 96px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Trebuchet MS&#39;, sans-serif; font-weight: bold; line-height: 18.2px; text-indent: 48px;&quot;&gt;4&amp;nbsp;&lt;/span&gt;Set&amp;lt;String&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;&lt;span class=&quot;SpellingError SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: inherit; background-image: url(data:image/gif; background-position: 0% 100%; background-repeat: repeat-x; border-bottom-color: transparent; border-bottom-style: solid; border-bottom-width: 1px; margin: 0px; padding: 0px;&quot;&gt;hs&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;&amp;nbsp;=&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; color: #7f0055; font-family: &#39;Courier New&#39;, monospace; font-weight: bold; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;HashSet&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;&amp;lt;String&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;&amp;gt;(&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;OutlineElement Ltr SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: white; clear: both; cursor: text; direction: ltr; font-family: &#39;Segoe UI&#39;, Tahoma, Verdana, sans-serif; margin: 0px; overflow: visible; padding: 0px; position: relative;&quot;&gt;&lt;div class=&quot;Paragraph SCX152143174&quot; paraeid=&quot;{28359706-bc53-455e-b634-e3fb9307c248}{47}&quot; paraid=&quot;2079292874&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: windowtext; padding: 0px; text-indent: 96px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;hs.addAll&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;options);&lt;/span&gt;&lt;span class=&quot;EOP SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;OutlineElement Ltr SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: white; clear: both; cursor: text; direction: ltr; font-family: &#39;Segoe UI&#39;, Tahoma, Verdana, sans-serif; margin: 0px; overflow: visible; padding: 0px; position: relative;&quot;&gt;&lt;div class=&quot;Paragraph SCX152143174&quot; paraeid=&quot;{28359706-bc53-455e-b634-e3fb9307c248}{53}&quot; paraid=&quot;1411453212&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: windowtext; padding: 0px; text-indent: 96px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;options.clear&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;EOP SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;OutlineElement Ltr SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: white; clear: both; cursor: text; direction: ltr; font-family: &#39;Segoe UI&#39;, Tahoma, Verdana, sans-serif; margin: 0px; overflow: visible; padding: 0px; position: relative;&quot;&gt;&lt;div class=&quot;Paragraph SCX152143174&quot; paraeid=&quot;{28359706-bc53-455e-b634-e3fb9307c248}{60}&quot; paraid=&quot;1255145242&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: windowtext; padding: 0px; text-indent: 96px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;options.addAll&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;&lt;span class=&quot;SpellingError SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: inherit; background-image: url(data:image/gif; background-position: 0% 100%; background-repeat: repeat-x; border-bottom-color: transparent; border-bottom-style: solid; border-bottom-width: 1px; margin: 0px; padding: 0px;&quot;&gt;hs&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;EOP SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;OutlineElement Ltr SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: white; clear: both; cursor: text; direction: ltr; font-family: &#39;Segoe UI&#39;, Tahoma, Verdana, sans-serif; margin: 0px; overflow: visible; padding: 0px; position: relative;&quot;&gt;&lt;div class=&quot;Paragraph SCX152143174&quot; paraeid=&quot;{28359706-bc53-455e-b634-e3fb9307c248}{63}&quot; paraid=&quot;410441784&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: windowtext; padding: 0px; text-indent: 96px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;OutlineElement Ltr SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: white; clear: both; cursor: text; direction: ltr; font-family: &#39;Segoe UI&#39;, Tahoma, Verdana, sans-serif; margin: 0px; overflow: visible; padding: 0px; position: relative;&quot;&gt;&lt;div class=&quot;Paragraph SCX152143174&quot; paraeid=&quot;{28359706-bc53-455e-b634-e3fb9307c248}{71}&quot; paraid=&quot;1232738487&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: windowtext; padding: 0px; text-indent: 96px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Trebuchet MS&#39;, sans-serif; font-weight: bold; line-height: 18.2px; text-indent: 48px;&quot;&gt;5&amp;nbsp;&lt;/span&gt;Collections.&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; font-style: italic; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;sort&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;options);&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;OutlineElement Ltr SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: white; clear: both; cursor: text; direction: ltr; font-family: &#39;Segoe UI&#39;, Tahoma, Verdana, sans-serif; margin: 0px; overflow: visible; padding: 0px; position: relative;&quot;&gt;&lt;div class=&quot;Paragraph SCX152143174&quot; paraeid=&quot;{28359706-bc53-455e-b634-e3fb9307c248}{74}&quot; paraid=&quot;391729874&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: windowtext; padding: 0px; text-indent: 96px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;OutlineElement Ltr SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: white; clear: both; cursor: text; direction: ltr; font-family: &#39;Segoe UI&#39;, Tahoma, Verdana, sans-serif; margin: 0px; overflow: visible; padding: 0px; position: relative;&quot;&gt;&lt;div class=&quot;Paragraph SCX152143174&quot; paraeid=&quot;{28359706-bc53-455e-b634-e3fb9307c248}{85}&quot; paraid=&quot;704204073&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: windowtext; padding: 0px; text-indent: 96px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; color: #7f0055; font-family: &#39;Courier New&#39;, monospace; font-weight: bold; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Trebuchet MS&#39;, sans-serif; line-height: 18.2px; text-indent: 48px;&quot;&gt;6&amp;nbsp;&lt;/span&gt;for&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;String person : options){&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;OutlineElement Ltr SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: white; clear: both; cursor: text; direction: ltr; font-family: &#39;Segoe UI&#39;, Tahoma, Verdana, sans-serif; margin: 0px; overflow: visible; padding: 0px; position: relative;&quot;&gt;&lt;div class=&quot;Paragraph SCX152143174&quot; paraeid=&quot;{28359706-bc53-455e-b634-e3fb9307c248}{95}&quot; paraid=&quot;1489966485&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: windowtext; padding: 0px; text-indent: 144px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;SelectItem&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;&amp;nbsp;option =&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; color: #7f0055; font-family: &#39;Courier New&#39;, monospace; font-weight: bold; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;SelectItem&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;EOP SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;OutlineElement Ltr SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: white; clear: both; cursor: text; direction: ltr; font-family: &#39;Segoe UI&#39;, Tahoma, Verdana, sans-serif; margin: 0px; overflow: visible; padding: 0px; position: relative;&quot;&gt;&lt;div class=&quot;Paragraph SCX152143174&quot; paraeid=&quot;{28359706-bc53-455e-b634-e3fb9307c248}{101}&quot; paraid=&quot;1355761418&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: windowtext; padding: 0px; text-indent: 144px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;option.setLabel&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;person);&lt;/span&gt;&lt;span class=&quot;EOP SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;OutlineElement Ltr SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: white; clear: both; cursor: text; direction: ltr; font-family: &#39;Segoe UI&#39;, Tahoma, Verdana, sans-serif; margin: 0px; overflow: visible; padding: 0px; position: relative;&quot;&gt;&lt;div class=&quot;Paragraph SCX152143174&quot; paraeid=&quot;{28359706-bc53-455e-b634-e3fb9307c248}{107}&quot; paraid=&quot;59579482&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: windowtext; padding: 0px; text-indent: 144px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;option.setValue&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;person);&lt;/span&gt;&lt;span class=&quot;EOP SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;OutlineElement Ltr SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: white; clear: both; cursor: text; direction: ltr; font-family: &#39;Segoe UI&#39;, Tahoma, Verdana, sans-serif; margin: 0px; overflow: visible; padding: 0px; position: relative;&quot;&gt;&lt;div class=&quot;Paragraph SCX152143174&quot; paraeid=&quot;{28359706-bc53-455e-b634-e3fb9307c248}{113}&quot; paraid=&quot;899614578&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: windowtext; padding: 0px; text-indent: 144px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;sortedOptions.add&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;option);&lt;/span&gt;&lt;span class=&quot;EOP SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;OutlineElement Ltr SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: white; clear: both; cursor: text; direction: ltr; font-family: &#39;Segoe UI&#39;, Tahoma, Verdana, sans-serif; margin: 0px; overflow: visible; padding: 0px; position: relative;&quot;&gt;&lt;div class=&quot;Paragraph SCX152143174&quot; paraeid=&quot;{28359706-bc53-455e-b634-e3fb9307c248}{117}&quot; paraid=&quot;2139540059&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: windowtext; padding: 0px; text-indent: 96px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;EOP SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;OutlineElement Ltr SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: white; clear: both; cursor: text; direction: ltr; font-family: &#39;Segoe UI&#39;, Tahoma, Verdana, sans-serif; margin: 0px; overflow: visible; padding: 0px; position: relative;&quot;&gt;&lt;div class=&quot;Paragraph SCX152143174&quot; paraeid=&quot;{28359706-bc53-455e-b634-e3fb9307c248}{124}&quot; paraid=&quot;659808132&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: windowtext; padding: 0px; text-indent: 96px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; color: #7f0055; font-family: &#39;Courier New&#39;, monospace; font-weight: bold; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;return&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;&lt;span class=&quot;SpellingError SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: inherit; background-image: url(data:image/gif; background-position: 0% 100%; background-repeat: repeat-x; border-bottom-color: transparent; border-bottom-style: solid; border-bottom-width: 1px; margin: 0px; padding: 0px;&quot;&gt;sortedOptions&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;EOP SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 14px; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;OutlineElement Ltr SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: white; clear: both; cursor: text; direction: ltr; margin: 0px; overflow: visible; padding: 0px; position: relative;&quot;&gt;&lt;div class=&quot;Paragraph SCX152143174&quot; paraeid=&quot;{28359706-bc53-455e-b634-e3fb9307c248}{128}&quot; paraid=&quot;393381431&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: windowtext; font-family: &#39;Segoe UI&#39;, Tahoma, Verdana, sans-serif; padding: 0px; text-indent: 48px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 16px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;Paragraph SCX152143174&quot; paraeid=&quot;{28359706-bc53-455e-b634-e3fb9307c248}{128}&quot; paraid=&quot;393381431&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: windowtext; font-family: &#39;Segoe UI&#39;, Tahoma, Verdana, sans-serif; padding: 0px; text-indent: 48px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 16px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;Paragraph SCX152143174&quot; paraeid=&quot;{28359706-bc53-455e-b634-e3fb9307c248}{128}&quot; paraid=&quot;393381431&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; background-color: transparent; color: windowtext; font-family: &#39;Segoe UI&#39;, Tahoma, Verdana, sans-serif; padding: 0px; text-indent: 48px; vertical-align: baseline; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;TextRun SCX152143174&quot; style=&quot;-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; -webkit-user-select: text; font-family: &#39;Courier New&#39;, monospace; line-height: 16px; margin: 0px; padding: 0px;&quot; xml:lang=&quot;EN-US&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;h3&gt;Code Explanation using footnotes:&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;color: #444444; line-height: 18.2px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;color: blue; font-weight: bold; line-height: 18.2px;&quot;&gt;1 &amp;nbsp;-&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;line-height: 18.2px;&quot;&gt;Declare two ArrayLists, one for Strings, and one for SelectItems.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #444444; font-size: 13px; line-height: 18.2px;&quot;&gt;&lt;span style=&quot;color: blue; font-weight: bold;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #444444; line-height: 18.2px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;color: blue; font-weight: bold;&quot;&gt;2 &amp;nbsp;-&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;line-height: 18.2px;&quot;&gt;The values of a multi-value field are returned as a Vector. For each item in the Vector, I assign the item into the String ArrayList&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #444444; line-height: 18.2px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: blue; font-family: inherit; font-weight: bold; line-height: 18.2px;&quot;&gt;3 -&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: inherit;&quot;&gt;&lt;span style=&quot;line-height: 18.2px;&quot;&gt;This uses the Name class to get the formatted name. This is part of the&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;line-height: 18.2px;&quot;&gt;original&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: inherit;&quot;&gt;&lt;span style=&quot;line-height: 18.2px;&quot;&gt;&amp;nbsp;Notes API for java, and is quite&amp;nbsp;useful.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #444444; line-height: 18.2px;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;color: #444444; line-height: 18.2px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;color: blue; font-weight: bold;&quot;&gt;4 - &amp;nbsp;&lt;/span&gt;This is where I pass the contents of the String ArrayList into a HashSet and then back again. All Sets in Java are not able to contain duplicate values.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #444444; line-height: 18.2px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #444444; line-height: 18.2px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;line-height: 18.2px;&quot;&gt;&lt;span style=&quot;color: blue; font-weight: bold;&quot;&gt;5 -&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;line-height: 18.2px;&quot;&gt;After the duplicates are removed, then I sort the list. If you try to sort before removing duplicates it won&#39;t be sorted after changing to a Hashset and back. As you can see, sorting a String List is very easy using the Collections class.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #444444; line-height: 18.2px;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;color: #444444; line-height: 18.2px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;b style=&quot;color: blue;&quot;&gt;6 - &amp;nbsp;&lt;/b&gt;&lt;span style=&quot;line-height: 18.2px;&quot;&gt;Lastly, I convert the ArrayList of Strings into an ArrayList of SelectItems for use in my combo box.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;color: #444444; line-height: 18.2px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;line-height: 18.2px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;h3 style=&quot;color: #444444; line-height: 18.2px;&quot;&gt;Last Words&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;line-height: 18.2px;&quot;&gt;In Java the Collections Framework is super useful and one of the strengths of the language. If you are learning Java it would wise to pay special attention to knowing what it can do for you. &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;line-height: 18.2px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: red; line-height: 18.2px;&quot;&gt;&lt;b&gt;Please check comments of this post for some great tips on how to improve on what I posted.&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</description><link>http://notesspeak.blogspot.com/2015/09/sorting-java-arraylist-of-selectitem.html</link><author>[email protected] (The Zavocki&#39;s)</author><thr:total>8</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4805395909933518229.post-8544391385909910936</guid><pubDate>Thu, 17 Sep 2015 01:44:00 +0000</pubDate><atom:updated>2015-09-16T21:06:31.460-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">xpages</category><title>Quick Tip: Don&#39;t Forget to Hide Views from Web Browsers</title><description>One item to add to your checklist before deploying a new XPages application is to remember to hide your views from web browsers. The last application I deployed used a DB2 backend for everything but we still used views to hold keyword documents and error messages. If you forget to hide them from the web, then users could use the address bar and type in the view name which could allow users to see data they are not intended to see. Another factor is those default views are cringe-worthy ugly.&lt;br /&gt;&lt;br /&gt;I knew that hiding the views was easy, but it actually took me a while to find the setting. I expected to find it in the properties of the view but it isn&#39;t there. Of course my next step was to use google to find the answer but amazingly, I couldn&#39;t find anything. I started to compose a Stack Overflow question but discovered the answer while composing the question.&lt;br /&gt;&lt;br /&gt;The property is in the design properties as shown below.&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-dAy5fyFmmnE/VfoVxqpX2fI/AAAAAAAAHjE/VXjrS9SfvvA/s1600/Capture6-18a.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;http://1.bp.blogspot.com/-dAy5fyFmmnE/VfoVxqpX2fI/AAAAAAAAHjE/VXjrS9SfvvA/s640/Capture6-18a.PNG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;The design view also has a column that shows whether the view is visible on the web or not. In the XPages world, I can&#39;t think of a single reason why you would ever want to show a view to a web browser.&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-RzGTD3dXHZI/VfoXQdekSaI/AAAAAAAAHjQ/NUcW1DL-TwI/s1600/ATT00001.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;178&quot; src=&quot;http://1.bp.blogspot.com/-RzGTD3dXHZI/VfoXQdekSaI/AAAAAAAAHjQ/NUcW1DL-TwI/s640/ATT00001.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Edit: If you follow the best practice of separating your design and data into two NSF&#39;s then you don&#39;t have to worry about hiding your views, you would hide the whole database from direct web access. We used a single NSF because all of our data was in a relational backend so our data and design were already separate. Thanks to David Leedy and Jesse Gallagher for pointing this out.</description><link>http://notesspeak.blogspot.com/2015/09/quick-tip-dont-forget-to-hide-views.html</link><author>[email protected] (The Zavocki&#39;s)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-dAy5fyFmmnE/VfoVxqpX2fI/AAAAAAAAHjE/VXjrS9SfvvA/s72-c/Capture6-18a.PNG" height="72" width="72"/><thr:total>2</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4805395909933518229.post-2085397779061253912</guid><pubDate>Sun, 23 Aug 2015 23:00:00 +0000</pubDate><atom:updated>2015-11-17T21:02:27.197-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">DB2</category><category domain="http://www.blogger.com/atom/ns#">xpages</category><title>Using DB2 in XPages Part 10: The MWLUG 2015 Presentation Slides, and Thoughts</title><description>MWLUG is now a wrap. I was honored to be chosen to speak along with Dwain Wuerfel on Integrating DB2 and XPages. I am a somewhat bummed that technical troubles limited the demo I wanted to show. Thankfully as I have been told, my backup plan did get my point across. To that end, I have created additional slides to incorporate what I showed in the demo. &lt;br /&gt;&lt;br /&gt;I have embedded the demo below, but it might be hard to read, so click&lt;a href=&quot;http://www.slideshare.net/Steve_Zavocki/real-world-experience-integrating-db2-with-xpages-51971151?ref=http://www.slideshare.net/Steve_Zavocki/slideshelf&quot; target=&quot;_blank&quot;&gt;&amp;nbsp;here to view directly on slideshare&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;The Slides&lt;/h3&gt;&lt;br /&gt;&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;355&quot; marginheight=&quot;0&quot; marginwidth=&quot;0&quot; scrolling=&quot;no&quot; src=&quot;//www.slideshare.net/slideshow/embed_code/key/iIIvGErSYVDlit&quot; style=&quot;border-width: 1px; border: 1px solid #CCC; margin-bottom: 5px; max-width: 100%;&quot; width=&quot;425&quot;&gt; &lt;/iframe&gt; &lt;br /&gt;&lt;div style=&quot;margin-bottom: 5px;&quot;&gt;&lt;strong&gt; &lt;a href=&quot;https://www.slideshare.net/Steve_Zavocki/real-world-experience-integrating-db2-with-xpages-51971151&quot; target=&quot;_blank&quot; title=&quot;Real World Experience: Integrating DB2 with XPages&quot;&gt;Real World Experience: Integrating DB2 with XPages&lt;/a&gt; &lt;/strong&gt; from &lt;strong&gt;&lt;a href=&quot;https://www.slideshare.net/Steve_Zavocki&quot; target=&quot;_blank&quot;&gt;Steve_Zavocki&lt;/a&gt;&lt;/strong&gt; &lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Youtube Video Link&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;You can watch the session on youtube here: &lt;a href=&quot;https://www.youtube.com/watch?v=GVgfWzBomoM&quot;&gt;https://www.youtube.com/watch?v=GVgfWzBomoM&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;A big thanks to David Navarre for recording the session!&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Conference Review&lt;/h3&gt;&lt;br /&gt;The conference this year was as great for content and making and renewing friendships. If you have never attended an MWLUG conference I can&#39;t recommend it enough. Both times I have attended I have paid my own way, and it was money well spent. Next year the conference is going to be in Austin, Texas and they are hoping for 250 attendees. Kudos to Richard Moy and team who are wonderful organizers!&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;h3&gt;Final Thoughts&lt;/h3&gt;&lt;br /&gt;Writing this post, it occurred to me that August 23 is exactly three years since I received my first *real world* (ie: paid) XPages experience. On this day in 2012 was when I started working at Harmons Grocery in Salt Lake City, Utah. Harmons was a great experience, and since then I have been further challenged working at Navy Federal Credit Union in Florida. I have very much enjoyed the transition from Notes Developer to a Web Application Developer. I am excited to see what the next three years brings, whether that is XPages, Java, or the latest Javascript frameworks; ideally all of the above and more.&lt;/div&gt;&lt;/div&gt;</description><link>http://notesspeak.blogspot.com/2015/08/using-db2-in-xpages-part-10-mwlug-2015.html</link><author>[email protected] (The Zavocki&#39;s)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4805395909933518229.post-5664623771306817384</guid><pubDate>Mon, 27 Jul 2015 15:38:00 +0000</pubDate><atom:updated>2015-07-27T18:44:23.192-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">DB2</category><category domain="http://www.blogger.com/atom/ns#">xpages</category><title>Using DB2 in XPages Part 9: Access DB2 from a Java Agent</title><description>Unless I think of something else worthy of writing about, this will be my final post in this blog series on DB2 and XPages. I am grateful and honored by the compliments that have come my way with regards to this series. One of the main reasons I blog is so that I can remember the work that I have done, and so that I will be able to do it quicker and more effective in future. The other main reason is that I also enjoy sharing information with others, especially since I have greatly benefited from other community bloggers.&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I also wanted to give another plug for the &lt;a href=&quot;http://www.mwlug.com/mwlug/mwlug2015.nsf/Home.xsp&quot; target=&quot;_blank&quot;&gt;MWLUG&lt;/a&gt; conference this August 19-21, 2015 in Atlanta. There some amazing sessions being presents by the top names in our community. I am humbled and honored to be included on that list. Along with my co-worker Dwain Weurfel, I will be presenting a session titled &quot;Real World Experience: Integrating XPages and DB2&quot;. Come hear us present on topics that are included in this blog series and much more.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;In this post, my topic is accessing DB2 data using a Java agent.&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;h3&gt;How are Java Agents Different&lt;/h3&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Java agents are different and those differences can be &lt;i&gt;very&lt;/i&gt; frustrating. I remember seeing this tweet and it reminded me that I needed to get busy and write this blog post.&lt;/div&gt;&lt;div&gt;&lt;blockquote class=&quot;twitter-tweet&quot; data-conversation=&quot;none&quot; lang=&quot;en&quot;&gt;&lt;div dir=&quot;ltr&quot; lang=&quot;en&quot;&gt;&lt;a href=&quot;https://twitter.com/ptcalhoun&quot;&gt;@ptcalhoun&lt;/a&gt; Same here this week - Java agents suck. DO NOT USE them&lt;/div&gt;— Oliver Busse ✫ (@zeromancer1972) &lt;a href=&quot;https://twitter.com/zeromancer1972/status/623559988003381248&quot;&gt;July 21, 2015&lt;/a&gt;&lt;/blockquote&gt;&lt;script async=&quot;&quot; charset=&quot;utf-8&quot; src=&quot;//platform.twitter.com/widgets.js&quot;&gt;&lt;/script&gt;&lt;/div&gt;&lt;div&gt;In our case, we &lt;i&gt;had&lt;/i&gt; to use them for scheduled processes that needed to run on the server. It was use either Java or LotusScript.&lt;br /&gt;&lt;br /&gt;To access DB2, it is necessary to access the drivers provided by IBM or your DBA. To have your agent code reference the drivers and any other jars is is necessary to understand the restrictions that apply to java agents. The list below is not meant to be exhaustive:&lt;br /&gt;&lt;br /&gt;Java Agents Can:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Access Jar files stored in the servers &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;jvm\lib\ext&lt;/span&gt; folder&lt;/li&gt;&lt;li&gt;Access Script Libraries containing supporting classes&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;Java Agents Cannot: &amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;Access Jars stored in the NSF&#39;s Build Path&lt;/li&gt;&lt;li&gt;Access any Jar using the new &#39;Jar&#39; design element&lt;/li&gt;&lt;li&gt;Access any java code stored in the Code\Java section&lt;/li&gt;&lt;/ol&gt;&lt;h3&gt;Using External Jars and Script Libraries&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Java agents can access the jars on the server but you MUST also have a copy of the jars on your local &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;jvm\lib\ext&lt;/span&gt; folder in order to compile your code.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To use a supporting script library in your java agent, you first create a new library of type &#39;Java&#39;. You then put whatever supporting classes inside that you need. Once created, you then can import the library into your java agent using the &#39;Import&#39; button. In this case in the graphic, there are only two classes; I could have easily just imported those two classes individually into my agent.&lt;/div&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-9rV_Hy6oiqM/VbVUBeTIq7I/AAAAAAAAHiY/0E2SkPnF_SE/s1600/7-26-2015%2B5-31-35%2BPM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;297&quot; src=&quot;http://1.bp.blogspot.com/-9rV_Hy6oiqM/VbVUBeTIq7I/AAAAAAAAHiY/0E2SkPnF_SE/s400/7-26-2015%2B5-31-35%2BPM.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif; font-size: small;&quot;&gt;Script Library&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-I8Uw3xzAvyA/VbVUic4ahGI/AAAAAAAAHig/ovid09XxYNo/s1600/7-26-2015%2B5-35-35%2BPM.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;267&quot; src=&quot;http://2.bp.blogspot.com/-I8Uw3xzAvyA/VbVUic4ahGI/AAAAAAAAHig/ovid09XxYNo/s400/7-26-2015%2B5-35-35%2BPM.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif; font-size: small;&quot;&gt;Use Import to use the Script Library in your agent&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div&gt;Finally, the last thing you need to do in order to use the classes is to add an import statement in your agent. &amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #820040;&quot;&gt;&lt;b style=&quot;line-height: 18.4599990844727px;&quot;&gt;import&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp;org.sample.javaLib.XLog;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #820040;&quot;&gt;&lt;b style=&quot;line-height: 18.4599990844727px;&quot;&gt;import&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp;&lt;span style=&quot;line-height: 18.4599990844727px;&quot;&gt;org.sample.javaLib.AgentUtils&lt;/span&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;div&gt;&lt;h3&gt;Code Usage&lt;/h3&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #444444; line-height: 18.2000007629395px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;The code in this example runs on a scheduled basis to update a table column based on a condition.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #444444; line-height: 18.2000007629395px;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3&gt;Code Example using footnotes&lt;/h3&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;package org.sample.agent;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;import java.sql.Connection;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;import java.sql.DriverManager;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;import java.sql.PreparedStatement;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;import java.sql.ResultSet;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;import java.sql.SQLException;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;import java.text.DateFormat;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;import java.text.SimpleDateFormat;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;import lotus.domino.AgentBase;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;import lotus.domino.Database;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;import lotus.domino.Document;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;import lotus.domino.Session;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;import lotus.domino.View;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: blue; font-family: &#39;PT Sans Caption&#39;; font-weight: bold; line-height: 18.2000007629395px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;PT Sans Caption&#39;; font-weight: bold; line-height: 18.2000007629395px;&quot;&gt;1&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;import org.sample.javaLib.XLog;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;import org.sample.javaLib.AgentUtils;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;public class JavaAgent extends AgentBase {&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;@Override&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;public void NotesMain() {&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp;Database db_cred = null;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp;Connection conn = null;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp;PreparedStatement ps1 = null, ps2 = null;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp;ResultSet rs = null;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp;XLog log = null;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp;Session session = getSession();&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp;try {&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;//get values from keyword documents&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;PT Sans Caption&#39;; font-weight: bold; line-height: 18.2000007629395px;&quot;&gt;2&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;String schema = session.getCurrentDatabase().getView(&quot;Keywords&quot;).getDocumentByKey(&quot;SCHEMA&quot;).getItemValue(&quot;KeywordValues&quot;).elementAt(0).toString().trim();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; ...Rest of code to pull keywords removed... &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;//Initialize log&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;log = new XLog(&quot;My App&quot;, agentDebugServer, agentLogDB, agentDebugLevel);&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;log.info(&quot;Agent processPendingSettlementAmount: Starting execution of agent&quot;);&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;db_cred = session.getDatabase(agentDebugServer, dbpath);&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;if (&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;PT Sans Caption&#39;; font-weight: bold; line-height: 18.2000007629395px;&quot;&gt;3&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;db_cred.isOpen()) {&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; View v = db_pass.getView(dbview);&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;Document doc = v.getDocumentByKey(dbkey, true);&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;String url = doc.getItemValueString(&quot;PI_JDBCURL&quot;).trim();&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; String user = doc.getItemValueString(&quot;PI_Username&quot;).trim();&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; String password = doc.getItemValueString(&quot;PI_Password&quot;).trim();&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;PT Sans Caption&#39;; font-weight: bold; line-height: 18.2000007629395px;&quot;&gt;4&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;PT Sans Caption&#39;; font-weight: bold; line-height: 18.2000007629395px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;doc.recycle();&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; v.recycle();&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Class.forName(driver);&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;PT Sans Caption&#39;; font-weight: bold; line-height: 18.2000007629395px;&quot;&gt;5&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;conn = DriverManager.getConnection(url, user, password);&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;if (conn != null) {&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; conn.setAutoCommit(false);&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; java.util.Date currentDate = new java.util.Date();&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;PT Sans Caption&#39;; font-weight: bold; line-height: 18.2000007629395px;&quot;&gt;6&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;java.sql.Date emptyDate = java.sql.Date.valueOf(&quot;9999-12-31&quot;);&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;// Format Posting Date&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;DateFormat formatter = new SimpleDateFormat(&quot;yyyy-MM-dd&quot;);&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;currentDate = formatter.parse(formatter.format(currentDate)); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;java.sql.Date currentDateSQL = new&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;java.sql.Date(currentDate.getTime()); // convert to SQL date&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;PT Sans Caption&#39;; font-weight: bold; line-height: 18.2000007629395px;&quot;&gt;7&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;String sqlSelect = &quot;SELECT USER_ID,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;USER_TAX_PAID&lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;USER_TAX_DUE_AMT&lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;, &quot; +&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;USER_TAX_DUE_AMT&lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp;FROM &quot;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;+ schema&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;+ &quot;.USER_DETAIL&quot;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp;+&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&quot;WHERE USER_TAX_DUE_AMT &amp;gt; 0 AND USER_TAX_DUE_DT &amp;lt;= ?&quot;;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; String sqlUpdate = &quot;UPDATE &lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;USER_DETAIL SET USER_TAX_PAID = ?, USER_TAX_DUE_AMT = ?, USER_TAX_DUE_DT = ? &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;WHERE USER_ID = ?&quot;;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; ps1 = conn.prepareStatement(sqlSelect);&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; ps1.setDate(1, currentDateSQL);&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; rs = ps1.executeQuery();&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; while (rs.next()) {&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;ps2 = conn.prepareStatement(sqlUpdate);&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;PT Sans Caption&#39;; font-weight: bold; line-height: 18.2000007629395px;&quot;&gt;8&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;ps2.setString(1, rs.getString(&quot;USER_TAX_DUE_AMT&quot;).trim());&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ps2.setInt(2, 0);&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ps2.setDate(3, emptyDate);&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ps2.setString(4, rs.getString(&quot;USER_ID&quot;).trim());&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ps2.executeUpdate();&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: &#39;PT Sans Caption&#39;; font-weight: bold; line-height: 18.2000007629395px;&quot;&gt;9&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;conn.commit();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; log.info(&quot;Agent processTax: Process completed successfully&quot;);&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;} else {&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log.error(&quot;Agent processTax: Connection to DB2 could not be obtained&quot;);&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; } else {&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;log.error(&quot;Agent processTax: Unable to open DBCRED document&quot;);&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp;catch (Exception e) {&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; //log errors&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp;finally {&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; //clean up connections &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;h3 style=&quot;background-color: white; color: #444444; font-family: &#39;PT Sans Caption&#39;; margin: 0px; position: relative;&quot;&gt;&lt;span style=&quot;line-height: 21.2999992370605px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Code Explanation using footnotes&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;line-height: 21.2999992370605px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;color: #444444; font-family: &#39;PT Sans Caption&#39;; line-height: 18.2000007629395px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;color: blue; font-weight: bold; line-height: 18.2000007629395px;&quot;&gt;1 &amp;nbsp;-&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;line-height: 18.2000007629395px;&quot;&gt;Code imported from Script Library that we previously imported into the agent.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #444444; font-family: &#39;PT Sans Caption&#39;; line-height: 18.2000007629395px;&quot;&gt;&lt;span style=&quot;color: blue; font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #444444; font-family: &#39;PT Sans Caption&#39;; line-height: 18.2000007629395px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;color: blue; font-weight: bold;&quot;&gt;2 &amp;nbsp;-&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;line-height: 18.2000007629395px;&quot;&gt;In previous post, the example code pulled from a KeywordBean in applicationScope. &amp;nbsp;In a java agent, this bean is unavailable therefore each agent must load the keywords that are needed.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #444444; font-family: &#39;PT Sans Caption&#39;; line-height: 18.2000007629395px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;line-height: 18.2000007629395px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #444444; font-family: &#39;PT Sans Caption&#39;; line-height: 18.2000007629395px;&quot;&gt;&lt;span style=&quot;color: blue; font-weight: bold; line-height: 18.2000007629395px;&quot;&gt;3 -&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;line-height: 18.2000007629395px;&quot;&gt;Since the Credentials class (discussed in &lt;a href=&quot;http://notesspeak.blogspot.com/2015/04/using-db2-in-xpages-part-3-setting-up.html&quot; target=&quot;_blank&quot;&gt;previous post&lt;/a&gt;) is unavailable in an agent, the agent manually retrieves the values from the Credential Notes database.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #444444; font-family: &#39;PT Sans Caption&#39;; line-height: 18.2000007629395px;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;color: #444444; font-family: &#39;PT Sans Caption&#39;; line-height: 18.2000007629395px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;color: blue; font-weight: bold;&quot;&gt;4 - &amp;nbsp;&lt;/span&gt;Of course, all Notes objects must be recycled&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #444444; font-family: &#39;PT Sans Caption&#39;; line-height: 18.2000007629395px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #444444; font-family: &#39;PT Sans Caption&#39;; line-height: 18.2000007629395px;&quot;&gt;&lt;span style=&quot;font-family: inherit; line-height: 18.2000007629395px;&quot;&gt;&lt;span style=&quot;color: blue; font-weight: bold;&quot;&gt;5 -&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;line-height: 18.2000007629395px;&quot;&gt;Gets the connection from the standard java.sql.DriverManager class, and passes the credentials it had retrieved from the Credentials database. This agent runs on the server so credentials are never passed to or from the server, therefore this is considered secure by company standards.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #444444; font-family: &#39;PT Sans Caption&#39;; line-height: 18.2000007629395px;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;color: #444444; font-family: &#39;PT Sans Caption&#39;; line-height: 18.2000007629395px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;b style=&quot;color: blue;&quot;&gt;6 - &amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;line-height: 18.2000007629395px;&quot;&gt;Early on in the project, the DBA set all columns to &quot;Not Null&quot; so we had to put a dummy date of &quot;9999-12-31&quot; in a column to signify that it was &#39;empty&#39;. &amp;nbsp;&lt;i&gt;Bottom line here: Don&#39;t let your DBA get away with doing that unless you really need it. Know what you need the table to look like prior to starting coding.&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #444444; font-family: &#39;PT Sans Caption&#39;; line-height: 18.2000007629395px;&quot;&gt;&lt;span style=&quot;line-height: 18.2000007629395px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #444444; font-family: &#39;PT Sans Caption&#39;; line-height: 18.2000007629395px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;color: blue; font-weight: bold;&quot;&gt;7 -&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;line-height: 18.2000007629395px;&quot;&gt;There are two distinct queries that need to be run within this agent&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #444444; font-family: &#39;PT Sans Caption&#39;; line-height: 18.2000007629395px;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;color: #444444; font-family: &#39;PT Sans Caption&#39;; line-height: 18.2000007629395px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;color: blue; font-weight: bold; line-height: 18.2000007629395px;&quot;&gt;8 -&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;line-height: 18.2000007629395px;&quot;&gt;Shows how the second query is build with values pulled from the first query. The first being a SELECT that returns a ResultSet object.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;color: #444444; font-family: &#39;PT Sans Caption&#39;; line-height: 18.2000007629395px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;line-height: 18.2000007629395px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #444444; font-family: &#39;PT Sans Caption&#39;; line-height: 18.2000007629395px;&quot;&gt;&lt;span style=&quot;color: blue; font-weight: bold; line-height: 18.2000007629395px;&quot;&gt;9 -&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;line-height: 18.2000007629395px;&quot;&gt;After each iteration in the while statement, we must manually commit the changes to DB2&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #444444; font-family: &#39;PT Sans Caption&#39;; line-height: 18.2000007629395px;&quot;&gt;&lt;span style=&quot;line-height: 18.2000007629395px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #444444; font-family: &#39;PT Sans Caption&#39;; line-height: 18.2000007629395px;&quot;&gt;&lt;span style=&quot;line-height: 18.2000007629395px;&quot;&gt;Note: The agent code above was heavily modified and stripped down from the original. The purpose was also changed to something more understandable. I wouldn&#39;t be surprised if all my curly braces don&#39;t line up properly.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;line-height: 18.2000007629395px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;</description><link>http://notesspeak.blogspot.com/2015/07/using-db2-in-xpages-part-9-access-db2.html</link><author>[email protected] (The Zavocki&#39;s)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-9rV_Hy6oiqM/VbVUBeTIq7I/AAAAAAAAHiY/0E2SkPnF_SE/s72-c/7-26-2015%2B5-31-35%2BPM.png" height="72" width="72"/><thr:total>3</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4805395909933518229.post-2733764933312542826</guid><pubDate>Mon, 29 Jun 2015 00:30:00 +0000</pubDate><atom:updated>2015-07-26T19:38:05.833-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">DB2</category><category domain="http://www.blogger.com/atom/ns#">xpages</category><title>Using DB2 in XPages Part 8: Updating an Existing Record into DB2</title><description>&lt;span style=&quot;font-family: inherit;&quot;&gt;As this blog series is winding down, in this second to last post,&amp;nbsp;&lt;/span&gt;I will give an example for performing an UPDATE to an existing DB2 record.&lt;br /&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;h3&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Example Overview&lt;/span&gt;&lt;/h3&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;The UPDATE SQL is very straightforward. In my opinion, the UPDATE statement makes much more sense that the INSERT statement.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;For updates, you only need to update the columns that you want changed. You do not need to include columns that you don&#39;t want to be updated. Of course, you need to have the correct DB2 permissions to perform updates. For updating a specific record, the&amp;nbsp;WHERE is&amp;nbsp;&lt;/span&gt;required&lt;span style=&quot;font-family: inherit;&quot;&gt;. &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;h3 style=&quot;background-color: white; color: #444444; font-family: &#39;PT Sans Caption&#39;; margin: 0px; position: relative;&quot;&gt;Code Usage&lt;/h3&gt;&lt;div style=&quot;background-color: white; color: #444444; font-family: &#39;PT Sans Caption&#39;; line-height: 18.2000007629395px;&quot;&gt;This code is intended to be called upon an XPages event such as the onClick of a button, or from another java method, &amp;nbsp;You would keep this in your controller managed bean and call it like this:&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #444444; font-family: &#39;PT Sans Caption&#39;; line-height: 18.2000007629395px;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #444444; font-family: &#39;PT Sans Caption&#39;; line-height: 18.2000007629395px;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; line-height: 18.2000007629395px;&quot;&gt;var updateResult = appBean.updatePerson(viewScope.personID, keywordBean.getString(&lt;/span&gt;&lt;span style=&quot;color: #4200ff; font-family: &#39;Courier New&#39;, Courier, monospace; line-height: 18.2000007629395px;&quot;&gt;&quot;SCHEMA&quot;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; line-height: 18.2000007629395px;&quot;&gt;));&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;h3 style=&quot;background-color: white; color: #444444; font-family: &#39;PT Sans Caption&#39;; margin: 0px; position: relative;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Code Example with footnotes&lt;/span&gt;&lt;/h3&gt;&lt;div&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #820040;&quot;&gt;&lt;b style=&quot;line-height: 18.4599990844727px;&quot;&gt;public&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp;String updatePerson(String personID, String schema){&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;b style=&quot;background-color: white; color: blue; font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: 13px; line-height: 18.2000007629395px;&quot;&gt;1&amp;nbsp;&lt;/b&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;XLog log =&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #820040; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;b style=&quot;line-height: 18.4599990844727px;&quot;&gt;new&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;XLog(&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #4200ff; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&quot;Update Person&quot; ....&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;);&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;b style=&quot;background-color: white; color: blue; font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: 13px; line-height: 18.2000007629395px;&quot;&gt;2&amp;nbsp;&lt;/b&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;XyzConnectionManager cm =&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #820040; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;b style=&quot;line-height: 18.4599990844727px;&quot;&gt;new&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;XyzConnectionManager();&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;PreparedStatement ps=&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #820040;&quot;&gt;&lt;b style=&quot;line-height: 18.4599990844727px;&quot;&gt;null&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Connection c =&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #820040;&quot;&gt;&lt;b style=&quot;line-height: 18.4599990844727px;&quot;&gt;null&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;String returnValue =&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #4200ff;&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;b style=&quot;background-color: white; color: blue; font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: 13px; line-height: 18.2000007629395px;&quot;&gt;3&amp;nbsp;&lt;/b&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;FacesContext facesContext = FacesContext.&lt;i style=&quot;line-height: 18.4599990844727px;&quot;&gt;getCurrentInstance&lt;/i&gt;();&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Map&amp;lt;String, Object&amp;gt; viewScope = facesContext.getViewRoot().getViewMap();&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;b style=&quot;background-color: white; color: blue; font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: 13px; line-height: 18.2000007629395px;&quot;&gt;4&amp;nbsp;&lt;/b&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;SimpleDateFormat formatDateDB2 =&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #820040; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;b style=&quot;line-height: 18.4599990844727px;&quot;&gt;new&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;SimpleDateFormat(&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #4200ff; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&quot;yyyy-MM-dd&quot;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;);&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #3f8080; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;//to DB2 format&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #820040;&quot;&gt;&lt;b style=&quot;line-height: 18.4599990844727px;&quot;&gt;try&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;b style=&quot;background-color: white; color: blue; font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: 13px; line-height: 18.2000007629395px;&quot;&gt;5&amp;nbsp;&lt;/b&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;c = cm.getConnection();&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #3f8080;&quot;&gt;//SQL for Person Table UPDATE&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;String sql =&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #4200ff;&quot;&gt;&quot;UPDATE &quot;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp;+ schema +&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #4200ff;&quot;&gt;&quot;.PERSON_TABLE SET PERSON_ID = ?, &quot; +&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #4200ff;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;PERSON_AGE = ?,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #4200ff;&quot;&gt;PERSON_NICKNAME = ?, PERSON_FAV_COLOR = ?, &quot; +&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #4200ff;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;PERSON_DOB = ?&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #4200ff;&quot;&gt;WHERE PERSON_ID = ?&quot;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #820040;&quot;&gt;&lt;b style=&quot;line-height: 18.4599990844727px;&quot;&gt;try&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;b style=&quot;background-color: white; color: blue; font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: 13px; line-height: 18.2000007629395px;&quot;&gt;6&amp;nbsp;&lt;/b&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;java.util.Date DOB_Date = formatDateDB2.parse((String)viewScope.get(&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #4200ff; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&quot;DOB_UI&quot;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;));&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #820040;&quot;&gt;&lt;b style=&quot;line-height: 18.4599990844727px;&quot;&gt;catch&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp;(ParseException e){&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //maybe log parse error here&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ps = c.prepareStatement(sql); &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #3f8080;&quot;&gt;//prepared statement for detail table&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ps.setString(1, (String) viewScope.get(&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #4200ff;&quot;&gt;&quot;personID&quot;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;));&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ps.setLong(2, (Long) viewScope.get(&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #4200ff;&quot;&gt;personAge&quot;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;));&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ps.setString(3, (String) viewScope.get(&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #4200ff;&quot;&gt;&quot;personNickname&quot;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;));&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ps.setString(4, (String) viewScope.get(&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #4200ff;&quot;&gt;&quot;personFavoriteColor&quot;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;));&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;ps.setDate(5, DOB_Date);&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #820040;&quot;&gt;&lt;b style=&quot;line-height: 18.4599990844727px;&quot;&gt;int&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp;result = ps.executeUpdate();&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;b style=&quot;background-color: white; color: blue; font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: 13px; line-height: 18.2000007629395px;&quot;&gt;7&amp;nbsp;&lt;/b&gt;&lt;span style=&quot;background-color: white; color: #820040; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;b style=&quot;line-height: 18.4599990844727px;&quot;&gt;if&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;(result &amp;gt; 0){&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;b style=&quot;background-color: white; color: blue; font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: 13px; line-height: 18.2000007629395px;&quot;&gt;8&amp;nbsp;&lt;/b&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;c.commit();&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; returnValue =&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #4200ff;&quot;&gt;&quot;Success&quot;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #820040;&quot;&gt;&lt;b style=&quot;line-height: 18.4599990844727px;&quot;&gt;else&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; returnValue =&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #4200ff;&quot;&gt;&quot;Failure&quot;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #820040;&quot;&gt;&lt;b style=&quot;line-height: 18.4599990844727px;&quot;&gt;&amp;nbsp; &amp;nbsp; catch&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;(Exception e) {&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; log.error(&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #4200ff;&quot;&gt;&quot;EXCEPTION in updatePerson: &quot;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp;+ e.toString());&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #820040;&quot;&gt;&lt;b style=&quot;line-height: 18.4599990844727px;&quot;&gt;&amp;nbsp; &amp;nbsp; finally&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp;{&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background-color: white; color: #820040;&quot;&gt;&lt;b style=&quot;line-height: 18.4599990844727px;&quot;&gt;try&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp;{&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #3f8080;&quot;&gt;// close resources&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; c.close();&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #820040;&quot;&gt;&lt;b style=&quot;line-height: 18.4599990844727px;&quot;&gt;catch&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp;(SQLException e) {&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;log.error(&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #4200ff;&quot;&gt;&quot;EXCEPTION in closing out resources in updatePerson: &quot;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp;+ e.toString());&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;b style=&quot;background-color: white; color: blue; font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: 13px; line-height: 18.2000007629395px;&quot;&gt;9&amp;nbsp;&lt;/b&gt;&lt;span style=&quot;background-color: white; color: #820040; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;b style=&quot;line-height: 18.4599990844727px;&quot;&gt;throw&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #820040; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;b style=&quot;line-height: 18.4599990844727px;&quot;&gt;new&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;RuntimeException(e);&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;b style=&quot;background-color: white; color: blue; font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: 13px; line-height: 18.2000007629395px;&quot;&gt;10&amp;nbsp;&lt;/b&gt;&lt;span style=&quot;background-color: white; color: #820040; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;b style=&quot;line-height: 18.4599990844727px;&quot;&gt;return&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;returnValue;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;h3 style=&quot;background-color: white; color: #444444; margin: 0px; position: relative;&quot;&gt;&lt;span style=&quot;line-height: 21.2999992370605px;&quot;&gt;&lt;span style=&quot;font-family: inherit; font-size: small;&quot;&gt;Code Explanation using footnotes&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;div&gt;&lt;span style=&quot;line-height: 21.2999992370605px;&quot;&gt;&lt;span style=&quot;font-family: inherit; font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #444444; line-height: 18.2000007629395px;&quot;&gt;&lt;div style=&quot;line-height: 18.2000007629395px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;color: blue; font-weight: bold; line-height: 18.2000007629395px;&quot;&gt;1 &amp;nbsp;-&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;line-height: 18.2000007629395px;&quot;&gt;Creates new instance of our logging utility. We had problems creating a single instance, so we resorted to creating a new instance each time.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 18.2000007629395px;&quot;&gt;&lt;span style=&quot;color: blue; font-weight: bold;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 18.2000007629395px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;color: blue; font-weight: bold;&quot;&gt;2 &amp;nbsp;-&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;line-height: 18.2000007629395px;&quot;&gt;Creates new instance of our connection manager class, see &lt;a href=&quot;http://notesspeak.blogspot.com/2015/04/using-db2-in-xpages-part-3-setting-up.html&quot; target=&quot;_blank&quot;&gt;Part 3&lt;/a&gt; for a detailed&amp;nbsp;explanation&amp;nbsp;of&amp;nbsp;this class&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 18.2000007629395px;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 18.2000007629395px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;color: blue; font-weight: bold;&quot;&gt;3 - &amp;nbsp;&lt;/span&gt;Gets a handle to the viewScope in which the UI elements are bound.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 18.2000007629395px;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 18.2000007629395px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;b style=&quot;color: blue;&quot;&gt;4 - &amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;line-height: 18.2000007629395px;&quot;&gt;Converts the date to a DB2 friendly date. Later I found out that you don&#39;t need to do this, as the setDate() method of the PreparedStatement class will do this for you. Early on in the project, the DBA set all columns to &quot;Not Null&quot; so we had to put a dummy date of &quot;9999-12-31&quot; in column. &amp;nbsp;We used this date converter which we thought we needed. &amp;nbsp;&lt;i&gt;Bottom line here: Don&#39;t let your DBA get away with doing that unless you really need it. Know what you need the table to look like prior to starting coding.&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 18.2000007629395px;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 18.2000007629395px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;color: blue; font-weight: bold;&quot;&gt;5 -&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;line-height: 18.2000007629395px;&quot;&gt;Creates a new connection or grabs one from the pool. This method is explained in Part 3 of this series.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 18.2000007629395px;&quot;&gt;&lt;span style=&quot;line-height: 18.2000007629395px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 18.2000007629395px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;color: blue; font-weight: bold;&quot;&gt;6 - &lt;/span&gt;&lt;span style=&quot;line-height: 18.2000007629395px;&quot;&gt;Parse and format the date. &amp;nbsp;This step is not necessary, but I left this to make the point I made in Footnote #4. &amp;nbsp;&lt;i&gt;Come to our MWLUG session in Atlanta to hear more about lessons such as this one that we learned while working on this project.&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 18.2000007629395px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;line-height: 18.2000007629395px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 18.2000007629395px;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 18.2000007629395px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;color: blue; font-weight: bold; line-height: 18.2000007629395px;&quot;&gt;7 -&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;line-height: 18.2000007629395px;&quot;&gt;An Integer with the number of rows updated is returned. To check for success, we check whether the returned integer is greater than one.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 18.2000007629395px;&quot;&gt;&lt;span style=&quot;line-height: 18.2000007629395px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 18.2000007629395px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;color: blue; font-weight: bold; line-height: 18.2000007629395px;&quot;&gt;8 -&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;line-height: 18.2000007629395px;&quot;&gt;Our table (DB2 view actually) is set so that we have to manually commit on updates. Commit means to make the update persistent.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 18.2000007629395px;&quot;&gt;&lt;span style=&quot;line-height: 18.2000007629395px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 18.2000007629395px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;color: blue; font-weight: bold; line-height: 18.2000007629395px;&quot;&gt;9 -&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;line-height: 18.2000007629395px;&quot;&gt;The finally statement always runs, and is the recommended place to close out resources. If that operation fails then we throw the exception. There is some debate on whether it is best to throw an exception at this point. &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 18.2000007629395px;&quot;&gt;&lt;span style=&quot;line-height: 18.2000007629395px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 18.2000007629395px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;color: blue; font-weight: bold; line-height: 18.2000007629395px;&quot;&gt;10 -&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;line-height: 18.2000007629395px;&quot;&gt;Lastly we return back a String of success or failure. Error Handling is done in the calling method.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</description><link>http://notesspeak.blogspot.com/2015/06/using-db2-in-xpages-part-8-updating.html</link><author>[email protected] (The Zavocki&#39;s)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4805395909933518229.post-7990021514696767988</guid><pubDate>Sun, 21 Jun 2015 23:18:00 +0000</pubDate><atom:updated>2015-07-26T19:37:46.319-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">DB2</category><category domain="http://www.blogger.com/atom/ns#">xpages</category><title>Using DB2 in XPages Part 7: Inserting a New Record into DB2</title><description>&lt;span style=&quot;color: #444444; font-family: inherit;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;My apologies for the long break in my blog series. The project that this is the basis for this blog series is wrapping up which is causing work to be extremely busy.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #444444; font-family: inherit;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: inherit;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Before I get started I am excited to report that I will be co-presenting a session at the&amp;nbsp;&lt;a href=&quot;https://www.blogger.com/&quot;&gt;&lt;span id=&quot;goog_1704108039&quot;&gt;&lt;/span&gt;MWLUG&lt;span id=&quot;goog_1704108040&quot;&gt;&lt;/span&gt;&lt;/a&gt;&amp;nbsp;conference in August titled &lt;b&gt;Real World Experience: Integrating DB2 and XPages.&lt;/b&gt; The session will cover some of the material in this blog series as well a much more. I will be presenting with my coworker Dwain Wuerfel who has worked on two&amp;nbsp;separate&amp;nbsp;XPages projects using a DB2 backend. Come see us in Atlanta this August 19-21.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #444444; font-family: inherit;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;  &lt;span style=&quot;color: #444444;&quot;&gt;Now onto this post in which I will cover how to Insert a new record into DB2.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;h3&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: inherit; font-size: large;&quot;&gt;Example Overview&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;span style=&quot;color: #444444; font-family: inherit;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: inherit;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;The code to perform an INSERT is fairly straightforward. However I personally find The INSERT statement in SQL to be somewhat awkward because of the way it must contain a VALUES statement that pairs with the column values that&amp;nbsp;precede&amp;nbsp;it. I find it easy to get values mixed up especially when you have a multitude of columns.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;After you execute an INSERT query, it does not return a boolean success or failure like the SELECT. It simply returns an integer of how many rows were updated. A return value of zero would indicate that something went wrong.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;&lt;span style=&quot;color: #444444; font-family: inherit;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: large;&quot;&gt;Code Usage&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This code is intended to be called upon an XPages event like the onClick of a button, &amp;nbsp;You would keep this in your controller managed bean and call it like this:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: 13px; line-height: 18.2000007629395px;&quot;&gt;var insertResult = appBean.insertExample(keywordBean.getString(&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #4200ff; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: 13px; line-height: 18.2000007629395px;&quot;&gt;&quot;SCHEMA&quot;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: 13px; line-height: 18.2000007629395px;&quot;&gt;));&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: &#39;Courier New&#39;, Courier, monospace; font-size: 13px; line-height: 18.2000007629395px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;h3&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Code Example with footnotes&lt;/span&gt;&lt;/h3&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; color: #820040; font-family: Courier New;&quot;&gt;&lt;b style=&quot;line-height: 18.4599990844727px;&quot;&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; color: #820040; font-family: Courier New;&quot;&gt;&lt;b style=&quot;line-height: 18.4599990844727px;&quot;&gt;public&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp;String insertExample(String schema){&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;color: blue; font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: 13px; line-height: 18.2000007629395px;&quot;&gt;1&amp;nbsp;&lt;/b&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;XLog log =&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #820040; font-family: Courier New;&quot;&gt;&lt;b style=&quot;line-height: 18.4599990844727px;&quot;&gt;new&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp;XLog(&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #4200ff; font-family: Courier New;&quot;&gt;&quot;XYZ Bean&quot;, .....&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;);&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;b style=&quot;color: blue; font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: 13px; line-height: 18.2000007629395px;&quot;&gt;2&amp;nbsp;&lt;/b&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;XYZConnectionManager cm =&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #820040; font-family: Courier New;&quot;&gt;&lt;b style=&quot;line-height: 18.4599990844727px;&quot;&gt;new&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp;XYZConnectionManager();&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; PreparedStatement ps =&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #820040; font-family: Courier New;&quot;&gt;&lt;b style=&quot;line-height: 18.4599990844727px;&quot;&gt;null&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; Connection c =&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #820040; font-family: Courier New;&quot;&gt;&lt;b style=&quot;line-height: 18.4599990844727px;&quot;&gt;null&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; String returnValue =&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #4200ff; font-family: Courier New;&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;color: blue; font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: 13px; line-height: 18.2000007629395px;&quot;&gt;3&lt;/b&gt;&lt;b style=&quot;color: blue; font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: 13px; line-height: 18.2000007629395px;&quot;&gt;&amp;nbsp;&lt;/b&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;FacesContext facesContext = FacesContext.&lt;i style=&quot;line-height: 18.4599990844727px;&quot;&gt;getCurrentInstance&lt;/i&gt;();&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; Map&amp;lt;String, Object&amp;gt; viewScope = facesContext.getViewRoot().getViewMap();&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background-color: white; color: #820040; font-family: Courier New;&quot;&gt;&lt;b style=&quot;line-height: 18.4599990844727px;&quot;&gt;try&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;color: blue; font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: 13px; line-height: 18.2000007629395px;&quot;&gt;4&amp;nbsp;&lt;/b&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;c = cm.getConnection();&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; String sql =&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #4200ff; font-family: Courier New;&quot;&gt;&quot;INSERT INTO &quot;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp;+ schema +&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #4200ff; font-family: Courier New;&quot;&gt;&quot;.PERSON_TABLE &quot;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp;+&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background-color: white; color: #4200ff; font-family: Courier New;&quot;&gt;&quot;(FIRST_NAME, LAST_NAME, AGE, BIG_BAG_OF_NOTHING, BIRTHDAY)&quot;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp;+&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #3f8080; font-family: Courier New;&quot;&gt;//1,2,3,4,5&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background-color: white; color: #4200ff; font-family: Courier New;&quot;&gt;&quot;VALUES (?, ?, ?, ?, ?)&quot;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ps = c.prepareStatement(sql);&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;color: blue; font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: 13px; line-height: 18.2000007629395px;&quot;&gt;5&amp;nbsp;&lt;/b&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;ps.setString(1, (String) viewScope.get(&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #4200ff; font-family: Courier New;&quot;&gt;&quot;userFirstName&quot;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;));&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ps.setString(2, (Long) viewScope.get(&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #4200ff; font-family: Courier New;&quot;&gt;&quot;userLastName&quot;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;));&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;color: blue; font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: 13px; line-height: 18.2000007629395px;&quot;&gt;6&amp;nbsp;&lt;/b&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;ps.setLong(3, (Long) viewScope.get(&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #4200ff; font-family: Courier New;&quot;&gt;&quot;userAge&quot;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;));&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;color: blue; font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: 13px; line-height: 18.2000007629395px;&quot;&gt;7&amp;nbsp;&lt;/b&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;ps.setNull(4, java.sql.Types.&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #0021bf; font-family: Courier New;&quot;&gt;&lt;i style=&quot;line-height: 18.4599990844727px;&quot;&gt;VARCHAR&lt;/i&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;);&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;color: blue; font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: 13px; line-height: 18.2000007629395px;&quot;&gt;8&amp;nbsp;&lt;/b&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;ps.setDate(5, (Date) viewScope.get(&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #4200ff; font-family: Courier New;&quot;&gt;&quot;userDOB&quot;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;));&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background-color: white; color: #820040; font-family: Courier New;&quot;&gt;&lt;b style=&quot;line-height: 18.4599990844727px;&quot;&gt;int&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp;result = ps.executeUpdate();&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background-color: white; color: #820040; font-family: Courier New;&quot;&gt;&lt;b style=&quot;line-height: 18.4599990844727px;&quot;&gt;if&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;(result &amp;gt; 0){&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; returnValue =&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #4200ff; font-family: Courier New;&quot;&gt;&quot;Success&quot;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #820040; font-family: Courier New;&quot;&gt;&lt;b style=&quot;line-height: 18.4599990844727px;&quot;&gt;else&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp;{&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; returnValue =&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #4200ff; font-family: Courier New;&quot;&gt;&quot;Failure&quot;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; }&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #820040; font-family: Courier New;&quot;&gt;&lt;b style=&quot;line-height: 18.4599990844727px;&quot;&gt;catch&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;(Exception e) {&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log.error(&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #4200ff; font-family: Courier New;&quot;&gt;&quot;EXCEPTION in insertATMInfo: &quot;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp;+ e.toString());&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;}&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #820040; font-family: Courier New;&quot;&gt;&lt;b style=&quot;line-height: 18.4599990844727px;&quot;&gt;finally&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp;{&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;color: blue; font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: 13px; line-height: 18.2000007629395px;&quot;&gt;9&amp;nbsp;&lt;/b&gt;&lt;span style=&quot;background-color: white; color: #820040; font-family: Courier New;&quot;&gt;&lt;b style=&quot;line-height: 18.4599990844727px;&quot;&gt;try&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp;{&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #3f8080; font-family: Courier New;&quot;&gt;// close resources&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ps.close(); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; c.close();&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #820040; font-family: Courier New;&quot;&gt;&lt;b style=&quot;line-height: 18.4599990844727px;&quot;&gt;catch&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp;(SQLException e) {&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log.error(&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #4200ff; font-family: Courier New;&quot;&gt;&quot;FATAL EXCEPTION in closing out resources &quot;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp;+ e.toString());&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #820040; font-family: Courier New;&quot;&gt;&lt;b style=&quot;line-height: 18.4599990844727px;&quot;&gt;throw&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #820040; font-family: Courier New;&quot;&gt;&lt;b style=&quot;line-height: 18.4599990844727px;&quot;&gt;new&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp;RuntimeException(e);&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;b style=&quot;color: blue; font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: 13px; line-height: 18.2000007629395px;&quot;&gt;10&amp;nbsp;&lt;/b&gt;&lt;span style=&quot;background-color: white; color: #820040; font-family: Courier New;&quot;&gt;&lt;b style=&quot;line-height: 18.4599990844727px;&quot;&gt;return&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp;returnValue; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;h3 style=&quot;background-color: white; color: #444444; font-family: &#39;PT Sans Caption&#39;; margin: 0px; position: relative;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;line-height: 21.2999992370605px;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Code Explanation using footnotes&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;div style=&quot;background-color: white; color: #444444; font-family: &#39;PT Sans Caption&#39;; font-size: 13px; line-height: 18.2000007629395px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;line-height: 21.2999992370605px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #444444; font-family: &#39;PT Sans Caption&#39;; line-height: 18.2000007629395px;&quot;&gt;&lt;div style=&quot;line-height: 18.2000007629395px;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Trebuchet MS&#39;, sans-serif; font-weight: bold; line-height: 18.2000007629395px;&quot;&gt;1 &amp;nbsp;-&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;line-height: 18.2000007629395px;&quot;&gt;Creates new instance of our logging utility. We had problems creating a single instance, so we resorted to creating a new instance each time.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 18.2000007629395px;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Trebuchet MS&#39;, sans-serif; font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 18.2000007629395px;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Trebuchet MS&#39;, sans-serif; font-weight: bold;&quot;&gt;2 &amp;nbsp;-&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;line-height: 18.2000007629395px;&quot;&gt;Creates new instance of our connection manager class, see Part 3 for a detailed&amp;nbsp;explanation&amp;nbsp;of&amp;nbsp;this class&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 18.2000007629395px;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: blue; font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 18.2000007629395px;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Trebuchet MS&#39;, sans-serif; font-weight: bold;&quot;&gt;3 - &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Gets a handle to the viewScope in which the UI elements are bound.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 18.2000007629395px;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: blue; font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 18.2000007629395px;&quot;&gt;&lt;b style=&quot;color: blue; font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;4 - &amp;nbsp;&lt;/b&gt;&lt;span style=&quot;line-height: 18.2000007629395px;&quot;&gt;Creates a new connection or grabs one from the pool. This method is explained in Part 3 of this series.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 18.2000007629395px;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: blue; font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 18.2000007629395px;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Trebuchet MS&#39;, sans-serif; font-weight: bold;&quot;&gt;5 -&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;line-height: 18.2000007629395px;&quot;&gt;The setString method of the Prepared Statement accepts a String and writes a VARCHAR or a LONGVARCHAR depending on the size of the String&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 18.2000007629395px;&quot;&gt;&lt;span style=&quot;line-height: 18.2000007629395px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 18.2000007629395px;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Trebuchet MS&#39;, sans-serif; font-weight: bold;&quot;&gt;6 -&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;line-height: 18.2000007629395px;&quot;&gt;The setLong method of the Prepared Statement accepts a long &amp;nbsp;and writes a BIGINT into DB2.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 18.2000007629395px;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 18.2000007629395px;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Trebuchet MS&#39;, sans-serif; font-weight: bold; line-height: 18.2000007629395px;&quot;&gt;7 -&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;line-height: 18.2000007629395px;&quot;&gt;The setNull method of the Prepared Statement is useful for writing null to a column that is set to accept a null. &amp;nbsp;You have to include the type of value so that the method knows which type of null to write.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 18.2000007629395px;&quot;&gt;&lt;span style=&quot;line-height: 18.2000007629395px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 18.2000007629395px;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Trebuchet MS&#39;, sans-serif; font-weight: bold; line-height: 18.2000007629395px;&quot;&gt;8 -&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;line-height: 18.2000007629395px;&quot;&gt;The setDate method of the Prepared Statement accepts any kinds of Date (util or sql) and writes it to a Sql DATE type.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 18.2000007629395px;&quot;&gt;&lt;span style=&quot;line-height: 18.2000007629395px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 18.2000007629395px;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Trebuchet MS&#39;, sans-serif; font-weight: bold; line-height: 18.2000007629395px;&quot;&gt;9 -&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;line-height: 18.2000007629395px;&quot;&gt;The finally statement always runs, and is the recommended place to close out resources. If that operation fails then we throw the exception. There is some debate on whether it is best to throw an exception at this point. &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 18.2000007629395px;&quot;&gt;&lt;span style=&quot;line-height: 18.2000007629395px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 18.2000007629395px;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Trebuchet MS&#39;, sans-serif; font-weight: bold; line-height: 18.2000007629395px;&quot;&gt;10 -&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;line-height: 18.2000007629395px;&quot;&gt;Lastly we return back a String of success or failure. Error Handling is done in the calling method.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description><link>http://notesspeak.blogspot.com/2015/06/using-db2-in-xpages-part-7-inserting.html</link><author>[email protected] (The Zavocki&#39;s)</author><thr:total>2</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4805395909933518229.post-7837875219215744892</guid><pubDate>Sun, 10 May 2015 21:24:00 +0000</pubDate><atom:updated>2015-05-10T17:35:01.525-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">DB2</category><category domain="http://www.blogger.com/atom/ns#">xpages</category><title>Using DB2 in XPages Part 6: Populating a Combobox dropdown with relational data</title><description>&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;In the last post I showed how to perform a simple SELECT statement to populate a page. &lt;b&gt;In this post I will show how to use a SELECT query to populate the contents of a ComboBox. &amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;h3&gt;Example Overview&amp;nbsp;&lt;/h3&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;This example will loop through a result set, and create a SelectItem object with a value for &#39;label&#39; and a value for &#39;value&#39;. &lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;This allows choices that are displayed to a user in which to choose from, that are different from what is actually stored when we insert this value back into DB2.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;This is similar to how, back in the day we would code in the Notes client with a label and alias separated with a pipe character (|). When the value is saved, the only thing we will save is the SelectItem value. This is because the value serves as a foreign key in a different table than what we select from in this query.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;h3&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Code Usage&lt;/span&gt;&lt;/h3&gt;I think it would &amp;nbsp;help to show first, how and where this is used. The method is called in the Values property of the ComboBox. One issue with this property in general that I find very annoying is that the UI gives the impression that you can have one formula for Label, and one for Value, but in fact you can only have one for both. The Formula Item code is a single line of SSJS that calls the java method below:&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;appBean.getBranchName(keywordBean.getString(&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #4200ff;&quot;&gt;&quot;SCHEMA&quot;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;));&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-71u5vg1qe9M/VU0dwRIzo3I/AAAAAAAAHdI/n3jHz-IQBdw/s1600/Capture5-8.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;265&quot; src=&quot;http://1.bp.blogspot.com/-71u5vg1qe9M/VU0dwRIzo3I/AAAAAAAAHdI/n3jHz-IQBdw/s640/Capture5-8.PNG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif; font-size: small;&quot;&gt;The code is added to the ComboBox Values as a Formula Item&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;h3 style=&quot;background-color: white; color: #444444; font-family: &#39;PT Sans Caption&#39;; margin: 0px; position: relative;&quot;&gt;Code Example with footnotes&lt;/h3&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #820040; font-family: Courier New;&quot;&gt;&lt;b style=&quot;line-height: 18.4599990844727px;&quot;&gt;public&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp;List&amp;lt;SelectItem&amp;gt; getBranchName(String schema){&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: blue; font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;b&gt;1 &lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;XYZConnectionManager cm =&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #820040; font-family: Courier New;&quot;&gt;&lt;b style=&quot;line-height: 18.4599990844727px;&quot;&gt;new&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp;XYZConnectionManager();&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp;PreparedStatement ps =&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #820040; font-family: Courier New;&quot;&gt;&lt;b style=&quot;line-height: 18.4599990844727px;&quot;&gt;null&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp;ResultSet rs =&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #820040; font-family: Courier New;&quot;&gt;&lt;b style=&quot;line-height: 18.4599990844727px;&quot;&gt;null&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp;Connection c =&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #820040; font-family: Courier New;&quot;&gt;&lt;b style=&quot;line-height: 18.4599990844727px;&quot;&gt;null&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; line-height: 21.2999992370605px;&quot;&gt;&lt;span style=&quot;color: blue; font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;b&gt;2&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp;List&amp;lt;SelectItem&amp;gt; options =&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #820040; font-family: Courier New;&quot;&gt;&lt;b style=&quot;line-height: 18.4599990844727px;&quot;&gt;new&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp;ArrayList&amp;lt;SelectItem&amp;gt;();&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #820040; font-family: Courier New;&quot;&gt;&lt;b style=&quot;line-height: 18.4599990844727px;&quot;&gt;try&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp;{&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background-color: white; color: #3f8080; font-family: Courier New;&quot;&gt;// Get Connection from ConnectionManager&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background-color: white; color: blue; font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;b&gt;3&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt; c = cm.getConnection();&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; String sql =&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #4200ff; font-family: Courier New;&quot;&gt;&quot;Select CB_NM, CB_ID FROM &quot;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp;+ schema +&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #4200ff; font-family: Courier New;&quot;&gt;&quot;.BRANCH01&quot;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background-color: white; color: #3f8080; font-family: Courier New;&quot;&gt;// Create Statement Object&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; ps = c.prepareStatement(sql);&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background-color: white; color: #3f8080; font-family: Courier New;&quot;&gt;// Run Query&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background-color: white; color: #820040; font-family: Courier New;&quot;&gt;&lt;b style=&quot;line-height: 18.4599990844727px;&quot;&gt;boolean&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp;result = ps.execute();&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background-color: white; color: #820040; font-family: Courier New;&quot;&gt;&lt;b style=&quot;line-height: 18.4599990844727px;&quot;&gt;if&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp;(result) {&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; rs = ps.getResultSet();&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background-color: white; color: #820040; font-family: Courier New;&quot;&gt;&lt;b style=&quot;line-height: 18.4599990844727px;&quot;&gt;while&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp;(rs.next()) { &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background-color: white; color: blue; font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;b&gt;4&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt; SelectItem option =&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #820040; font-family: Courier New;&quot;&gt;&lt;b style=&quot;line-height: 18.4599990844727px;&quot;&gt;new&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp;SelectItem();&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; option.setLabel(rs.getString(&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #4200ff; font-family: Courier New;&quot;&gt;&quot;CB_NM&quot;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;).trim());&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; option.setValue(rs.getString(&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #4200ff; font-family: Courier New;&quot;&gt;&quot;CB_ID&quot;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;).trim());&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background-color: white; color: blue; font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;b&gt;5&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt; options.add(option);&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #820040; font-family: Courier New;&quot;&gt;&lt;b style=&quot;line-height: 18.4599990844727px;&quot;&gt;catch&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;(Exception e) {&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;log.error(&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #4200ff; font-family: Courier New;&quot;&gt;&quot;EXCEPTION in&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: &#39;Courier New&#39;;&quot;&gt;getBranchName()&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #4200ff; font-family: Courier New;&quot;&gt;: &quot;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp;+ e.toString()); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #820040; font-family: Courier New;&quot;&gt;&lt;b style=&quot;line-height: 18.4599990844727px;&quot;&gt;finally&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp;{&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: blue; font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;b&gt;6&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #820040; font-family: Courier New;&quot;&gt;&lt;b style=&quot;line-height: 18.4599990844727px;&quot;&gt;try&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp;{&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #3f8080; font-family: Courier New;&quot;&gt;// close resources&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ps.close();&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; rs.close();&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; c.close();&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #820040; font-family: Courier New;&quot;&gt;&lt;b style=&quot;line-height: 18.4599990844727px;&quot;&gt;catch&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp;(SQLException e) {&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log.error(&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #4200ff; font-family: Courier New;&quot;&gt;&quot;FATAL EXCEPTION in&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: &#39;Courier New&#39;;&quot;&gt;getBranchName()&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #4200ff; font-family: Courier New;&quot;&gt;: &quot;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp;+ e.toString());&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background-color: white; color: #820040; font-family: Courier New;&quot;&gt;&lt;b style=&quot;line-height: 18.4599990844727px;&quot;&gt;throw&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #820040; font-family: Courier New;&quot;&gt;&lt;b style=&quot;line-height: 18.4599990844727px;&quot;&gt;new&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp;RuntimeException(e);&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #820040; font-family: Courier New;&quot;&gt;&lt;b style=&quot;line-height: 18.4599990844727px;&quot;&gt;return&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp;options;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;h3 style=&quot;background-color: white; color: #444444; font-family: &#39;PT Sans Caption&#39;; margin: 0px; position: relative;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;line-height: 21.2999992370605px;&quot;&gt;Code Explanation using footnotes&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;div&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;line-height: 21.2999992370605px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;background-color: white; color: #444444; line-height: 18.2000007629395px;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: 13px; font-weight: bold;&quot;&gt;1 &amp;nbsp;-&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;line-height: 18.2000007629395px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Creates new instance of our connection manager class, see Part 3 for a detailed&amp;nbsp;explanation&amp;nbsp;of&amp;nbsp;this class&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #444444; font-family: &#39;PT Sans Caption&#39;; font-size: 13px; line-height: 18.2000007629395px;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: blue; font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #444444; line-height: 18.2000007629395px;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: 13px; font-weight: bold;&quot;&gt;2 - &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Creates a new ArrayList and stores it as a List, the superclass of ArrayList. The angle brackets tell the compiler what type of Objects are to be stored in the collection.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #444444; font-family: &#39;PT Sans Caption&#39;; font-size: 13px; line-height: 18.2000007629395px;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: blue; font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #444444; line-height: 18.2000007629395px;&quot;&gt;&lt;b style=&quot;color: blue; font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: 13px;&quot;&gt;3 - &amp;nbsp;&lt;/b&gt;&lt;span style=&quot;line-height: 18.2000007629395px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Creates a new connection or grabs one from the pool. This method is explained in Part 3 of this series.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #444444; font-family: &#39;PT Sans Caption&#39;; font-size: 13px; line-height: 18.2000007629395px;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: blue; font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #444444; line-height: 18.2000007629395px;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: 13px; font-weight: bold;&quot;&gt;4 -&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;line-height: 18.2000007629395px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Inside the while loop, it creates an new SelectItem object for each row in the result set. &amp;nbsp;The SelectItem object is a JSF object that represents a value that the user can select.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #444444; font-family: &#39;PT Sans Caption&#39;; font-size: 13px; line-height: 18.2000007629395px;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: blue; font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; line-height: 18.2000007629395px;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: 13px; font-weight: bold;&quot;&gt;5 -&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #444444; line-height: 18.2000007629395px;&quot;&gt;Populates the ArrayList with the SelectItem object&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; line-height: 18.2000007629395px;&quot;&gt;&lt;span style=&quot;color: #444444; line-height: 18.2000007629395px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #444444; line-height: 18.2000007629395px;&quot;&gt;&lt;span style=&quot;color: blue; font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: 13px; font-weight: bold;&quot;&gt;6 -&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;line-height: 18.2000007629395px;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;The finally statement always runs, and is the recommended place to close out resources. If that operation fails then we throw the exception.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: white; color: #444444; font-family: &#39;PT Sans Caption&#39;; font-size: 13px; line-height: 18.2000007629395px;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;h3&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Attribution&lt;/span&gt;&lt;/h3&gt;&lt;div&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;The basis for the code here is taken from &lt;a href=&quot;http://stackoverflow.com/questions/21532641/populating-selectitems-of-the-combobox-label-value-using-a-managed-bean&quot; target=&quot;_blank&quot;&gt;this Stack Overflow question&lt;/a&gt; answered by Mark Leusink. Thanks Mark!&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;</description><link>http://notesspeak.blogspot.com/2015/05/using-db2-in-xpages-part-6-populating.html</link><author>[email protected] (The Zavocki&#39;s)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-71u5vg1qe9M/VU0dwRIzo3I/AAAAAAAAHdI/n3jHz-IQBdw/s72-c/Capture5-8.PNG" height="72" width="72"/><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4805395909933518229.post-182846106807507205</guid><pubDate>Fri, 01 May 2015 10:52:00 +0000</pubDate><atom:updated>2015-05-01T04:52:32.064-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">DB2</category><category domain="http://www.blogger.com/atom/ns#">xpages</category><title>Using DB2 in XPages Part 5: Creating a Simple SELECT Query to Populate a Page</title><description>&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Now that I have finally laid the groundwork for connecting to DB2 in parts 1-4, it is time to show the fun stuff, actually using it. &lt;/span&gt;&lt;b style=&quot;font-family: inherit;&quot;&gt;In this post, I will show how to populate the contents of a page using DB2 data. &lt;/b&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;This example will SELECT data based on a value&amp;nbsp;&lt;/span&gt;inputted&lt;span style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp;by a user and refresh the page,&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;h3&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Strategy For Binding UI elements to data&lt;/span&gt;&lt;/h3&gt;&lt;br /&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;When we first started using DB2 as a backend, we had each data element tied to a member of a managed bean, each with its own getter and setter. This is a fine approach, and we still use it for the older pages in our application. &amp;nbsp;An easier approach is to just bind every UI element to viewScope and update the viewScope in our java controller methods. This example will show the latter.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;h3&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Company Standards&lt;/span&gt;&lt;/h3&gt;&lt;br /&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Before I begin, let me explain that my company has a few standards that must be followed&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;for using SQL&amp;nbsp;statements. The standards are that * is not allowed, and we must use prepared statements where we inject our dependencies. I don&#39;t understand the former, but completely agree with the latter. The one exception that is allowed is that the Schema value&amp;nbsp;&lt;/span&gt;(PROD, INTG, UNIT)&amp;nbsp;&lt;span style=&quot;font-family: inherit;&quot;&gt;can be added via String addition.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Code Example with footnotes&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: blue; font-family: Trebuchet MS, sans-serif;&quot;&gt;1&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Courier New;&quot;&gt;//Date converters for use in various methods&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;SimpleDateFormat&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;formatDateUI&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&amp;nbsp;=&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&lt;b style=&quot;line-height: 18.4599990844727px;&quot;&gt;new&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&amp;nbsp;SimpleDateFormat(&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&quot;MM/dd/yyyy&quot;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;); &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;//&lt;u style=&quot;line-height: 18.4599990844727px;&quot;&gt;dateformatter&lt;/u&gt;&amp;nbsp;to convert to UI friendly format&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;SimpleDateFormat&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;formatDateDB2&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&amp;nbsp;=&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&lt;b style=&quot;line-height: 18.4599990844727px;&quot;&gt;new&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&amp;nbsp;SimpleDateFormat(&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&quot;yyyy-MM-dd&quot;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;);&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;//&lt;u style=&quot;line-height: 18.4599990844727px;&quot;&gt;dataformatter&lt;/u&gt;&amp;nbsp;to convert to DB2 format&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br style=&quot;background-color: white; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&lt;b style=&quot;line-height: 18.4599990844727px;&quot;&gt;public&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&lt;b style=&quot;line-height: 18.4599990844727px;&quot;&gt;void&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&amp;nbsp;loadPersonInfo(String userID, String schema){&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #38761d; font-family: Courier New;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: blue; font-family: Trebuchet MS, sans-serif;&quot;&gt;2&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;FacesContext facesContext = FacesContext.&lt;i style=&quot;line-height: 18.4599990844727px;&quot;&gt;getCurrentInstance&lt;/i&gt;();&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&amp;nbsp; Map&amp;lt;String, Object&amp;gt; viewScope = facesContext.getViewRoot().getViewMap();&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #38761d; font-family: Courier New;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: blue; font-family: Trebuchet MS, sans-serif;&quot;&gt;3&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;XyzConnectionManager cm =&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&lt;b style=&quot;line-height: 18.4599990844727px;&quot;&gt;new&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&amp;nbsp;XyzConnectionManager();&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: blue; font-family: Trebuchet MS, sans-serif;&quot;&gt;4&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;PreparedStatement ps =&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&lt;b style=&quot;line-height: 18.4599990844727px;&quot;&gt;null&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&amp;nbsp; ResultSet rs =&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&lt;b style=&quot;line-height: 18.4599990844727px;&quot;&gt;null&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&amp;nbsp; Connection c =&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&lt;b style=&quot;line-height: 18.4599990844727px;&quot;&gt;null&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br style=&quot;background-color: white; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&lt;b style=&quot;line-height: 18.4599990844727px;&quot;&gt;try&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&amp;nbsp;{&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;// Get Connection from ConnectionManager&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #38761d; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: blue; font-family: Trebuchet MS, sans-serif;&quot;&gt;5&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;c = cm.getConnection();&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;&lt;br style=&quot;background-color: white; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: blue; font-family: Trebuchet MS, sans-serif;&quot;&gt;6&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;color: blue; font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;String sql =&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&quot;Select USER_ID, FIRST_NAME, LAST_NAME, START_DATE6&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&quot; +&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&quot;USER_BRANCH_ID, BRANCH_NAME, BRANCH_STATE, BRANCH_CITY, BRANCH_ZIP &quot; +&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&quot;FROM &quot;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&amp;nbsp;+ schema +&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&quot;.USERDETAIL01 INNER JOIN &quot;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&amp;nbsp;+ schema +&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&quot;.USERBRANCH &quot; +&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;on USER_BR_ID = USER_BRANCH_ID&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;WHERE USER_ID=?&quot;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br style=&quot;background-color: white; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;// Create Statement Object&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #38761d; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: blue; font-family: Trebuchet MS, sans-serif;&quot;&gt;7&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;ps = c.prepareStatement(sql);&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ps.setString(1, atmID);&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br style=&quot;background-color: white; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;// Run Query&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&lt;b style=&quot;line-height: 18.4599990844727px;&quot;&gt;boolean&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&amp;nbsp;result = ps.execute();&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&lt;b style=&quot;line-height: 18.4599990844727px;&quot;&gt;if&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&amp;nbsp;(result) {&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; rs = ps.getResultSet();&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #38761d; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: blue; font-family: Trebuchet MS, sans-serif;&quot;&gt;8 &lt;/span&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;rs.next();&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br style=&quot;background-color: white; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: blue; font-family: Trebuchet MS, sans-serif;&quot;&gt;9 &amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;viewScope.put(&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&quot;manageFirstName&quot;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;, rs.getString(&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&quot;FIRST_NAME&quot;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;));&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; viewScope.put(&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&quot;manageLastName&quot;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;, rs.getString(&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&quot;LAST_NAME&quot;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;).trim());&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; viewScope.put(&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&quot;manageBranchName&quot;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;, rs.getString(&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&quot;BRANCH_NAME&quot;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;).trim());&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; viewScope.put(&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&quot;manageBranchCity&quot;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;, rs.getString(&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&quot;BRANCH_CITY&quot;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;).trim());&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; viewScope.put(&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&quot;manageBranchState&quot;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;, rs.getString(&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&quot;BRANCH_STATE&quot;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;).trim());&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; viewScope.put(&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&quot;manageBranchZip&quot;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;, rs.getString(&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&quot;BRANCH_ZIP&quot;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;).trim());&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: blue; font-family: Trebuchet MS, sans-serif;&quot;&gt;10&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;viewScope.put(&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&quot;manageStartDate&quot;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;,&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;formatDateUI&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;.format(rs.getDate(&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&quot;START_DATE&quot;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;)));&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; }&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&lt;b style=&quot;line-height: 18.4599990844727px;&quot;&gt;catch&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&amp;nbsp;(SQLException e) {&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log.error(&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&quot;ERROR in loadPersonInfo: &quot;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&amp;nbsp;+ e.toString());&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; }&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&lt;b style=&quot;line-height: 18.4599990844727px;&quot;&gt;finally&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&amp;nbsp;{&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #38761d; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #38761d; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: blue; font-family: Trebuchet MS, sans-serif;&quot;&gt;11&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&lt;b style=&quot;line-height: 18.4599990844727px;&quot;&gt;try&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&amp;nbsp;{&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;// close resources&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; rs.close();&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ps.close();&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; c.close();&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&lt;b style=&quot;line-height: 18.4599990844727px;&quot;&gt;catch&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&amp;nbsp;(SQLException e) {&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log.error(&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&quot;FATAL EXCEPTION &quot; +&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: &#39;Courier New&#39;;&quot;&gt;e.toString() +&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;in loadPersonInfo&quot;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&lt;b style=&quot;line-height: 18.4599990844727px;&quot;&gt;throw&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&lt;b style=&quot;line-height: 18.4599990844727px;&quot;&gt;new&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&amp;nbsp;RuntimeException(e);&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;h3&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;background-color: white; line-height: 21.2999992370605px;&quot;&gt;Code Explanation using footnotes&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;div&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;background-color: white; line-height: 21.2999992370605px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: blue; font-family: Trebuchet MS, sans-serif; font-weight: bold;&quot;&gt;1 &amp;nbsp;- &lt;/span&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;These two Date formatters are very useful for writing between XPages and DB2. The format YYYY-MM-DD is the standard date format for DB2.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: blue; font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: blue; font-family: Trebuchet MS, sans-serif; font-weight: bold;&quot;&gt;2 - &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;We have found it necessary to get a new handle to viewScope in every method where it is used&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: blue; font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b style=&quot;color: blue; font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;3 - &amp;nbsp;&lt;/b&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Creates new instance of our connection manager class, see Part 3 for a detailed&amp;nbsp;explanation&amp;nbsp;of&amp;nbsp;this class&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: blue; font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: blue; font-family: Trebuchet MS, sans-serif; font-weight: bold;&quot;&gt;4 - &lt;/span&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;We use the PreparedStatement class to build our query, this is done to follow my company standards, and also a good practice.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: blue; font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: blue; font-family: Trebuchet MS, sans-serif; font-weight: bold;&quot;&gt;5 - &lt;/span&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Creates a new connection or grabs one from the pool. This method is explained in Part 3 of this series.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: blue; font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: blue; font-family: Trebuchet MS, sans-serif; font-weight: bold;&quot;&gt;6 - &lt;/span&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Our SQL statement which includes a join, and one dependency. The dependency is typically user input.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: blue; font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: blue; font-family: Trebuchet MS, sans-serif; font-weight: bold;&quot;&gt;7 - &lt;/span&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Preparing our statement. This is where we insert the dependencies. The number of dependencies added here, must match exactly what is in the SQL statement.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: blue; font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: blue; font-family: Trebuchet MS, sans-serif; font-weight: bold;&quot;&gt;8 - &lt;/span&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;This takes you to the first record in the result set and is necessary&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: blue; font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b style=&quot;color: blue; font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;9 - &lt;/b&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Populating the viewScope from the resultSet. &amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: blue; font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: blue; font-family: Trebuchet MS, sans-serif; font-weight: bold;&quot;&gt;10 - &lt;/span&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Using the Date Formatter explained in footnote 1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: blue; font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b style=&quot;color: blue; font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;11 - &lt;/b&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;The finally statement always runs, and is the recommended place to close out resources. If that operation fails then we throw the exception.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;h3&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;Next Post&lt;/span&gt;&lt;/h3&gt;&lt;div&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;In my next post, I will show how to populate a Combobox with the values from a DB2 Query.&lt;/span&gt;&lt;/div&gt;</description><link>http://notesspeak.blogspot.com/2015/05/using-db2-in-xpages-part-5-creating.html</link><author>[email protected] (The Zavocki&#39;s)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4805395909933518229.post-3093705576802680959</guid><pubDate>Mon, 27 Apr 2015 01:20:00 +0000</pubDate><atom:updated>2015-04-26T19:20:49.859-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">DB2</category><category domain="http://www.blogger.com/atom/ns#">xpages</category><title>Using DB2 in XPages Part 4: Setting up the Database Connection for use with SSJS</title><description>In this fourth entry in my blog series on XPages and DB2, I will explain the additional steps necessary for SSJS access, if using parameterized connection information. This post isn&#39;t intended to stand alone but build on what I discussed in &lt;a href=&quot;http://notesspeak.blogspot.com/2015/04/using-db2-in-xpages-part-3-setting-up.html&quot; target=&quot;_blank&quot;&gt;part 3&lt;/a&gt;. &amp;nbsp;I will say this, if you decide to store your credentials in the db2.jdbc XML file then everything here in this post is unnecessary for you. &lt;b&gt;If you are an XPages developer and have never had made your own custom tags, then this post might serve as a general example on how to go about doing that.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Create Custom Control for adding your Customized Connection Manager&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To take advantage of our connection manager java class (described in part 3) in SSJS, we need to create a custom control for adding the connection manager to each page. For simplicity, we name it the same thing as our java class, which is XYZConnectionManager. &amp;nbsp;In order to make our own custom control, we have to create an faces-config extension file, or add to it, if we already have one. We cannot put our entry directly in the main face-config as this doesn&#39;t compile. The faces-config extension is a separate file that you create when necessary for the purpose of creating custom tags.&lt;br /&gt;&lt;br /&gt;This file should be copied into the WEB-INF folder alongside the faces-config file using the Package Explorer. &lt;br /&gt;&lt;br /&gt;Here is what the contents of the file look like.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: teal; font-family: Courier New;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #3f8080; font-family: Courier New;&quot;&gt;faces-config&lt;/span&gt;&lt;span style=&quot;background-color: white; color: teal; font-family: Courier New;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background-color: white; color: teal; font-family: Courier New;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #3f8080; font-family: Courier New;&quot;&gt;faces-config-extension&lt;/span&gt;&lt;span style=&quot;background-color: white; color: teal; font-family: Courier New;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: blue; font-family: Trebuchet MS, sans-serif;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;background-color: white; color: teal; font-family: Courier New;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #3f8080; font-family: Courier New;&quot;&gt;namespace-uri&lt;/span&gt;&lt;span style=&quot;background-color: white; color: teal; font-family: Courier New;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: blue; cursor: pointer; font-family: Courier New; line-height: normal;&quot;&gt;&lt;a href=&quot;http://www.xyzcompany.org/xpages/component&quot; style=&quot;background-color: white; color: #0068cf; cursor: pointer; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot; target=&quot;_blank&quot;&gt;http://www.xyzCompany.org/xpages/component&lt;/a&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: teal; font-family: Courier New;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #3f8080; font-family: Courier New;&quot;&gt;namespace-uri&lt;/span&gt;&lt;span style=&quot;background-color: white; color: teal; font-family: Courier New;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: blue; font-family: Trebuchet MS, sans-serif;&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;background-color: white; color: teal; font-family: Courier New;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #3f8080; font-family: Courier New;&quot;&gt;default-prefix&lt;/span&gt;&lt;span style=&quot;background-color: white; color: teal; font-family: Courier New;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;xyz&lt;/span&gt;&lt;span style=&quot;background-color: white; color: teal; font-family: Courier New;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #3f8080; font-family: Courier New;&quot;&gt;default-prefix&lt;/span&gt;&lt;span style=&quot;background-color: white; color: teal; font-family: Courier New;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background-color: white; color: teal; font-family: Courier New;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #3f8080; font-family: Courier New;&quot;&gt;faces-config-extension&lt;/span&gt;&lt;span style=&quot;background-color: white; color: teal; font-family: Courier New;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background-color: white; color: teal; font-family: Courier New;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #3f8080; font-family: Courier New;&quot;&gt;component&lt;/span&gt;&lt;span style=&quot;background-color: white; color: teal; font-family: Courier New;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: teal; font-family: Courier New;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #3f8080; font-family: Courier New;&quot;&gt;display-name&lt;/span&gt;&lt;span style=&quot;background-color: white; color: teal; font-family: Courier New;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;XYZ Connection Manager&lt;/span&gt;&lt;span style=&quot;background-color: white; color: teal; font-family: Courier New;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #3f8080; font-family: Courier New;&quot;&gt;display-name&lt;/span&gt;&lt;span style=&quot;background-color: white; color: teal; font-family: Courier New;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: blue; font-family: Trebuchet MS, sans-serif;&quot;&gt;3&lt;/span&gt;&lt;span style=&quot;background-color: white; color: teal; font-family: Courier New;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #3f8080; font-family: Courier New;&quot;&gt;component-type&lt;/span&gt;&lt;span style=&quot;background-color: white; color: teal; font-family: Courier New;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&lt;u style=&quot;line-height: 18.4599990844727px;&quot;&gt;com&lt;/u&gt;.&lt;u style=&quot;line-height: 18.4599990844727px;&quot;&gt;ibm&lt;/u&gt;.&lt;u style=&quot;line-height: 18.4599990844727px;&quot;&gt;xsp&lt;/u&gt;.&lt;u style=&quot;line-height: 18.4599990844727px;&quot;&gt;extlib&lt;/u&gt;.relational.&lt;u style=&quot;line-height: 18.4599990844727px;&quot;&gt;jdbc&lt;/u&gt;.JdbcConnectionManager&lt;/span&gt;&lt;span style=&quot;background-color: white; color: teal; font-family: Courier New;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #3f8080; font-family: Courier New;&quot;&gt;component-type&lt;/span&gt;&lt;span style=&quot;background-color: white; color: teal; font-family: Courier New;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: teal; font-family: Courier New;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #3f8080; font-family: Courier New;&quot;&gt;component-class&lt;/span&gt;&lt;span style=&quot;background-color: white; color: teal; font-family: Courier New;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&lt;u style=&quot;line-height: 18.4599990844727px;&quot;&gt;org&lt;/u&gt;.&lt;span style=&quot;line-height: 18.4599990844727px;&quot;&gt;&lt;u&gt;xyz&lt;/u&gt;&lt;/span&gt;.&lt;u style=&quot;line-height: 18.4599990844727px;&quot;&gt;atm&lt;/u&gt;.&lt;u style=&quot;line-height: 18.4599990844727px;&quot;&gt;util&lt;/u&gt;.XyzConnectionManager&lt;/span&gt;&lt;span style=&quot;background-color: white; color: teal; font-family: Courier New;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #3f8080; font-family: Courier New;&quot;&gt;component-class&lt;/span&gt;&lt;span style=&quot;background-color: white; color: teal; font-family: Courier New;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: teal; font-family: Courier New;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #3f8080; font-family: Courier New;&quot;&gt;component-extension&lt;/span&gt;&lt;span style=&quot;background-color: white; color: teal; font-family: Courier New;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: teal; font-family: Courier New;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #3f8080; font-family: Courier New;&quot;&gt;base-component&lt;/span&gt;&lt;span style=&quot;background-color: white; color: teal; font-family: Courier New;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&lt;u style=&quot;line-height: 18.4599990844727px;&quot;&gt;com&lt;/u&gt;.&lt;u style=&quot;line-height: 18.4599990844727px;&quot;&gt;ibm&lt;/u&gt;.&lt;u style=&quot;line-height: 18.4599990844727px;&quot;&gt;xsp&lt;/u&gt;.&lt;u style=&quot;line-height: 18.4599990844727px;&quot;&gt;extlib&lt;/u&gt;.relational.&lt;u style=&quot;line-height: 18.4599990844727px;&quot;&gt;jdbc&lt;/u&gt;.JdbcConnectionManager&lt;/span&gt;&lt;span style=&quot;background-color: white; color: teal; font-family: Courier New;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #3f8080; font-family: Courier New;&quot;&gt;base-component&lt;/span&gt;&lt;span style=&quot;background-color: white; color: teal; font-family: Courier New;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background-color: white; color: blue; font-family: Trebuchet MS, sans-serif;&quot;&gt;4&lt;/span&gt;&lt;span style=&quot;background-color: white; color: teal; font-family: Courier New;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #3f8080; font-family: Courier New;&quot;&gt;tag-name&lt;/span&gt;&lt;span style=&quot;background-color: white; color: teal; font-family: Courier New;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;XyzConnectionManager&lt;/span&gt;&lt;span style=&quot;background-color: white; color: teal; font-family: Courier New;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #3f8080; font-family: Courier New;&quot;&gt;tag-name&lt;/span&gt;&lt;span style=&quot;background-color: white; color: teal; font-family: Courier New;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: teal; font-family: Courier New;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #3f8080; font-family: Courier New;&quot;&gt;designer-extension&lt;/span&gt;&lt;span style=&quot;background-color: white; color: teal; font-family: Courier New;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: teal; font-family: Courier New;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #3f8080; font-family: Courier New;&quot;&gt;category&lt;/span&gt;&lt;span style=&quot;background-color: white; color: teal; font-family: Courier New;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;XYZ Custom&lt;/span&gt;&lt;span style=&quot;background-color: white; color: teal; font-family: Courier New;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #3f8080; font-family: Courier New;&quot;&gt;category&lt;/span&gt;&lt;span style=&quot;background-color: white; color: teal; font-family: Courier New;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: teal; font-family: Courier New;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #3f8080; font-family: Courier New;&quot;&gt;generate-id&lt;/span&gt;&lt;span style=&quot;background-color: white; color: teal; font-family: Courier New;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;true&lt;/span&gt;&lt;span style=&quot;background-color: white; color: teal; font-family: Courier New;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #3f8080; font-family: Courier New;&quot;&gt;generate-id&lt;/span&gt;&lt;span style=&quot;background-color: white; color: teal; font-family: Courier New;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background-color: white; color: blue; font-family: Trebuchet MS, sans-serif;&quot;&gt;5&lt;/span&gt;&lt;span style=&quot;background-color: white; color: teal; font-family: Courier New;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #3f8080; font-family: Courier New;&quot;&gt;in-palette&lt;/span&gt;&lt;span style=&quot;background-color: white; color: teal; font-family: Courier New;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;true&lt;/span&gt;&lt;span style=&quot;background-color: white; color: teal; font-family: Courier New;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #3f8080; font-family: Courier New;&quot;&gt;in-palette&lt;/span&gt;&lt;span style=&quot;background-color: white; color: teal; font-family: Courier New;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background-color: white; color: teal; font-family: Courier New;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #3f8080; font-family: Courier New;&quot;&gt;visible&lt;/span&gt;&lt;span style=&quot;background-color: white; color: teal; font-family: Courier New;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;true&lt;/span&gt;&lt;span style=&quot;background-color: white; color: teal; font-family: Courier New;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #3f8080; font-family: Courier New;&quot;&gt;visible&lt;/span&gt;&lt;span style=&quot;background-color: white; color: teal; font-family: Courier New;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background-color: white; color: teal; font-family: Courier New;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #3f8080; font-family: Courier New;&quot;&gt;designer-extension&lt;/span&gt;&lt;span style=&quot;background-color: white; color: teal; font-family: Courier New;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background-color: white; color: teal; font-family: Courier New;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #3f8080; font-family: Courier New;&quot;&gt;component-extension&lt;/span&gt;&lt;span style=&quot;background-color: white; color: teal; font-family: Courier New;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background-color: white; color: teal; font-family: Courier New;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #3f8080; font-family: Courier New;&quot;&gt;component&lt;/span&gt;&lt;span style=&quot;background-color: white; color: teal; font-family: Courier New;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: teal; font-family: Courier New;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #3f8080; font-family: Courier New;&quot;&gt;faces-config&lt;/span&gt;&lt;span style=&quot;background-color: white; color: teal; font-family: Courier New;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Essentially what you are doing here is creating your own tag here that you can add to any page. &amp;nbsp;In this case, you will get access to the relational controls for whatever page in which you add the custom tag. &amp;nbsp;This would replace adding the built-in JDBCConnectionManager to your page. &lt;br /&gt;&lt;br /&gt;Here is a explanation of key parts of this file:&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: blue; font-family: Trebuchet MS, sans-serif;&quot;&gt;1&lt;/span&gt; - The namespace URI needs to only be a unique value. &amp;nbsp;It does not need to resolve to a real URL, just as the XSP namespace does not resolve to a real URL.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: blue; font-family: Trebuchet MS, sans-serif;&quot;&gt;2&lt;/span&gt; - This is the prefix we chose for our tag. This is analogous to &quot;xp&quot; for core controls, or &quot;xe&quot; for extension library controls.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span style=&quot;color: blue; font-family: Trebuchet MS, sans-serif;&quot;&gt;3&lt;/span&gt;&lt;/b&gt; - This maps the control to the java class we want to use&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: blue; font-family: Trebuchet MS, sans-serif;&quot;&gt;4&lt;/span&gt; - This is the name of the tag that we show in our code&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: blue; font-family: Trebuchet MS, sans-serif;&quot;&gt;5&lt;/span&gt; - Setting this to true, make the control show up in our palette where we can drag it onto a page&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Sample Usage:&lt;/b&gt;&lt;br /&gt;1) Include the new name space in your xpView tag at the very top&lt;br /&gt;&lt;span style=&quot;color: #274e13;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;xmlns:&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;xyz=&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&lt;i style=&quot;line-height: 18.4599990844727px;&quot;&gt;&quot;&lt;/i&gt;&lt;/span&gt;&lt;a href=&quot;http://www.navyfederal.org/xpages/component&quot; style=&quot;background-color: white; cursor: pointer; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;font-family: Courier New; line-height: normal;&quot;&gt;&lt;i style=&quot;line-height: 18.4599990844727px;&quot;&gt;http://www.xyzcompany.org/xpages/component&lt;/i&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;background-color: white; font-family: Courier New;&quot;&gt;&lt;i style=&quot;line-height: 18.4599990844727px;&quot;&gt;&quot;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; font-size: 15px; line-height: 21.2999992370605px;&quot; /&gt;&lt;br style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; font-size: 15px; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white;&quot;&gt;2) Drag your control on the page using the&amp;nbsp;palette or type it in the source.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: teal; font-family: Courier New;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #3f8080; font-family: Courier New;&quot;&gt;xyz:XyzConnectionManager&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: purple; font-family: Courier New;&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #4200ff; font-family: Courier New;&quot;&gt;&lt;i style=&quot;line-height: 18.4599990844727px;&quot;&gt;&quot;XyzConnectionManager1&quot;&lt;/i&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: teal; font-family: Courier New;&quot;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #3f8080; font-family: Courier New;&quot;&gt;xyz:XyzConnectionManager&lt;/span&gt;&lt;span style=&quot;background-color: white; color: teal; font-family: Courier New;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You will want to put this tag on any page that uses the relational controls, or put this in your application layout once, which makes it available on any page.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Known Issue:&lt;/b&gt;&lt;br /&gt;For some reason, Designer often &quot;forgets&quot; about the faces-extension file and creates an unknown tag error on every page where it is used. &amp;nbsp;If you go and edit something in the faces-extension file and save the &quot;change&quot; (without really changing anything) and the clean your application the errors will go away. It sometimes takes two cleans.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Next Post&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In my next post, I will finally get to the part where I can show how we use DB2 as our backend datastore. I will start with how to write a simple SELECT statement to populate a page.&amp;nbsp;&lt;/div&gt;&lt;/div&gt;</description><link>http://notesspeak.blogspot.com/2015/04/using-db2-in-xpages-part-4-setting-up.html</link><author>[email protected] (The Zavocki&#39;s)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4805395909933518229.post-509862387908163396</guid><pubDate>Thu, 16 Apr 2015 02:09:00 +0000</pubDate><atom:updated>2015-04-15T20:10:11.833-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">DB2</category><category domain="http://www.blogger.com/atom/ns#">xpages</category><title>Using DB2 in XPages Part 3: Setting up the Database Connection</title><description>In this third entry in my blog series, I will explain the process that we used to set up a connection to the DB2 database.&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3&gt;Ground Rules&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The major ground rule that we had to follow was that connection parameters, including username and password, cannot be stored in an XML file the way that IBM recommends. These values must be passed in to the connection manager via a parameter. All connection information must be pulled from a central location for each environment. We keep this information in a Notes database and use keywords to hold the path to this connection repository database.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;It was no small effort to set up the connection manager to accept keywords. I will first explain what we needed to do for java access in this post, and in Part 4, I will explain the additional steps needed for SSJS access. &amp;nbsp;See &lt;a href=&quot;http://notesspeak.blogspot.com/2015/04/using-db2-in-xpages-part-2-application.html&quot;&gt;Part 2&lt;/a&gt; for an explanation of how the database architecture is setup.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3&gt;Assumptions&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;First off, I am assuming that you are using Notes 9. &amp;nbsp;Next, I am assuming that you have downloaded the Extension Library from OpenNTF. The one that comes with Notes 9 does not contain the relational controls that you need. In November 2014, the relational controls were integrated into the main library. However, we had problems with the November version. The one we are using is the Dec 19, 2014 release. I recommend that one, or a newer release. You need to install it on your server &lt;i&gt;and&lt;/i&gt; your Designer client.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3&gt;Setting Up Your Connection&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Given the aforementioned ground rules, you will need to follow all of these steps to set up your connection.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;1) Ensure that the Extension Library is installed, and make sure the relational libraries are loaded for your database. Even though the libraries are included in the main library download, you still have to choose to add them to your database. &amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-VI0VrYzU4RA/VS8Rhpi5CrI/AAAAAAAAHZY/E3uCXbSw1uM/s1600/Capture4-15.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/-VI0VrYzU4RA/VS8Rhpi5CrI/AAAAAAAAHZY/E3uCXbSw1uM/s1600/Capture4-15.PNG&quot; height=&quot;147&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;2) Make sure the DB2 connection information gets created in the external connection repository database. For each connection you need these values: Username, Password, Driver, and URL&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;3) Create keywords lookup values. We use a Keyword Bean bound to Application Scope to hold all our keyword values. At a minimum, you will need values for:&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Schema&lt;/li&gt;&lt;li&gt;DB2 Driver&lt;/li&gt;&lt;li&gt;Path to connection repository database&lt;/li&gt;&lt;li&gt;Key in connection repository database&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;We use a managed bean for keywords; use whatever method you like.&lt;br /&gt;&lt;ul&gt;&lt;/ul&gt;&lt;div&gt;4) Create Credentials.java class. As the name implies, this class loads the credentials and stores them in memory for all users. This class is a managed bean bound to applicationScope. See the code below in the Code Explanation section. &amp;nbsp;I think that if just using this for java (no SSJS), then you would want to make this a POJO.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;5) The next step involves creating a class that extends the &lt;a href=&quot;https://github.com/OpenNTF/XPagesExtensionLibrary/blob/6a4c6a664ca1f471d3aca7bc9b1049954951c657/extlib/lwp/product/runtime/eclipse/plugins/com.ibm.xsp.extlib.relational/src/com/ibm/xsp/extlib/relational/component/jdbc/UIJdbcConnectionManager.java&quot;&gt;UIJdbcConnectionManager&lt;/a&gt; class. This is necessary in order to use passed in connection details. For this example, let&#39;s pretend that my employer is XYZ Corporation, &amp;nbsp;I would name this class XYZConnectionManager. This code is also explained below in the Code Explanation Section.&lt;br /&gt;&lt;br /&gt;For java newbies, to extend a class means that we make a child class that inherits all the methods of the parent class. This allows you to add or overwrite functionality depending on your need. In our case, we implement an alternate way to read the credentials, but otherwise leave all the rest of the functionality intact.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Code Explanation - Credentials Class&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;gt;&amp;gt;Package, Imports, and Logging Removed&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;public class Credentials implements Serializable{&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;private static final long serialVersionUID = 1L;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;public Credentials(){} &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;Default no argument constructor&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;public void load(){&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;HashMap&amp;lt;String,String&amp;gt; r = new HashMap&amp;lt;String,String&amp;gt;();&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;// Get FacesContext &lt;/span&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;Standard Way to Get Scoped Variable&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;FacesContext context = FacesContext.getCurrentInstance();&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;Map applicationScope = context.getExternalContext().getApplicationMap();&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;// Get keywordBean &lt;/span&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;gt;&amp;gt;Relates to Step 3 above&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;KeywordBean kw = this.getKeywords();&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;String dbpath = kw.getString(&quot;dbpasspath&quot;);&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;String dbview = kw.getString(&quot;dbpassview&quot;);&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;String dbkey = kw.getString(&quot;dbpasskey&quot;);&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;try {&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Session s = (Session)context.getApplication().getVariableResolver().&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; resolveVariable(context, &quot;sessionAsSigner&quot;);&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; if(!s.isValid()){&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;gt;&amp;gt;log error condition&lt;/span&gt;&lt;span style=&quot;color: #38761d; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;(&quot;Unable to access sessionAsSigner.&quot;);&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;return;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;} &lt;/span&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;gt;&amp;gt;Makes sure proper permissions are in place&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;gt;&amp;gt;Get Handle to Notes Database that is connection repository&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; Database db_pass = s.getDatabase(s.getServerName(), dbpath);&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; if (db_pass.isOpen()) {&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; View v = db_pass.getView(dbview);&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;if (v != null) {&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Document doc = v.getDocumentByKey(dbkey, true);&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (doc != null) {&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// ensure these HashMap variables match with the XYZConnectionManager&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;r.put(&quot;driver&quot;, kw.getString(&quot;DBDriver&quot;));&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;r.put(&quot;url&quot;, doc.getItemValueString(&quot;PI_JDBCURL&quot;));&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;r.put(&quot;user&quot;, doc.getItemValueString(&quot;PI_Username&quot;));&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;r.put(&quot;password&quot;, doc.getItemValueString(&quot;PI_Password&quot;));&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;applicationScope.put(&quot;dbpass&quot;,r);&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;doc.recycle();&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;v.recycle();&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;} else {&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;gt;&amp;gt;Log error condition&lt;/span&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;(&quot;Unable to open document&quot;);&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;} else {&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&amp;gt;&amp;gt;Log error condition&lt;/span&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;(&quot;Unable to open view Pass\\All&quot;);&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;}&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; } else {&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&amp;gt;&amp;gt;Log error condition&lt;/span&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;(&quot;Unable to open connection database&quot;);&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; }&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; if(db_pass.isOpen()){&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; db_pass.recycle();&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; }&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp;} catch (NotesException e) {&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&amp;gt;&amp;gt;Log error condition&lt;/span&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;(e.getLocalizedMessage());&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp;}&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;return;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;}&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;private KeywordBean getKeywords(){&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;gt;&amp;gt;Get handle to Keyword Bean for getting location to connections database&lt;/span&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;}&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;} //end Credentials.java&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;h3&gt;Code Explanation - XYZConnection Manager Class&lt;/h3&gt;&lt;div&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #444444;&quot;&gt;&lt;span style=&quot;background-color: white; font-family: Trebuchet MS, sans-serif;&quot;&gt;Note: If you use this, replace XYZ with your company name.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;color: #444444; font-family: sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&amp;gt;&amp;gt;Package, Imports, and Logging Removed&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; font-size: 15px; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;public class XYZConnectionManager extends UIJdbcConnectionManager {&lt;/span&gt;&lt;span style=&quot;background-color: white; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;gt;&amp;gt;UIjdbcConnectionManager is part of the Extension Library&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #38761d; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;private JdbcPoolDataSource dataSource = null;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #38761d; font-family: &#39;Courier New&#39;, Courier, monospace; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br style=&quot;background-color: white; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #38761d; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;public Connection createConnection() throws SQLException {&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #38761d; font-family: &#39;Courier New&#39;, Courier, monospace; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;gt;&amp;gt;This is the only method that we override from the superclass&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br style=&quot;background-color: white;&quot; /&gt;&lt;span style=&quot;background-color: white;&quot;&gt;// Initialize vars&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Calibri, sans-serif; font-size: 15px; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;String driver = &quot;&quot;;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;String url = &quot;&quot;;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;String user = &quot;&quot;;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;String password = &quot;&quot;;&lt;/span&gt;&lt;span style=&quot;background-color: white; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; line-height: 21.2999992370605px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;Standard Way to Get Scoped Variable&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #38761d; font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #38761d;&quot;&gt;FacesContext context = FacesContext.getCurrentInstance();&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #38761d; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;Map applicationScope = context.getExternalContext().getApplicationMap();&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;gt;&amp;gt;If the Credentials are already in applicationScope then use them, otherwise use Credentials class to load them&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #38761d; font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #38761d;&quot;&gt;try {&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #38761d; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #38761d;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// Read from ApplicationScope if available&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #38761d; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #38761d;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// ensure the values being retrieved match with the HashMap values set in the Credentials class&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #38761d; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #38761d;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (applicationScope.containsKey(&quot;dbpass&quot;)) {&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #38761d; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #38761d;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; HashMap dbpass = (HashMap) applicationScope.get(&quot;dbpass&quot;);&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #38761d; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #38761d;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (dbpass.containsKey(&quot;driver&quot;)) {&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #38761d; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #38761d;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; driver = (String) dbpass.get(&quot;driver&quot;);&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #38761d; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #38761d;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #38761d; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #38761d;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (dbpass.containsKey(&quot;url&quot;)) {&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #38761d; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #38761d;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;url = (String) dbpass.get(&quot;url&quot;);&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #38761d; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #38761d;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #38761d; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #38761d;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (dbpass.containsKey(&quot;user&quot;)) {&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #38761d; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #38761d;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; user = (String) dbpass.get(&quot;user&quot;);&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #38761d; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #38761d;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #38761d; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #38761d;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (dbpass.containsKey(&quot;password&quot;)) {&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #38761d; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #38761d;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;password = (String) dbpass.get(&quot;password&quot;);&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #38761d; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #38761d;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #38761d; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #38761d;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } else {&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #38761d; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #38761d;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// Try to get credentials&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #38761d; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #38761d;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;x.error(&quot;Warning: DB2Pass not loaded.&quot;);&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #38761d; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Credentials cred = new Credentials();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; color: #38761d; font-family: Calibri, sans-serif; font-size: 15px; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-size: 15px; line-height: 21.2999992370605px;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt; &amp;gt;&amp;gt;Not sure why original developer creates new instance here, if it is managed already&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; font-size: 15px; line-height: 21.2999992370605px;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #38761d; font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;background-color: white; color: #38761d; font-family: sans-serif;&quot;&gt;&amp;nbsp;cred.load();&lt;/span&gt;&lt;span style=&quot;background-color: white; line-height: 21.2999992370605px;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp;&lt;span style=&quot;font-size: 15px;&quot;&gt;&amp;gt;&amp;gt;Loads credentials from connection database, then reads from applicationScope&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #38761d; font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #38761d;&quot;&gt;&amp;nbsp;if (applicationScope.containsKey(&quot;dbpass&quot;)) {&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #38761d; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #38761d;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;HashMap dbpass = (HashMap) applicationScope.get(&quot;dbpass&quot;);&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #38761d; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #38761d;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (dbpass.containsKey(&quot;driver&quot;)) {&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #38761d; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #38761d;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; driver = (String) dbpass.get(&quot;driver&quot;);&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #38761d; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #38761d;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #38761d; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #38761d;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (dbpass.containsKey(&quot;url&quot;)) {&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #38761d; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #38761d;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;url = (String) dbpass.get(&quot;url&quot;);&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #38761d; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #38761d;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #38761d; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #38761d;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (dbpass.containsKey(&quot;user&quot;)) {&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #38761d; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #38761d;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; user = (String) dbpass.get(&quot;user&quot;);&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #38761d; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #38761d;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #38761d; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #38761d;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (dbpass.containsKey(&quot;password&quot;)) {&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #38761d; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #38761d;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;password = (String) dbpass.get(&quot;password&quot;);&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #38761d; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #38761d;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #38761d; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #38761d;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } else {&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #38761d; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #38761d; font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&amp;gt;&amp;gt;log error condition&lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp;&lt;span style=&quot;background-color: white; color: #38761d;&quot;&gt;(&quot;Unable to access connection credentials.&quot;);&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #38761d; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #38761d;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return null;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #38761d; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #38761d;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #38761d; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br style=&quot;background-color: white; line-height: 21.2999992370605px;&quot; /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #38761d;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #38761d; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #38761d;&quot;&gt;&amp;nbsp;} catch (Exception e) {&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #38761d; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #38761d; font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&amp;gt;&amp;gt;log error condition&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #38761d;&quot;&gt;(e.getLocalizedMessage());&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #38761d; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #38761d;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return null;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #38761d; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #38761d;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #38761d; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br style=&quot;background-color: white; line-height: 21.2999992370605px;&quot; /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #38761d;&quot;&gt;&amp;nbsp;// Create DataSource&lt;/span&gt;&lt;span style=&quot;background-color: white; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: Trebuchet MS, sans-serif; font-size: 15px; line-height: 21.2999992370605px;&quot;&gt;&amp;gt;&amp;gt;Creates the javax.sql.DataSource object which is needed to connect to DB2 using passed in parameters, only if needed, otherwise pulls from the connection pool. &amp;nbsp;Returns the Connection object.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #38761d; font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #38761d; font-size: x-small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #38761d;&quot;&gt;try {&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #38761d; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #38761d;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (this.dataSource == null) {&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #38761d; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #38761d;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;this.dataSource = new JdbcPoolDataSource(driver, url, user,&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #38761d; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #38761d; font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;password, 10, 20, 100, 0, 0, 0, 10000);&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #38761d; font-family: &#39;Courier New&#39;, Courier, monospace; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #38761d;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #38761d; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #38761d;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Connection c = dataSource.getConnection();&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #38761d; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #38761d;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;initConnection(context, c);&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #38761d; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #38761d;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return c;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #38761d; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br style=&quot;background-color: white; line-height: 21.2999992370605px;&quot; /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #38761d;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;} catch (PoolException e) {&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #38761d; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #38761d; font-family: sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&amp;gt;&amp;gt;log error condition&lt;/span&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #38761d;&quot;&gt;(&quot;PoolException creating JdbcPoolDataSource. &quot;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #38761d; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #38761d;&quot;&gt;+ e.getLocalizedMessage());&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #38761d; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #38761d;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #38761d; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #38761d;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return null;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #38761d; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #38761d;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;&lt;span style=&quot;background-color: white; line-height: 21.2999992370605px;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #38761d;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; private KeywordBean getKeywords() {&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #38761d; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;gt;&amp;gt;Get handle to Keyword Bean for getting location to connections database&lt;/span&gt;&lt;span style=&quot;color: #38761d; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #38761d; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #38761d;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #38761d; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #38761d;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #38761d; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #38761d; line-height: 21.2999992370605px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; line-height: 21.2999992370605px;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;b&gt;Sample Usage:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;XYZConnectionManager cm = new XYZConnectionManager();&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;Connection c =&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;cm.getConnection();&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;h3&gt;&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3&gt;Attribution&lt;/h3&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I did not personally write any of this code, but having to explain it has helped me to understand and share this information. &amp;nbsp;The code shown here is based on code originally developed by&lt;a href=&quot;http://lazynotesguy.net/blog/&quot;&gt; Lauri Laanti&lt;/a&gt;. &lt;a href=&quot;http://lazynotesguy.net/blog/2013/08/09/subclassing-an-extlib-component/&quot;&gt;Here&lt;/a&gt; is a blog post that Lauri wrote that explains what he did. (Lauri, if you see this, I hope you don&#39;t give up on that blog).&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I also need to give credit to a former coworker&amp;nbsp;Eric Dyer&amp;nbsp;and a current coworker Dwain Wuerfel, They did all this work in a previous project at my company. &amp;nbsp;We stole it for use in my current project.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3&gt;Next Post&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In my next post, I will explain what additional steps are necessary to connect to DB2 using server side javascript.&lt;/div&gt;</description><link>http://notesspeak.blogspot.com/2015/04/using-db2-in-xpages-part-3-setting-up.html</link><author>[email protected] (The Zavocki&#39;s)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-VI0VrYzU4RA/VS8Rhpi5CrI/AAAAAAAAHZY/E3uCXbSw1uM/s72-c/Capture4-15.PNG" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4805395909933518229.post-6678270374260834414</guid><pubDate>Wed, 08 Apr 2015 23:09:00 +0000</pubDate><atom:updated>2015-04-08T17:09:44.547-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">DB2</category><category domain="http://www.blogger.com/atom/ns#">xpages</category><title>Using DB2 in XPages Part 2: Application Architecture Overview</title><description>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;This is the second in my blog series on using an Db2 backend with XPages. &amp;nbsp;I will go over the application architecture, and do my best to explain why we did things the way we did.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;Working for a very large financial company, they are extremely concerned with protecting the security of their customers. &amp;nbsp;This is a good thing of course, especially considering some of the high profile breaches in recent years. &amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/--tTsOMYyf2Y/VRDJiKEZfOI/AAAAAAAAHXk/ZqMwKuvPSg0/s1600/no-easy-button.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;http://1.bp.blogspot.com/--tTsOMYyf2Y/VRDJiKEZfOI/AAAAAAAAHXk/ZqMwKuvPSg0/s1600/no-easy-button.png&quot; height=&quot;191&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;To protect themselves, they have a mindset of following security standards in developing applications, even internal applications like this one. &amp;nbsp;Standards are fine and good, but in the fast moving world of Web Application Development it is difficult to standardize on anything, because two years later the winds have changed. As a developer, I am very concerned with keeping up with the latest trends, and taking advantage of the collective knowledge of my blogging peers. &amp;nbsp;This can lead to some debate when the standards don&#39;t mesh with recent trends or best practices. As my coworkers could attest, I am always up for defending my position, but ultimately, you have to do what your employer says to do because hey, they are paying you.&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;clear: both; text-align: left;&quot;&gt;With that background being said, I want to explain that what is going to be explained in this blog series isn&#39;t intended to demonstrate the best way to connect to relational databases. &amp;nbsp;This series is going to cover the way we DID do it. &amp;nbsp;&lt;b&gt;I make no claims that this is the best, easiest or fastest way, but this is a way that did work and there is a lot to be said for that. &lt;/b&gt;&amp;nbsp;There are lessons that can be learned from what we did, or maybe even lessons on what not to do.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;h3&gt;Application Architecture&lt;/h3&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;clear: both; text-align: left;&quot;&gt;From the start, I designed the application to follow a Model-View-Controller style architecture. &amp;nbsp;For the most part I felt we were able to accomplish this goal, especially in keeping code segregated. Speaking of M-V-C, I found these &lt;a href=&quot;http://www.eknori.de/2015-04-03/slides-and-sample-application-from-my-presentation-engage-ics-ug/&quot;&gt;slides from Ulrich Krause at Engage 2015&lt;/a&gt; to be a very excellent overview of M-V-C in XPages. &amp;nbsp;Wish I could have seen the session.&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-85pdNjxVOvI/VSBVBq66aoI/AAAAAAAAHYc/Cj9UJR1Mn0Q/s1600/arch.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/-85pdNjxVOvI/VSBVBq66aoI/AAAAAAAAHYc/Cj9UJR1Mn0Q/s1600/arch.png&quot; height=&quot;202&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif; font-size: small;&quot;&gt;High Level Architecture&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class=&quot;&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;clear: both; text-align: left;&quot;&gt;Some key points not readily apparent from this high level chart. &amp;nbsp;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;The UI elements are not directly bound to DB2 data via the relational controls, they are bound to either viewScope or managed bean fields and changed using java methods in the controller layer. &amp;nbsp;&lt;/li&gt;&lt;li&gt;There is no Object Relational Mapping framework in place (ie: Hibernate)&lt;/li&gt;&lt;li&gt;&lt;i&gt;As much as possible&lt;/i&gt;&amp;nbsp;business logic is in java, but &lt;i&gt;all&lt;/i&gt; DB2 access is in java.&amp;nbsp;&lt;/li&gt;&lt;li&gt;The java methods in the controller layer contain actual SQL statements to interact with DB2.&amp;nbsp;&lt;/li&gt;&lt;li&gt;We are using the extention library relational controls, but do not use the &amp;nbsp;&amp;lt;xe:jdbcQuery&amp;gt; and &amp;lt;xe:jdbc:jdbcRowSet&amp;gt; (since all access is via java).&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;ul&gt;&lt;/ul&gt;&lt;h3&gt;Next Post&lt;/h3&gt;In my next post, I will explain the way we needed to handle credentials, as well as how we extended the connection manager class to handle passed in credentials. &amp;nbsp;I will show actual code next time, I promise :)</description><link>http://notesspeak.blogspot.com/2015/04/using-db2-in-xpages-part-2-application.html</link><author>[email protected] (The Zavocki&#39;s)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/--tTsOMYyf2Y/VRDJiKEZfOI/AAAAAAAAHXk/ZqMwKuvPSg0/s72-c/no-easy-button.png" height="72" width="72"/><thr:total>2</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4805395909933518229.post-159484009820935264</guid><pubDate>Mon, 23 Mar 2015 00:16:00 +0000</pubDate><atom:updated>2015-04-08T17:10:05.761-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">DB2</category><category domain="http://www.blogger.com/atom/ns#">xpages</category><title>New Blog Series: Using a DB2 Datasource in XPages</title><description>This post is the introduction of a blog series on using a DB2 backend datasource in XPages. &amp;nbsp;I will discuss how we set up the connections and give examples of different types of queries. There should be very little here specific to DB2, but for ease of writing, I will write &#39;DB2&#39; throughout this series. Feel free to substitute any relational database, such as Oracle, MySQL, SQL Server, etc.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Background&lt;/h3&gt;&lt;br /&gt;Why did we choose to use a DB2 backend? &amp;nbsp;It is complicated... but the real reason we chose to use DB2 is that someone at my company believed that Notes was not secure enough for storing sensitive data. &amp;nbsp;Most everyone who reads this knows that this is far from the truth. &amp;nbsp;Notes is extremely secure and its security model is looked at as one of it biggest strengths.&lt;br /&gt;&lt;br /&gt;When presented with this assertion, I did my best to present arguments against using DB2. I knew the security premise was wrong, and I knew it would dramatically increase project completion time. Lastly, I knew Notes was well suited for the project at hand.&lt;br /&gt;&lt;br /&gt;Even though I fought hard for what I felt was right, I was &lt;b&gt;not&lt;/b&gt; very disappointed when I lost the battle. The reason being that I knew that using a relational backend would be a fun learning experience and good for the career. In my last job, I had experience retrieving Oracle data through a java agent, but I never bound an XPage to relational data real time.&lt;br /&gt;&lt;br /&gt;Around this time, I went to the &lt;a href=&quot;http://www.mwlug.com/&quot;&gt;MWLUG&lt;/a&gt; conference in Grand Rapids and heard an excellent presentation by Toby Samples on using &lt;a href=&quot;http://www.slideshare.net/tobysamples/hibernate-in-xpages&quot;&gt;Hibernate in Xpages.&lt;/a&gt;&amp;nbsp;When I came back, I did my best to sell the use of Hibernate because I felt it would be a benefit, and I now had the information to make it work. Despite this, the decision was made to go with JDBC, mainly because we had already had another database with the same functionality that we could copy, and the developers who wrote it were now on the same project.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Series Contents&lt;/h3&gt;&lt;br /&gt;With that background, I am going to discuss the following topics in this blog series:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Setting up your database to connect to DB2. &amp;nbsp;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Using the Extension Library Relational Controls&lt;/li&gt;&lt;li&gt;Using Connection Pooling&lt;/li&gt;&lt;li&gt;Storing the DB2 Credentials in a managed bean&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Coding a simple SELECT statement&lt;/li&gt;&lt;li&gt;Selecting information from two tables using a JOIN&lt;/li&gt;&lt;li&gt;Coding an INSERT&lt;/li&gt;&lt;li&gt;Coding an UPDATE&lt;/li&gt;&lt;li&gt;Populating a combobox dropdown with values from a DB2 query&lt;/li&gt;&lt;li&gt;Retrieving a collection of data in JSON format for using in a data table&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;Note: Due to a very heavy load at work, it might take me up to two months or more to finish this blog series. &amp;nbsp;&lt;/div&gt;&lt;br /&gt;&lt;h3&gt;Assumptions&lt;/h3&gt;&lt;br /&gt;Throughout I am going to make the assumption that you know the basics of SQL. For me, SQL was the one thing I learned in college that I actually still use today. &amp;nbsp;Another assumption is that you know something about java, because all the coding is done using it. You can use SSJS to access DB2, but early on, we made the decision to have as much of the business logic as possible in java.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Credits&lt;/h3&gt;&lt;br /&gt;I was busy with another project while the groundwork was setup for connecting to DB2. Credit for doing this work goes to my coworker Dwain Weurfel. Dwain, thanks for helping me document and explain the setup, and &amp;nbsp;for helping me to proof these posts, so that I get it right!&amp;nbsp;I should also give credit to former coworker Eric Dyer who had a large role in creating the groundwork while working on the first DB2 backend project at my company.</description><link>http://notesspeak.blogspot.com/2015/03/new-blog-series-using-db2-datasource-in.html</link><author>[email protected] (The Zavocki&#39;s)</author><thr:total>3</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4805395909933518229.post-3550029436576625309</guid><pubDate>Sat, 21 Feb 2015 11:59:00 +0000</pubDate><atom:updated>2015-02-21T04:59:31.092-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">javascript</category><title>Using Javascript RegExp Object to replace a XPages Contraint Validator</title><description>&lt;br /&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: #444444; font-family: inherit;&quot;&gt;I had an occasion yesterday where I needed change a partial refresh to process data without validation in order to fix another problem. Despite this I still needed to validate the data the user enters based on a regular expression. &amp;nbsp;The previous developer was was using a&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: Courier New, Courier, monospace;&quot;&gt;&amp;lt;xp:validateContraint&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: inherit;&quot;&gt; to check the data, but this check would no longer trigger since I am skipping&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #444444;&quot;&gt;validation&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: inherit;&quot;&gt;. The constraint validator&amp;nbsp;uses a regular expression to determine whether the validation passes or not.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;Even though the regular expression in this case was simplistic, I did not want to mirror what it does using string manipulation to validate it.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: inherit;&quot;&gt;I remembered from one of my Javascript books (&lt;a href=&quot;http://www.wrox.com/WileyCDA/WroxTitle/Professional-JavaScript-for-Web-Developers-3rd-Edition.productCd-1118222199.html&quot;&gt;Professional JavaScript for Web Developers&lt;/a&gt;) that Regular Expressions are built into the language. &amp;nbsp;It was very easy to duplicate the constraint functionality by just copying the RegExp string that already worked and then creating a RegExp javascript object. &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: inherit; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;The code here lives in a button in the SSJS onclick event:&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: sans-serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: sans-serif; font-size: x-small;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; font-size: 15px; line-height: 21.2999992370605px;&quot;&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; font-size: 15px; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #820040; font-family: Courier New;&quot;&gt;&lt;b style=&quot;line-height: 18.4599990844727px;&quot;&gt;var&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp;thisID = getComponent(&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #4200ff; font-family: Courier New;&quot;&gt;&quot;inputID&quot;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;).getValue();&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #820040; font-family: Courier New;&quot;&gt;&lt;b style=&quot;line-height: 18.4599990844727px;&quot;&gt;var&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp;pattern =&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #4200ff; font-family: Courier New;&quot;&gt;/^([A-Za-z]{2}[A-Za-z0-9]{0,2})$/&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px; line-height: 21.2999992370605px;&quot;&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #820040; font-family: Courier New;&quot;&gt;&lt;b style=&quot;line-height: 18.4599990844727px;&quot;&gt;if&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;(!pattern.test(thisID)){&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #820040; font-family: Courier New;&quot;&gt;&lt;b style=&quot;line-height: 18.4599990844727px;&quot;&gt;return viewScope&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;.infoMessage = &quot;No Can Do&quot;;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Courier New;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; font-size: large; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; font-family: Calibri, sans-serif; font-size: 15px; line-height: 21.2999992370605px;&quot; /&gt;&lt;br /&gt;The built-in RegExp object can be created in one of two ways, you can either use the slash as I do in the above code or you can create it using new RegExp(&quot;....&quot;). &amp;nbsp;Either way that you choose, it works the same. The object has a method called test() which will return a true/false depending if the passed in string matches. &amp;nbsp;Of course, you can use this in any javascript, client or serverside.</description><link>http://notesspeak.blogspot.com/2015/02/using-javascript-regexp-object-to.html</link><author>[email protected] (The Zavocki&#39;s)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4805395909933518229.post-8723461929154250425</guid><pubDate>Thu, 08 Jan 2015 12:26:00 +0000</pubDate><atom:updated>2015-01-08T05:26:24.640-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">xpages</category><title>Using a Hidden Input to Validate if a Button was pushed </title><description>&lt;span style=&quot;background-color: white; color: #444444; font-family: inherit;&quot;&gt;In one of my current projects, I came across an issue where I needed to validate a form using the XPages validators. &amp;nbsp;This is a mature application that only uses SSJS everywhere, and I have to work with the boundaries already in place.&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: inherit; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;The Problem&lt;/span&gt;&lt;/h3&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;This particular problem is hard to describe but I will try. &amp;nbsp;I wanted to prevent a page from advancing to the next step. &amp;nbsp;The &quot;Next &amp;gt;&quot; link uses validators to control whether it works or not. Because of this established pattern, I needed to continue to use validators. &amp;nbsp;My problem was that there were no editable fields left on the page. &amp;nbsp;Validators only work on editable input fields, not buttons, links or computed fields.&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;I needed to validate whether a button was pushed&amp;nbsp;&lt;/span&gt;&lt;i style=&quot;color: #444444; line-height: 18.4599990844727px;&quot;&gt;&lt;b&gt;and&lt;/b&gt;&lt;/i&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp;still allow the code behind the button to work and itself trigger validation.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-YIQsVpbQFqs/VK308RBzUsI/AAAAAAAAHHk/LEof6Zo2d54/s1600/combined-capture.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/-YIQsVpbQFqs/VK308RBzUsI/AAAAAAAAHHk/LEof6Zo2d54/s1600/combined-capture.png&quot; height=&quot;424&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif; font-size: small;&quot;&gt;The Next button allows the user to continue only when all validation is passed.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;h3&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;The Solution&lt;/span&gt;&lt;/h3&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&lt;span style=&quot;line-height: 18.4599990844727px;&quot;&gt;I am going to show how to use a hidden input to validate non-input clickable elements, in this case a button.&lt;/span&gt;&lt;b style=&quot;line-height: 18.4599990844727px;&quot;&gt;&amp;nbsp;&lt;/b&gt;&lt;span style=&quot;line-height: 18.4599990844727px;&quot;&gt;Despite validition, the onclick event of the button will still work. &amp;nbsp;Normally, the validator will trip, and the onclick event will not work&lt;/span&gt;&amp;nbsp;until validation is passed.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;Since you can only use a validator with input controls, I decided to use a &lt;b&gt;Hidden Input&lt;/b&gt;. This control shows up on the page, but is not displayed. The validation messages of a hidden input are displayed using the standard display error control.&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: teal;&quot;&gt;&amp;lt;x&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #3f8080;&quot;&gt;p:inputHidden&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: purple;&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #4200ff;&quot;&gt;&lt;i style=&quot;line-height: 18.4599990844727px;&quot;&gt;&quot;inputHidden1&quot;&lt;/i&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: purple;&quot;&gt;value&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #4200ff;&quot;&gt;&lt;i style=&quot;line-height: 18.4599990844727px;&quot;&gt;&quot;#requestScope.validateYN}&quot;&lt;/i&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: purple;&quot;&gt;required&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #4200ff;&quot;&gt;&lt;i style=&quot;line-height: 18.4599990844727px;&quot;&gt;&quot;true&quot;&lt;/i&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: teal;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: teal;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #3f8080;&quot;&gt;xp:this.validators&lt;/span&gt;&lt;span style=&quot;background-color: white; color: teal;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: teal;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #3f8080;&quot;&gt;xp:validateRequired&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: purple;&quot;&gt;message&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #4200ff;&quot;&gt;&lt;i style=&quot;line-height: 18.4599990844727px;&quot;&gt;&quot;Please use Validate with WU button before continuing&quot;&lt;/i&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: teal;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: teal;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #3f8080;&quot;&gt;xp:validateRequired&lt;/span&gt;&lt;span style=&quot;background-color: white; color: teal;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: teal;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #3f8080;&quot;&gt;xp:this.validators&lt;/span&gt;&lt;span style=&quot;background-color: white; color: teal;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: teal;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #3f8080;&quot;&gt;xp:inputHidden&lt;/span&gt;&lt;span style=&quot;background-color: white; color: teal;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;The key is to bind the control to a scoped variable with no initial value; this will cause the validator to trigger when the page is submitted. To make the button still work normal, I used the &lt;i&gt;onfocus&lt;/i&gt; to set the scoped variable so that it passes validation. In that onfocus event, I &lt;b&gt;must&lt;/b&gt;&amp;nbsp;do a partial refresh on the hidden input, and &#39;The Process Data Without Validation&#39;&lt;b style=&quot;line-height: 18.4599990844727px;&quot;&gt;&amp;nbsp;&lt;/b&gt;&lt;span style=&quot;line-height: 18.4599990844727px;&quot;&gt;box&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;line-height: 18.4599990844727px;&quot;&gt;must&amp;nbsp;&lt;/b&gt;be checked.&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-dTglrtkPbdo/VK33Vr3EwTI/AAAAAAAAHHw/Q4Q64Rwa-kA/s1600/Capture1-5a.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://2.bp.blogspot.com/-dTglrtkPbdo/VK33Vr3EwTI/AAAAAAAAHHw/Q4Q64Rwa-kA/s1600/Capture1-5a.PNG&quot; height=&quot;316&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif; font-size: small;&quot;&gt;This shows the onfocus event of the button you want to validate&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;h3&gt;Final Thoughts&lt;/h3&gt;&lt;div&gt;There might be other ways to accomplish what I show here, but I spent a lot of time trying other ways before I got this one working. I do know this is a rather obscure use case, but google has nothing on it, and I really didn&#39;t want to forget this in case I need to use it again.&lt;br /&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;Note: If you are very experienced with XPages, you might ask why I didn&#39;t set the button&#39;s &quot;disabledValidators&quot; property to &quot;true&quot;. &amp;nbsp;For some reason, this did not work; the main code in the onclick event did not execute regardless of the property being set.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</description><link>http://notesspeak.blogspot.com/2015/01/using-hidden-input-to-validate-if.html</link><author>[email protected] (The Zavocki&#39;s)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-YIQsVpbQFqs/VK308RBzUsI/AAAAAAAAHHk/LEof6Zo2d54/s72-c/combined-capture.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4805395909933518229.post-7962745466553104442</guid><pubDate>Tue, 30 Dec 2014 01:42:00 +0000</pubDate><atom:updated>2014-12-29T18:42:07.123-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Eclipse</category><title>Using Domino Designer&#39;s &#39;Sign Design&#39; to solve strange Java exceptions</title><description>&lt;span style=&quot;background-color: white; color: #444444; font-family: inherit;&quot;&gt;Today, I reached out to another XPages developer who works on the same project in order to help me get past a strange error I was getting. The issue was that Java code within an XPages application that previously worked fine started failing, even though it had not been altered. He had experienced this issue before and knew what to do to fix it. The fix I am about to describe was new to me, so I felt it was worth sharing here.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: inherit;&quot;&gt;The exception I was getting was this:&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;background-color: white; color: #274e13; font-size: small;&quot;&gt;javax.servlet.ServletException: java.lang.Error: Unresolved compilation problem:&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-size: small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; font-size: small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #444444; font-family: inherit; font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;When I first got the error, I naturally thought that it was something that I had changed. I didn&#39;t know what to make of an unresolved compilation problem, it seemed a bit generic, like the check engine light on your car. Even after I was able to isolate the line causing the problem, it made no sense because it was run of the mill Java code, the kind of snippet you use and reuse. In this case, it was a variable resolver that gets a handle to the current session.&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444; line-height: 21.2999992370605px;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;My coworker suggested performing a &quot;&lt;b&gt;Sign Design&lt;/b&gt;&quot; on the whole application. To do this, right click on the application name, then click &quot;Application&quot;, and then &quot;Sign Design&quot;. Sure enough, this fixed the issue, no more Java exceptions. &lt;b&gt;This is one of those fixes that is worth trying when nothing else is making sense.&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;&amp;nbsp;Of course this issue is most likely to happen for applications where work is shared by a team of developers, as is the case here. &lt;/span&gt;&lt;span style=&quot;background-color: white; color: #444444;&quot;&gt;The downside of this fix of course, is that you lose some of the history, and it looks like you touched every design element.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-QlMjyOGiM60/VKH6ORY5JSI/AAAAAAAAHG8/2jlXXWgkZVY/s1600/Capture12-29.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/-QlMjyOGiM60/VKH6ORY5JSI/AAAAAAAAHG8/2jlXXWgkZVY/s1600/Capture12-29.PNG&quot; height=&quot;602&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif; font-size: small;&quot;&gt;&lt;span style=&quot;text-align: start;&quot;&gt;The way to find the option to &lt;b&gt;Sign Design&lt;/b&gt; is to right-click on the application title, and choose&amp;nbsp;&lt;/span&gt;&lt;i style=&quot;text-align: start;&quot;&gt;Application,&lt;/i&gt;&lt;span style=&quot;text-align: start;&quot;&gt;&amp;nbsp;and then choose&amp;nbsp;&lt;/span&gt;&lt;i style=&quot;text-align: start;&quot;&gt;Sign Design.&lt;/i&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;div&gt;PS: &amp;nbsp;I want to wish Best Wishes for 2015 to all who stumble across my ramblings.&lt;/div&gt;</description><link>http://notesspeak.blogspot.com/2014/12/using-domino-designers-sign-design-to.html</link><author>[email protected] (The Zavocki&#39;s)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-QlMjyOGiM60/VKH6ORY5JSI/AAAAAAAAHG8/2jlXXWgkZVY/s72-c/Capture12-29.PNG" height="72" width="72"/><thr:total>3</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4805395909933518229.post-6477985508643124560</guid><pubDate>Mon, 20 Oct 2014 01:23:00 +0000</pubDate><atom:updated>2014-10-19T19:24:29.897-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">CSS</category><category domain="http://www.blogger.com/atom/ns#">xpages</category><title>Quick Tip: Forcing a CSS override</title><description>If you are using OneUI in your XPages application, then you know sometimes it just doesn’t do what you want it to do. Trying to get it to behave can be frustrating, this tip will help when OneUI overides your custom style for reasons unknown.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;The Problem&lt;/h3&gt;In my case, I was trying to make the labels of a radio button group appear disabled. Only the buttons themselves would look disabled, but the labels looked the same as when the control was enabled.&lt;br /&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-mCmKz00xf4I/VEKGrQOM7lI/AAAAAAAAGvM/gpPKfpmflNM/s1600/Enabled-Disabled.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/-mCmKz00xf4I/VEKGrQOM7lI/AAAAAAAAGvM/gpPKfpmflNM/s1600/Enabled-Disabled.png&quot; height=&quot;157&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif; font-size: small;&quot;&gt;I don&#39;t feel that there is enough distinction between Enabled on the left, and Disabled on the right.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;The radio button group control does attempt to make it easy by having a property to enter the styleClass for when the control is disabled or enabled.&lt;br /&gt;&lt;br /&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-LySeYkPabmg/VEKIHIwliZI/AAAAAAAAGvY/O5rUTkUP9hM/s1600/disableClass.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://4.bp.blogspot.com/-LySeYkPabmg/VEKIHIwliZI/AAAAAAAAGvY/O5rUTkUP9hM/s1600/disableClass.png&quot; height=&quot;116&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif; font-size: small;&quot;&gt;XPages makes it easy for you to specify a disabled styleClass&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;This works fine for most of the CSS, except for some reason the color is overwritten as shown in the left picture below. I spent a lot of time playing with multiple CSS selectors with no success until I discovered how to force the CSS to override.&lt;br /&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-O4fQFTv_x-4/VEKI8TIqm2I/AAAAAAAAGvk/J-6MtCk2nGM/s1600/Before-After.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/-O4fQFTv_x-4/VEKI8TIqm2I/AAAAAAAAGvk/J-6MtCk2nGM/s1600/Before-After.png&quot; height=&quot;226&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif; font-size: small;&quot;&gt;For some reason the &quot;color&quot; is overwritten by OneUI&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;The Solution&lt;/h3&gt;&lt;div style=&quot;text-align: left;&quot;&gt;The way to override is to add &lt;b&gt;“!important”&lt;/b&gt; after the attribute you don’t want to be overwritten. In my case, the only attribute that wasn’t behaving was the color. After I added !important, it worked exactly like I wanted. In the right picture above shows what this one change gives you.&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/div&gt;Here is the &lt;i&gt;Before&lt;/i&gt; code:&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: purple; font-family: Courier New, Courier, monospace;&quot;&gt;.radio-disabled {&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: purple; font-family: Courier New, Courier, monospace;&quot;&gt;font-size:14pt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: purple; font-family: Courier New, Courier, monospace;&quot;&gt;font-family:Calibri;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: purple; font-family: Courier New, Courier, monospace;&quot;&gt;color: #AFAEB5;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: purple; font-family: Courier New, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Here is the &lt;i&gt;After&lt;/i&gt; code:&lt;br /&gt;&lt;span style=&quot;color: purple; font-family: Courier New, Courier, monospace;&quot;&gt;.radio-disabled {&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: purple; font-family: Courier New, Courier, monospace;&quot;&gt;font-size:14pt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: purple; font-family: Courier New, Courier, monospace;&quot;&gt;font-family:Calibri;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: purple; font-family: Courier New, Courier, monospace;&quot;&gt;color: #AFAEB5 !important;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: purple; font-family: Courier New, Courier, monospace;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;The Finished Result&lt;/h3&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-EBayDdwB-jI/VEKKOmQvs9I/AAAAAAAAGvw/6Md_RPay4tI/s1600/Enabled-Disabled-New.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/-EBayDdwB-jI/VEKKOmQvs9I/AAAAAAAAGvw/6Md_RPay4tI/s1600/Enabled-Disabled-New.png&quot; height=&quot;157&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif; font-size: small;&quot;&gt;Enabled on the left, disabled on the right. It is easy to distinguish which is which.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;h3&gt;Final Thoughts&lt;/h3&gt;Perhaps this is old news to some who read this. Though, in my office, none of the four XPages developers knew about this before. I hope that this helps other XPagers who wrestle with OneUI.&lt;br /&gt;&lt;br /&gt;I will add that, this should be something that is used sparingly. In my case, only the specific class of “.radio-disabled” is using it. I can see that you could really mess your UI by overusing !important. Here is a related article called &lt;a href=&quot;http://james.padolsey.com/usability/dont-use-important/&quot;&gt;“Don’t Use !important”&lt;/a&gt; that explains some of the pitfalls.</description><link>http://notesspeak.blogspot.com/2014/10/quick-tip-forcing-css-override.html</link><author>[email protected] (The Zavocki&#39;s)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-mCmKz00xf4I/VEKGrQOM7lI/AAAAAAAAGvM/gpPKfpmflNM/s72-c/Enabled-Disabled.png" height="72" width="72"/><thr:total>4</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-4805395909933518229.post-1788226675029372556</guid><pubDate>Fri, 10 Oct 2014 01:14:00 +0000</pubDate><atom:updated>2014-10-09T19:14:08.424-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">xpages</category><title>My First Experience Using the JSON-RPC Service.</title><description>This is one of those posts, where I am writing to my future self so that I can remember all that I learned about using the JSON-RPC service.&lt;br /&gt;&lt;br /&gt;If you are an XPages developer who is interested in learning about this tool then I first suggest checking out the following resources:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;http://www.notesin9.com/2014/05/21/tim-explains-json-rpc-codefortim/&quot;&gt;This email response&lt;/a&gt; to a question by &lt;a href=&quot;http://www.timtripcony.com/&quot;&gt;Tim Tripcony&lt;/a&gt; is sheer brilliance. I had to read and re-read this several times to really understand it, but that speaks all about me and nothing about how Tim explains things. &amp;nbsp;A big thanks to David Leedy for making it available to all.&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Keith Strickland has written a very helpful &lt;a href=&quot;http://www.keithstric.com/A55BAC/keithstric.nsf/default.xsp?documentId=3524156D3B4587E185257920000494C5&quot;&gt;blog post&lt;/a&gt; on JSON-RPC way back in June 2011. It was Keith who first turned me on to the Remote Service control when I found his answer to this &lt;a href=&quot;http://stackoverflow.com/questions/9568519/getting-to-scope-variables-in-client-side-javascript-csjs-on-xpages/9595330#9595330&quot;&gt;Stack Overflow&lt;/a&gt;&amp;nbsp;question.&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;The &lt;a href=&quot;http://www.redbooks.ibm.com/Redbooks.nsf/ibmpressisbn/9780132901819?Open&quot;&gt;Extension Library Book&lt;/a&gt; devotes a few pages (351-353) to the JSON-RPC that I found very helpful.&lt;/li&gt;&lt;/ul&gt;&lt;h3&gt;&lt;br /&gt;&lt;/h3&gt;&lt;h3&gt;How I and why I used the JSON-RPC control&lt;/h3&gt;&lt;div&gt;I needed to run a server based Java method that called a process and returned a result. My requirements stated that I need to try this process twice in a single event, and tell the user if the first try has failed. The way that Java works is to always one return value, so the intermediary messages would never be returned. In order to accomplish what I needed, I knew that clientside javascript was my best bet. In order to call a serverside java method from clientside JS, I decided to use an JSON-PRC call.&lt;br /&gt;&lt;h3&gt;&lt;br /&gt;&lt;/h3&gt;&lt;h3&gt;How to create the JSON-RPC service&lt;/h3&gt;1) Pull the tool from the pallet under “Data Access”. It is just called “Remote Service”.&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-3JWFHCXDY4Y/VDcn74iNayI/AAAAAAAAGi8/zc6_hr-dGyM/s1600/Capture10-9b.PNG&quot; imageanchor=&quot;1&quot; style=&quot;font-size: 19px; font-weight: bold; margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://4.bp.blogspot.com/-3JWFHCXDY4Y/VDcn74iNayI/AAAAAAAAGi8/zc6_hr-dGyM/s1600/Capture10-9b.PNG&quot; height=&quot;147&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;2) Give the service a serviceName and/or a pathInfo. I believe that the service may be referred to as either.&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-8t06-YxCu4Y/VDcn75mu27I/AAAAAAAAGjE/_xQZ63mHPIo/s1600/Capture10-9a.PNG&quot; imageanchor=&quot;1&quot; style=&quot;font-size: 19px; font-weight: bold; margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/-8t06-YxCu4Y/VDcn75mu27I/AAAAAAAAGjE/_xQZ63mHPIo/s1600/Capture10-9a.PNG&quot; height=&quot;307&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;3) Create the methods that you need to run. This will involve adding optional arguments and adding SSJS code to run in the script property. The script property doesn’t use the standard script editor that is usually used when you can enter serverside javascript.&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-BUgXDd7mRB8/VDcn8HMUDRI/AAAAAAAAGjA/tLs7D24LY4Q/s1600/Capture10-9c.PNG&quot; imageanchor=&quot;1&quot; style=&quot;font-size: 19px; font-weight: bold; margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://4.bp.blogspot.com/-BUgXDd7mRB8/VDcn8HMUDRI/AAAAAAAAGjA/tLs7D24LY4Q/s1600/Capture10-9c.PNG&quot; height=&quot;508&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;4) The finished result&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-19X6iCsQO0g/VDcn9LbmFDI/AAAAAAAAGjU/tu39rQiDYL4/s1600/Capture10-9d.PNG&quot; imageanchor=&quot;1&quot; style=&quot;font-size: 19px; font-weight: bold; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://3.bp.blogspot.com/-19X6iCsQO0g/VDcn9LbmFDI/AAAAAAAAGjU/tu39rQiDYL4/s1600/Capture10-9d.PNG&quot; height=&quot;222&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;h3&gt;Using the Remote Service&lt;/h3&gt;It took me a while to understand that the service doesn’t return a value initially, it returns an object that contains a callback method. The callback method actually returns the value. Thanks to Toby Samples who answered my &lt;a href=&quot;http://stackoverflow.com/questions/25920675/how-to-perform-multiple-page-updates-behind-a-single-button-in-xpages&quot;&gt;Stack Overflow question&lt;/a&gt; helping me with this.&lt;br /&gt;&lt;br /&gt;Here is the code where I call my remote service methods:&lt;br /&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-3VT2mE8T4bE/VDcn9SSuc3I/AAAAAAAAGjY/Lz5ngxDN5cY/s1600/Capture10-9e.PNG&quot; imageanchor=&quot;1&quot; style=&quot;font-size: 19px; font-weight: bold; margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://2.bp.blogspot.com/-3VT2mE8T4bE/VDcn9SSuc3I/AAAAAAAAGjY/Lz5ngxDN5cY/s1600/Capture10-9e.PNG&quot; height=&quot;368&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;b&gt;Code Explanation&lt;/b&gt;:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;First the code shows the user a message that the process is starting&lt;/li&gt;&lt;li&gt;Next, a value needed in one of the messages is pulled from a hidden input&lt;/li&gt;&lt;li&gt;The RPC method is called, the object returned is assigned to the var “deferred”&lt;/li&gt;&lt;li&gt;The callback of the object is called to get the result of the ‘first’ method&lt;/li&gt;&lt;li&gt;If the ‘first’ method returns true, the user gets a success message&lt;/li&gt;&lt;li&gt;If the ‘first’ method fails, the user gets a ‘retrying’ message, and the second method is called and the resulting object is assigned to a var “insideDeferred”&lt;/li&gt;&lt;li&gt;If the result of the ‘second’ is true, the user gets a success message&lt;/li&gt;&lt;li&gt;If the result of the ‘second’ method is false, the user gets a ‘try later’ message.&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;h3&gt;A slight problem&lt;/h3&gt;This code all worked great, except… it ran so fast that the ‘trying again’ message appeared too quick for a user to read. I spent a lot of time trying to figure out a way to use timers to slow it down. Eventually I decided that I was spending too much time on this, and used an simple alert for that message, which fulfills my requirement and allowed me to get moving with the rest of the project.&lt;br /&gt;&lt;h3&gt;&lt;br /&gt;&lt;/h3&gt;&lt;h3&gt;Parting Thoughts&lt;/h3&gt;Now that I understand how the Remote Service is used, I am sure I will find more uses for it. &amp;nbsp;It is an important tool in any XPages developers toolbox. &amp;nbsp;I can also see it being an important part of web applications that use a Domino backend and frontend Javascript frameworks like Angular JS.&lt;br /&gt;&lt;div&gt;&lt;/div&gt;</description><link>http://notesspeak.blogspot.com/2014/10/my-first-experience-using-json-rpc.html</link><author>[email protected] (The Zavocki&#39;s)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-3JWFHCXDY4Y/VDcn74iNayI/AAAAAAAAGi8/zc6_hr-dGyM/s72-c/Capture10-9b.PNG" height="72" width="72"/><thr:total>6</thr:total></item></channel></rss>

If you would like to create a banner that links to this page (i.e. this validation result), do the following:

  1. Download the "valid RSS" banner.

  2. Upload the image to your own server. (This step is important. Please do not link directly to the image on this server.)

  3. Add this HTML to your page (change the image src attribute if necessary):

If you would like to create a text link instead, here is the URL you can use:

http://www.feedvalidator.org/check.cgi?url=http%3A//notesspeak.blogspot.com/feeds/posts/default%3Falt%3Drss

Copyright © 2002-9 Sam Ruby, Mark Pilgrim, Joseph Walton, and Phil Ringnalda