<?xml version="1.0" encoding="ISO-8859-1"?>
<rss version="2.0"
 xmlns:dc="http://purl.org/dc/elements/1.1/"
 xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
 xmlns:admin="http://webns.net/mvcb/"
 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
 xmlns:content="http://purl.org/rss/1.0/modules/content/"
 xmlns:wfw="http://wellformedweb.org/CommentAPI/"
 xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
 xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
>
<channel>
<title>John's Blog</title>
<description>Full Posts from Stories</description>
<lastBuildDate>Tue, 11 Nov 2008 06:11:48 -0400</lastBuildDate>
<link>http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf</link>
<item><title>I'll be speaking at Lotusphere 09 on....XPages of course</title><link>http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/d6plinks/GROC-7LAF5X</link><description><![CDATA[ Here's my abstract:

Deep Dive Into Building An IBM Lotus Domino Application Powered By XPages &nbsp; 

An unlimited number of editable documents on the same page? Generating the type of controls for fields on page load? Dynamic applications have always ...]]></description><dc:subject>Domino 8.5</dc:subject><dc:creator>groupwareinc</dc:creator><comments>http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/d6plinks/GROC-7LAF5X</comments><guid isPermaLink="true">http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/d6plinks/GROC-7LAF5X</guid><content:encoded><![CDATA[ <font size=2 face="sans-serif">Here's my abstract:</font>
<br />
<br /><font size=2 face="Arial"><strong>Deep Dive Into Building An IBM Lotus Domino Application Powered By XPages</strong></font><font size=3> &nbsp; </font>
<br />
<br /><font size=2 face="Arial">An unlimited number of editable documents on the same page? Generating the type of controls for fields on page load? Dynamic applications have always been a challenge for Lotus Domino development. Not anymore! In this session learn how to utilize the power of XPages to build a survey tool that can have an unlimited number of questions. I&#8217;ll show you how to dynamically allow for the selection of controls on the page load, such as checkboxes, radio buttons, and combo boxes, etc.,. Go under the hood and see how to use multiple data sources per page and some powerful XPage controls to build this application with a minimum amount of coding.</font><font size=3> </font>
<br /> ]]></content:encoded><pubDate>Tue, 11 Nov 2008 06:11:48 -0400</pubDate><slash:comments>1</slash:comments><wfw:commentRss>http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/CommentsRSS?Open&amp;id=7F6342EDF38FDFCB852574FE003D817F</wfw:commentRss><wfw:comment>http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/PostComment?RunAgent&amp;id=7F6342EDF38FDFCB852574FE003D817F</wfw:comment></item><item><title>IBM bumps Microsoft from second place on brand-value list</title><link>http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/d6plinks/GROC-7JMLTG</link><description><![CDATA[ IBM has moved past Microsoft to claim the title of second most valuable brand in the world, according to the annual Global Brand List. IBM has moved past Microsoft to claim the title of second most valuable brand in the world, according to the annual Global ...]]></description><dc:subject>IBM</dc:subject><dc:creator>groupwareinc</dc:creator><comments>http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/d6plinks/GROC-7JMLTG</comments><guid isPermaLink="true">http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/d6plinks/GROC-7JMLTG</guid><content:encoded><![CDATA[ <font size=2 face="sans-serif">IBM has moved past Microsoft to claim the title of second most valuable brand in the world, according to the annual Global Brand List. IBM has moved past Microsoft to claim the title of second most valuable brand in the world, according to the annual Global Brand List. </font>
<br />
<br /><font size=2 face="sans-serif">Interbrand, a global brand management firm, reported Thursday that IBM&#8217;s brand value has increased 3 percent, to $59.03 billion, in 2008. That was enough to push it above Microsoft (Nasdaq: MSFT), which was assigned a brand value of $59 billion and fell to No. 3. </font>
<br />
<br /><font size=2 face="sans-serif">Read the full article: </font><a href=http://www.bizjournals.com/triangle/stories/2008/09/15/daily41.html><font size=2 face="sans-serif">http://www.bizjournals.com/triangle/stories/2008/09/15/daily41.html</font></a> ]]></content:encoded><pubDate>Fri, 19 Sep 2008 12:02:18 -0400</pubDate><slash:comments>0</slash:comments><wfw:commentRss>http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/CommentsRSS?Open&amp;id=848A0CE8BC1558DB852574C900581A0F</wfw:commentRss><wfw:comment>http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/PostComment?RunAgent&amp;id=848A0CE8BC1558DB852574C900581A0F</wfw:comment></item><item><title>My XPage samples and beta 2 - some bug workarounds</title><link>http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/d6plinks/GROC-7JGKQW</link><description><![CDATA[ I received a number of emails from folks who were having issues with some samples on my site and DDE 8.5 beta 2. &nbsp;I worked with the IBM developers this past week on solving the issues and finding workarounds. &nbsp;Thanks to Phil Riand and Paul Hannan ...]]></description><dc:subject>Domino 8.5 - XPages</dc:subject><dc:creator>groupwareinc</dc:creator><comments>http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/d6plinks/GROC-7JGKQW</comments><guid isPermaLink="true">http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/d6plinks/GROC-7JGKQW</guid><content:encoded><![CDATA[ <font size=2 face="sans-serif">I received a number of emails from folks who were having issues with some samples on my site and DDE 8.5 beta 2. &nbsp;I worked with the IBM developers this past week on solving the issues and finding workarounds. &nbsp;Thanks to Phil Riand and Paul Hannan for working with me on these issues, I now have the below solutions.</font>
<br />
<br /><font size=2 face="sans-serif">There were 2 issues:</font>
<br />
<br /><font size=2 face="sans-serif"><strong>Getting a handle on the backend document that represents the current document for the page.</strong> &nbsp;</font>
<br /><font size=2 face="sans-serif">- when submitting a document, in order to gain full access to the NotesDocument class representing the current document you need to use &quot;doc=document.getDocument();&quot; method. &nbsp;For example, you would use this method to get a copy of the document when creating a response document for the current document. &nbsp;With beta 2 the document was discarded after the save occurred and therefore calling this method produced an error.</font>
<br /><font size=2 face="sans-serif">- The workaround: </font><font size=2 face="Arial">use this to get a handle on the NotesDocument for the current document &quot;doc=db.getDocumentByID(document.getNoteID());</font><font size=3>&quot;
</font>
<br />
<br /><font size=2 face="sans-serif"><strong>Generating dynamic controls for a document collection and binding each document to a panel.</strong></font>
<br /><font size=2 face="sans-serif">- What was happening was the <strong>Save Data Source</strong>s simple action was failing. &nbsp;This is a great feature in that it will save all bound documents that are on the page, instead of having individual save buttons. &nbsp;You can also call this method in server side script by calling the Global function &nbsp;&quot;save();&quot;.</font>
<br /><font size=2 face="sans-serif">- The solution is to have the panel document binding computed on <strong>Page Load</strong> instead of <strong>Dynamically</strong></font>
<br />
<br /><img src="http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/d6plinks/GROC-7JGKQW/StoryRichTextMime/M2?OpenElement"  alt="Image:John's Blog - My XPage samples and beta 2 - some bug workarounds" Title="Image:John's Blog - My XPage samples and beta 2 - some bug workarounds" />
<br />
<br /><font size=2 face="sans-serif">If you click on the Source tab for your XPage, you can change this manually by changing the &quot;#&quot; to a &quot;$&quot; for your script bindings to the document IDs:</font>
<br />
<br /><img src="http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/d6plinks/GROC-7JGKQW/StoryRichTextMime/M3?OpenElement"  alt="Image:John's Blog - My XPage samples and beta 2 - some bug workarounds" Title="Image:John's Blog - My XPage samples and beta 2 - some bug workarounds" />
<br />
<br /><font size=2 face="sans-serif">I was told that both of these issues are fixed for the GA build, so my previous examples should work without any changes when the product goes gold. </font>
<br />
<br /><font size=2 face="sans-serif">John</font> ]]></content:encoded><pubDate>Sun, 14 Sep 2008 11:06:57 -0400</pubDate><slash:comments>0</slash:comments><wfw:commentRss>http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/CommentsRSS?Open&amp;id=859A55B16783C67C852574C4005308F7</wfw:commentRss><wfw:comment>http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/PostComment?RunAgent&amp;id=859A55B16783C67C852574C4005308F7</wfw:comment></item><item><title>Lotus Notes 8.5 beta 2: Want applause at your next demo?  Use this new beta 2 feature...</title><link>http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/d6plinks/GROC-7J2LRS</link><description><![CDATA[ Demoing the new XPages Select Controls Dialog Box will guarantee applause at your next demo. &nbsp;This dialog provides you the ability to drag all your Notes data fields from the data palette and select the type of control and label for each field. &nbsp;It ...]]></description><dc:subject>Domino 8.5</dc:subject><dc:creator>groupwareinc</dc:creator><comments>http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/d6plinks/GROC-7J2LRS</comments><guid isPermaLink="true">http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/d6plinks/GROC-7J2LRS</guid><content:encoded><![CDATA[ <font size=2 face="sans-serif">Demoing the new XPages <strong>Select Controls Dialog Box</strong> will guarantee applause at your next demo. &nbsp;This dialog provides you the ability to drag all your Notes data fields from the data palette and select the type of control and label for each field. &nbsp;It then does the following for you:</font>
<br />
<br /><font size=2 face="sans-serif">- creates a table with 2 columns and rows for each field</font>
<br /><font size=2 face="sans-serif">- creates labels for each field</font>
<br /><font size=2 face="sans-serif">- creates the appropriate control</font>
<br /><font size=2 face="sans-serif">- binds the control to the data field
</font>
<br /><font size=2 face="sans-serif">- additionally, it can even add a submit button and an error message control to the page.</font>
<br />
<br /><font size=2 face="sans-serif">Developers and Managers will applaud when they see you build a new XPage in 3 minutes time.</font>
<br />
<br /><font size=2 face="sans-serif">Here's some screen shots on how it works:</font>
<br />
<br /><font size=2 face="sans-serif"><strong>In the data palette, enable the Select Controls Dialog box by right clicking on a field and selecting it:</strong></font>
<br /><img src="http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/d6plinks/GROC-7J2LRS/StoryRichTextMime/M2?OpenElement"  alt="Image:John's Blog - Lotus Notes 8.5 beta 2: Want applause at your next demo?  Use this new beta 2 feature..." Title="Image:John's Blog - Lotus Notes 8.5 beta 2: Want applause at your next demo?  Use this new beta 2 feature..." />
<br />
<br />
<br />
<br /><font size=2 face="sans-serif"><strong>Next, highlight all your fields and drag them to the XPage:</strong></font>
<br /><img src="http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/d6plinks/GROC-7J2LRS/StoryRichTextMime/M3?OpenElement"  alt="Image:John's Blog - Lotus Notes 8.5 beta 2: Want applause at your next demo?  Use this new beta 2 feature..." Title="Image:John's Blog - Lotus Notes 8.5 beta 2: Want applause at your next demo?  Use this new beta 2 feature..." />
<br />
<br />
<br />
<br /><font size=2 face="sans-serif"><strong>The dialog will then popup and allow you to make your changes to the defaults:</strong></font>
<br /><img src="http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/d6plinks/GROC-7J2LRS/StoryRichTextMime/M4?OpenElement"  alt="Image:John's Blog - Lotus Notes 8.5 beta 2: Want applause at your next demo?  Use this new beta 2 feature..." Title="Image:John's Blog - Lotus Notes 8.5 beta 2: Want applause at your next demo?  Use this new beta 2 feature..." />
<br />
<br />
<br />
<br /><font size=2 face="sans-serif"><strong>When done making changes, click the OK button and the dialog will generate the complete table:</strong></font>
<br /><img src="http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/d6plinks/GROC-7J2LRS/StoryRichTextMime/M5?OpenElement"  alt="Image:John's Blog - Lotus Notes 8.5 beta 2: Want applause at your next demo?  Use this new beta 2 feature..." Title="Image:John's Blog - Lotus Notes 8.5 beta 2: Want applause at your next demo?  Use this new beta 2 feature..." />
<br />
<br />
<br /><font size=2 face="sans-serif">You can then rearrange the rows by using the Outline View that is located at the bottom left of the IDE. &nbsp;I requested that some row ordering functionality be added to the select controls dialog. &nbsp;Maybe in a future release, but for right now....I'm not complaining. &nbsp;This is a great feature that makes for great demos!</font>
<br />
<br /><font size=2 face="sans-serif">John</font> ]]></content:encoded><pubDate>Sun, 31 Aug 2008 11:59:33 -0400</pubDate><slash:comments>0</slash:comments><wfw:commentRss>http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/CommentsRSS?Open&amp;id=4F75C6DA2D9B1CE5882574B60057CEB8</wfw:commentRss><wfw:comment>http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/PostComment?RunAgent&amp;id=4F75C6DA2D9B1CE5882574B60057CEB8</wfw:comment></item><item><title>Lotus Notes 8.5 beta 2 - new Design Preview for XPages</title><link>http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/d6plinks/GROC-7HYQRE</link><description><![CDATA[ Lotus Notes 8.5 beta 2 was released today. &nbsp;Here's a link to the beta 2 download info:

http://www-10.lotus.com/ldd/nd85forum.nsf/DateAllThreadedWeb/2af77f70817fab8d852574b40061d30f?OpenDocument

For those of you who have been wanting to try out ...]]></description><dc:subject>Domino 8.5</dc:subject><dc:creator>groupwareinc</dc:creator><comments>http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/d6plinks/GROC-7HYQRE</comments><guid isPermaLink="true">http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/d6plinks/GROC-7HYQRE</guid><content:encoded><![CDATA[ <font size=2 face="sans-serif">Lotus Notes 8.5 beta 2 was released today. &nbsp;Here's a link to the beta 2 download info:</font>
<br />
<br /><a href="http://www-10.lotus.com/ldd/nd85forum.nsf/DateAllThreadedWeb/2af77f70817fab8d852574b40061d30f?OpenDocument"><font size=2 face="sans-serif">http://www-10.lotus.com/ldd/nd85forum.nsf/DateAllThreadedWeb/2af77f70817fab8d852574b40061d30f?OpenDocument</font></a>
<br />
<br /><font size=2 face="sans-serif">For those of you who have been wanting to try out XPages, but did not want to setup a Domino server...Good news! &nbsp;Beta 2 provides design preview functionality for XPages.</font>
<br />
<br /><font size=2 face="sans-serif">Here's a screen shot:</font>
<br />
<br /><img src="http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/d6plinks/GROC-7HYQRE/StoryRichTextMime/M2?OpenElement"  alt="Image:John's Blog - Lotus Notes 8.5 beta 2 - new Design Preview for XPages" Title="Image:John's Blog - Lotus Notes 8.5 beta 2 - new Design Preview for XPages" /> ]]></content:encoded><pubDate>Fri, 29 Aug 2008 15:23:45 -0400</pubDate><slash:comments>2</slash:comments><wfw:commentRss>http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/CommentsRSS?Open&amp;id=83F5BEAA4846EED7882574B4006A833B</wfw:commentRss><wfw:comment>http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/PostComment?RunAgent&amp;id=83F5BEAA4846EED7882574B4006A833B</wfw:comment></item><item><title>Yellow Day tip: how to use Notes computeWithForm with an XPage</title><link>http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/d6plinks/GROC-7HBJZ2</link><description><![CDATA[ 

I'm celebrating Yellow Day today here at GroupwareInc. &nbsp;In honor of the celebration I have an XPages tip to share with you.

How to use Notes computeWithForm with an XPage
Here's how you can use your Lotus Notes default field formulas when opening ...]]></description><dc:subject>Domino 8.5 - XPages</dc:subject><dc:creator>groupwareinc</dc:creator><comments>http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/d6plinks/GROC-7HBJZ2</comments><guid isPermaLink="true">http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/d6plinks/GROC-7HBJZ2</guid><content:encoded><![CDATA[ <img src="http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/d6plinks/GROC-7HBJZ2/StoryRichTextMime/M2?OpenElement"  alt="Image:John's Blog - Yellow Day tip: how to use Notes computeWithForm with an XPage" Title="Image:John's Blog - Yellow Day tip: how to use Notes computeWithForm with an XPage" />
<br />
<br /><font size=2 face="sans-serif">I'm celebrating Yellow Day today here at GroupwareInc. &nbsp;In honor of the celebration I have an XPages tip to share with you.</font>
<br />
<br /><font size=2 face="sans-serif"><strong>How to use Notes computeWithForm with an XPage</strong></font>
<br /><font size=2 face="sans-serif">Here's how you can use your Lotus Notes default field formulas when opening up an XPage, or when saving an XPage, or both.</font>
<br />
<br /><font size=2 face="sans-serif">- Select your XPage Properties tab and click on the <strong>All Properties</strong> tab. &nbsp;</font>
<br /><font size=2 face="sans-serif">- Navigate to <strong>data</strong> and expand
<strong>data-&gt;dominoDocument&lsqb;0&rsqb;. </strong></font>
<br /><font size=2 face="sans-serif">- Select when to execute the computeWithForm form logic. &nbsp;Your choices are: <strong>onload, onsave, or both</strong></font>
<br />
<br /><font size=2 face="sans-serif">On the backend, this actually executes the document.computeWithForm() method.</font>
<br />
<br /><font size=2 face="sans-serif">Here is a screen shot:</font>
<br />
<br /><img src="http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/d6plinks/GROC-7HBJZ2/StoryRichTextMime/M3?OpenElement"  alt="Image:John's Blog - Yellow Day tip: how to use Notes computeWithForm with an XPage" Title="Image:John's Blog - Yellow Day tip: how to use Notes computeWithForm with an XPage" />
<br />
<br /><font size=2 face="sans-serif">Have a happy Yellow Day!</font>
<br />
<br /><font size=2 face="sans-serif">John</font> ]]></content:encoded><pubDate>Mon, 11 Aug 2008 00:00:00 -0400</pubDate><slash:comments>0</slash:comments><wfw:commentRss>http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/CommentsRSS?Open&amp;id=C06DEBBF642E0D858825749F004F54CB</wfw:commentRss><wfw:comment>http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/PostComment?RunAgent&amp;id=C06DEBBF642E0D858825749F004F54CB</wfw:comment></item><item><title>XPages: Techniques for using Client-Side Javascript with Server-Side Javascript</title><link>http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/d6plinks/GROC-7GLFZG</link><description><![CDATA[ XPages provides techniques that you can utilize between client-side and server-side Javascript. &nbsp;I have a couple of examples below that show how you can stop server-side events from firing from a client script and also how you can retrieve values for use ...]]></description><dc:subject>Domino 8.5 - XPages</dc:subject><dc:creator>groupwareinc</dc:creator><comments>http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/d6plinks/GROC-7GLFZG</comments><guid isPermaLink="true">http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/d6plinks/GROC-7GLFZG</guid><content:encoded><![CDATA[ <font size=2 face="sans-serif">XPages provides techniques that you can utilize between client-side and server-side Javascript. &nbsp;I have a couple of examples below that show how you can stop server-side events from firing from a client script and also how you can retrieve values for use in client-side script using inline server-side script in your client js.</font>
<br />
<br /><font size=2 face="sans-serif"><strong>Events</strong></font>
<br /><font size=2 face="sans-serif">Each event for a component can have both client-side and server-side Javascript. &nbsp;When the event is fired the client-side script is executed first. &nbsp;You can prevent/allow the server-side script from being executed by returning true or false from your client-side script.</font>
<br />
<br /><font size=2 face="sans-serif">For example, on a &quot;Save&quot; button you want to prompt the user and ask them if they are sure they want to save the document. &nbsp;You can provide a client-side confirm popup on the onclick event. &nbsp;If the user presses &quot;OK&quot; you would return &quot;true&quot; and the server-side script would then proceed to be executed. &nbsp;If the user clicks &quot;Cancel&quot; you would return &quot;false&quot; and the server-side script would be prevented from being executed.</font>
<br />
<br /><font size=2 face="sans-serif">Here's a screen shot of the onclick event showing that there is a server-side simple action to save the document:</font>
<br />
<br /><img src="http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/d6plinks/GROC-7GLFZG/StoryRichTextMime/M2?OpenElement"  alt="Image:John's Blog - XPages: Techniques for using Client-Side Javascript with Server-Side Javascript" Title="Image:John's Blog - XPages: Techniques for using Client-Side Javascript with Server-Side Javascript" />
<br />
<br />
<br /><font size=2 face="sans-serif">Here's a screen shot of the same onclick event, this time I clicked on the &quot;Client&quot; tab:</font>
<br />
<br /><img src="http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/d6plinks/GROC-7GLFZG/StoryRichTextMime/M3?OpenElement"  alt="Image:John's Blog - XPages: Techniques for using Client-Side Javascript with Server-Side Javascript" Title="Image:John's Blog - XPages: Techniques for using Client-Side Javascript with Server-Side Javascript" />
<br />
<br />
<br /><font size=2 face="sans-serif">Here's the result when the button is clicked in the browser:</font>
<br />
<br /><img src="http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/d6plinks/GROC-7GLFZG/StoryRichTextMime/M4?OpenElement"  alt="Image:John's Blog - XPages: Techniques for using Client-Side Javascript with Server-Side Javascript" Title="Image:John's Blog - XPages: Techniques for using Client-Side Javascript with Server-Side Javascript" />
<br />
<br />
<br /><font size=2 face="sans-serif"><strong>Processing server-side script in client-side script</strong></font>
<br /><font size=2 face="sans-serif">You can process server-side script using inline commands in your client-side code. &nbsp;This is a similar technique as using computed text in Domino within a page that contains Javascript. &nbsp;As with Domino, the server-side code is evaluated when the page is loaded.</font>
<br />
<br /><font size=2 face="sans-serif">For example, you want to retrieve values from a Notes document and use that value in client-side script. &nbsp;On the client-side onclick event for the button, you can place the following simple EL expression:</font>
<br /><img src="http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/d6plinks/GROC-7GLFZG/StoryRichTextMime/M5?OpenElement"  alt="Image:John's Blog - XPages: Techniques for using Client-Side Javascript with Server-Side Javascript" Title="Image:John's Blog - XPages: Techniques for using Client-Side Javascript with Server-Side Javascript" />
<br />
<br />
<br /><font size=2 face="sans-serif">Here's the result if you click the button in your browser:</font>
<br />
<br /><img src="http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/d6plinks/GROC-7GLFZG/StoryRichTextMime/M6?OpenElement"  alt="Image:John's Blog - XPages: Techniques for using Client-Side Javascript with Server-Side Javascript" Title="Image:John's Blog - XPages: Techniques for using Client-Side Javascript with Server-Side Javascript" />
<br />
<br /><font size=2 face="sans-serif">or you can use server-side Javascript to perform the same task as the EL expression:</font>
<br />
<br /><img src="http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/d6plinks/GROC-7GLFZG/StoryRichTextMime/M7?OpenElement"  alt="Image:John's Blog - XPages: Techniques for using Client-Side Javascript with Server-Side Javascript" Title="Image:John's Blog - XPages: Techniques for using Client-Side Javascript with Server-Side Javascript" />
<br />
<br />
<br /><font size=2 face="sans-serif">or let's say you have a session variable from another page:</font>
<br />
<br /><img src="http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/d6plinks/GROC-7GLFZG/StoryRichTextMime/M8?OpenElement"  alt="Image:John's Blog - XPages: Techniques for using Client-Side Javascript with Server-Side Javascript" Title="Image:John's Blog - XPages: Techniques for using Client-Side Javascript with Server-Side Javascript" />
<br />
<br /><font size=2 face="sans-serif">or...here I am getting the database name using an @Function::</font>
<br />
<br /><img src="http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/d6plinks/GROC-7GLFZG/StoryRichTextMime/M9?OpenElement"  alt="Image:John's Blog - XPages: Techniques for using Client-Side Javascript with Server-Side Javascript" Title="Image:John's Blog - XPages: Techniques for using Client-Side Javascript with Server-Side Javascript" />
<br />
<br /><img src="http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/d6plinks/GROC-7GLFZG/StoryRichTextMime/M10?OpenElement"  alt="Image:John's Blog - XPages: Techniques for using Client-Side Javascript with Server-Side Javascript" Title="Image:John's Blog - XPages: Techniques for using Client-Side Javascript with Server-Side Javascript" />
<br />
<br /><font size=2 face="sans-serif">As you can see, you can pretty much execute any server-side Javascript to return the values you want. &nbsp;This includes server-side js functions from script libraries if they are set as resources for the page.</font>
<br />
<br /><font size=2 face="sans-serif">Additional resources:</font>
<br /><font size=2 face="sans-serif">Last year there was an article written by Jason English and my good friend Sal Mazzotta for Lotus Component Designer titled </font><a href="http://www.ibm.com/developerworks/lotus/library/lcd-client-side/" target=_blank><font size=2 color=blue face="sans-serif">Client-side JavaScript techniques and demos</font></a><font size=2 face="sans-serif">. &nbsp;Though all of it does not apply to XPages, you can find techniques similar to the above as well as additional techniques that might be useful.</font>
<br />
<br /><font size=2 face="sans-serif">John</font> ]]></content:encoded><pubDate>Wed, 16 Jul 2008 07:55:51 -0400</pubDate><slash:comments>3</slash:comments><wfw:commentRss>http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/CommentsRSS?Open&amp;id=D6F8542646894A8285257488004189E1</wfw:commentRss><wfw:comment>http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/PostComment?RunAgent&amp;id=D6F8542646894A8285257488004189E1</wfw:comment></item><item><title>XPages Example: Calling Java Methods directly from server side JavaScript - performing an SQL query Part 1</title><link>http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/d6plinks/GROC-7G9GT4</link><description><![CDATA[ I have been reading many of the discussions this week concerning JavaScript as the language for XPages. &nbsp;I can understand many of the concerns and questions as to why JavaScript? &nbsp;So, I decided to demonstrate one of the advantages of using ...]]></description><dc:subject>Domino 8.5 - XPages</dc:subject><dc:creator>groupwareinc</dc:creator><comments>http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/d6plinks/GROC-7G9GT4</comments><guid isPermaLink="true">http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/d6plinks/GROC-7G9GT4</guid><content:encoded><![CDATA[ <font size=2 face="sans-serif">I have been reading many of the discussions this week concerning JavaScript as the language for XPages. &nbsp;I can understand many of the concerns and questions as to why JavaScript? &nbsp;So, I decided to demonstrate one of the advantages of using JavaScript as the server side language for XPages. &nbsp;In the below example I demonstrate how easy it is, and how powerful it is, to call Java methods directly from JavaScript. &nbsp;You can download the example Domino database by clicking here: </font><a href=http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/D6plinks/GROC7GAHWT.htm/$FILE/XPagesJSToJava.nsf><font size=2 color=blue face="sans-serif">XPagesJSToJava.nsf</font></a>
<br />
<br /><font size=2 face="sans-serif">JavaScript can call Java methods directly and pass variables to and from those methods. &nbsp;There are some &quot;type&quot; differences between Java and JavaScript that you need to be aware of. &nbsp;I believe the charts on this site outline the variable conversions well:
</font><a href=http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Guide:LiveConnect_Overview:Data_Type_Conversions:JavaScript_to_Java_Conversions target=_blank><font size=2 color=blue face="sans-serif">Javascript to Java Conversions</font></a><font size=2 face="sans-serif">. &nbsp;In the below example I pass string values directly from JavaScript to and from Java, which is straightforward and without any conversion issues.</font>
<br />
<br /><font size=2 face="sans-serif">Since Domino 8.5 is Eclipse based, you can switch to the Java perspective and add Java code to your project. The nsf database is the project. &nbsp;(If you haven't done this yet, it is interesting to switch perspectives and look around at the structure and the code.) &nbsp;By switching to the Java perspective, you open up your code to the importing or referencing of Java libraries, or the creation of your own classes. &nbsp;</font>
<br />
<br /><font size=2 face="sans-serif">What makes calling Java methods directly so powerful in XPages is that nearly every property in an XPage can be computed, and wherever these's a computation you can use JavaScript for the value or formula. &nbsp;For example, &nbsp;this will allow you to call Java for: populating data sources, labels, view column labels, view data columns, computed text, visibility formulas, any place you see a diamond (which is everywhere)...as well as all server side events. &nbsp;So, wherever you can call JavaScript you can also basically call Java methods!</font>
<br />
<br /><font size=2 face="sans-serif"><strong>Example Overview</strong></font>
<br /><font size=2 face="sans-serif">In this example I am calling a Java method that will return data from a DB2 database. I pass in the query and I receive a concatenated string as the result. &nbsp;If you want to follow the example, and you do not have DB2, you can download DB2 9C for free from here: </font><a href="http://www-306.ibm.com/software/data/db2/express/download.html" target=_blank><font size=2 color=blue face="sans-serif">DB2 Expess-c 9.5</font></a><font size=2 face="sans-serif">. &nbsp;After the install you will see an option to create the Sample database, select this and you will have pre-populated tables to work with.</font>
<br />
<br /><font size=2 face="sans-serif"><em>**Just a note that this is just for demo purposes and performance was not a key consideration. &nbsp;Hopefully access to relational databases will be native in a future release.</em></font>
<br />
<br /><font size=2 face="sans-serif">This is a screen shot of the Employee XPage. &nbsp;The Combo Box Control's values are populated with a JavaScript call to &quot;getDeptNumbers()&quot;. &nbsp;This function calls the Java method &quot;javaMethods.SQLQuery.executeQuery()&quot; which is the <em>Packagename.Class.Method()
</em>of the method we want to call. &nbsp;The last line of the JavaScript function I use an &quot;@Explode&quot; in order to convert the string to an Array for the Combo Box values. &nbsp;There's very minimum amount of code in this example so it will be easy to implement.</font>
<br /><img src="http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/d6plinks/GROC-7G9GT4/StoryRichTextMime/M2?OpenElement"  alt="Image:John's Blog - XPages Example: Calling Java Methods directly from server side JavaScript - performing an SQL query Part 1" Title="Image:John's Blog - XPages Example: Calling Java Methods directly from server side JavaScript - performing an SQL query Part 1" />
<br /><font size=2 face="sans-serif"><em>** update 7/9/08 - I changed the location of the SQLQuery.java file in Part 2 of this article and it is different than in the Eclipse screen shot</em></font>
<br />
<br /><font size=2 face="sans-serif">Here is a screen shot of the Employee View where I perform a dynamic SQL lookup on the last column. &nbsp;Nathan Freeman posted an </font><a href="http://www.lotus911.com/nathan/escape.nsf/d6plinks/NTFN-7FRG79" target=_blank><font size=2 color=blue face="sans-serif">example</font></a><font size=2 face="sans-serif"> of performing a @DbLookup on a view column. &nbsp;It's a great example, and a great change in how we as Domino developers can utilize views in XPages. &nbsp;View columns can contain any JavaScript formula in XPages, so they can be dynamic.</font>
<br />
<br /><font size=2 face="sans-serif">As the view is rendering it is dynamically performing SQL lookups for the Department Name by passing the ColumnValue &quot;Depart. No.&quot; to the JavaScript function &quot;getDepartment(deptNo)&quot;. &nbsp;This function makes a call to executeQuery passing in the &quot;where&quot; clause so we only retrieve the single Department Name for each Dept. No. in a row. &nbsp; Now....I Know what you are thinking....performance obviously would be a consideration in really using this technique....but it's really cool example nonetheless!</font>
<br /><img src="http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/d6plinks/GROC-7G9GT4/StoryRichTextMime/M3?OpenElement"  alt="Image:John's Blog - XPages Example: Calling Java Methods directly from server side JavaScript - performing an SQL query Part 1" Title="Image:John's Blog - XPages Example: Calling Java Methods directly from server side JavaScript - performing an SQL query Part 1" />
<br />
<br /><font size=2 face="sans-serif"><strong>How to build it</strong></font>
<br />
<br /><font size=2 face="sans-serif">Click here to continue with Part 2:
</font><a href="http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/d6plinks/GROC-7GAFVQ"><font size=2 color=blue face="sans-serif">How to build it</font></a><font size=2 face="sans-serif">.....</font>
<br /> ]]></content:encoded><pubDate>Mon, 7 Jul 2008 00:00:00 -0400</pubDate><slash:comments>10</slash:comments><wfw:commentRss>http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/CommentsRSS?Open&amp;id=14DDB4518C16D3AD8525747D00454BBB</wfw:commentRss><wfw:comment>http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/PostComment?RunAgent&amp;id=14DDB4518C16D3AD8525747D00454BBB</wfw:comment></item><item><title>XPages Example: Calling Java Methods directly from server side JavaScript - performing an SQL query Part 2</title><link>http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/d6plinks/GROC-7GAFVQ</link><description><![CDATA[ This is Part 2 of this example. &nbsp;Click here to read Part 1.

How to Build It
I'll go over the steps in detail here. &nbsp;The steps are actually very few. &nbsp;I found that the SQL.jar file is already included in the project, so you do not need to ...]]></description><dc:subject>Domino 8.5 - XPages</dc:subject><dc:creator>groupwareinc</dc:creator><comments>http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/d6plinks/GROC-7GAFVQ</comments><guid isPermaLink="true">http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/d6plinks/GROC-7GAFVQ</guid><content:encoded><![CDATA[ <font size=2 face="sans-serif">This is Part 2 of this example. &nbsp;Click here to </font><a href="h]]></content:encoded><pubDate>Mon, 7 Jul 2008 00:00:00 -0400</pubDate><slash:comments>0</slash:comments><wfw:commentRss>http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/CommentsRSS?Open&amp;id=50C9A0EA7AE121E98525747E0040FE2F</wfw:commentRss><wfw:comment>http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/PostComment?RunAgent&amp;id=50C9A0EA7AE121E98525747E0040FE2F</wfw:comment></item><item><title>XPages Example: Building a Custom Control - How to build a Custom Multi-FileUpload Control that you can drop on any XPage, and it stores all attachments in an external repository db.</title><link>http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/d6plinks/GROC-7G3GF7</link><description><![CDATA[ * please note: There are a few issues with Beta 2 that prevent this example from working properly. &nbsp;Refer to this blog entry for workarounds.

Below is an example of how to build a multi file upload Custom Control that uses a central attachment ...]]></description><dc:subject>Domino 8.5 - XPages</dc:subject><dc:creator>groupwareinc</dc:creator><comments>http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/d6plinks/GROC-7G3GF7</comments><guid isPermaLink="true">http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/d6plinks/GROC-7G3GF7</guid><content:encoded><![CDATA[ <font size=2 color=red face="sans-serif"><em>* please note: There are a few issues with Beta 2 that prevent this example from working properly. &nbsp;Refer to this </em></font><a href="http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/d6plinks/GROC-7JGKQW"><font size=2 color=blue face="sans-serif"><em>blog entry for workarounds</em></font></a><font size=2 color=red face="sans-serif"><em>.</em></font>
<br />
<br /><font size=2 face="sans-serif">Below is an example of how to build a multi file upload Custom Control that uses a central attachment repository db for all the attachments. &nbsp;The application has very little code and utilizes the Repeat control and Panel control to generate an unlimited amount of uploads per XPage. &nbsp;(Actually, I am sure there is a limit but I have not hit it yet.) &nbsp;The step by step instructions are below. &nbsp;You can also download the example database(s) by clicking here: </font><a href=http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/D6plinks/GROC7G3HQ8.htm/$FILE/XPagesCustomControl.zip><font size=2 color=blue face="sans-serif">XPageCustomControl.zip</font></a>
<br />
<br /><font size=2 face="sans-serif"><strong>Overview:</strong></font>
<br />
<br /><font size=2 face="sans-serif">XPage Custom Controls allow you to build your own controls for reuse. &nbsp;They show up in the control palette and can be dragged and dropped on any page just like any of the other controls. &nbsp;The concept is similar to a subform in Domino.</font>
<br />
<br /><font size=2 face="sans-serif">I was demoing XPages to a group of colleagues the other day. &nbsp;I was showing an example of the repeat control, which allows you to repeat a group of other controls based on a formula or value. &nbsp;The neat thing about the Repeat control is it can dynamically creates controls at runtime. &nbsp;One of the the guys asked about using the control to generate unlimited file upload controls for storage in central repository database. &nbsp;I thought... wow, that is a great use case for an example (thanks Mark). &nbsp;It was very quick to build too.</font>
<br />
<br /><font size=2 face="sans-serif">Let's start out with a look at the completed custom control:</font>
<br />
<br /><img src="http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/d6plinks/GROC-7G3GF7/StoryRichTextMime/M2?OpenElement"  alt="Image:John's Blog - XPages Example: Building a Custom Control - How to build a Custom Multi-FileUpload Control that you can drop on any XPage, and it stores all attachments in an external repository db." Title="Image:John's Blog - XPages Example: Building a Custom Control - How to build a Custom Multi-FileUpload Control that you can drop on any XPage, and it stores all attachments in an external repository db." />
<br />
<br /><font size=2 face="sans-serif">After dropping it on an XPage, here is a screen shot of the control in use. &nbsp;You can see that 3 files have been uploaded already and the user clicked the &quot;Add New Upload&quot; button a 4th time and is &nbsp;presented with a blank upload control plus a description field:</font>
<br />
<br /><img src="http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/d6plinks/GROC-7G3GF7/StoryRichTextMime/M3?OpenElement"  alt="Image:John's Blog - XPages Example: Building a Custom Control - How to build a Custom Multi-FileUpload Control that you can drop on any XPage, and it stores all attachments in an external repository db." Title="Image:John's Blog - XPages Example: Building a Custom Control - How to build a Custom Multi-FileUpload Control that you can drop on any XPage, and it stores all attachments in an external repository db." />
<br />
<br /><font size=2 face="sans-serif">The &quot;Add New Upload&quot; button creates a new document in the FileUploadDB database with a reference to the current document's doc ID. The page is then reloaded and the repeat control creates a new blank upload control bound to the new document. A simple JavaScript save() uploads the attachment.</font>
<br />
<br /><font size=2 face="sans-serif">You can drop this control anywhere on your page(s). &nbsp;The only additional item that is needed on your page is a field calculating the document's docUNID (2nd to last screen shot below).</font>
<br />
<br />
<br /><font size=2 face="sans-serif"><strong>Here are the steps to build the control:</strong></font>
<br />
<br /><font size=2 face="sans-serif">In your database, under Database Navigator select &quot;Custom Controls&quot; then click &quot;New Custom Control&quot;<strong>. &nbsp;</strong>Provide a name for the control.</font>
<br />
<br /><font size=2 face="sans-serif">Drag and drop a Button control on the page and for the label enter &quot;Add New Upload&quot;. &nbsp;Select the Event tab and provide the following formula for the onclick() event. &nbsp;This will create a new attachment document in the repository and reload the page:</font>
<br />
<br /><img src="http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/d6plinks/GROC-7G3GF7/StoryRichTextMime/M4?OpenElement"  alt="Image:John's Blog - XPages Example: Building a Custom Control - How to build a Custom Multi-FileUpload Control that you can drop on any XPage, and it stores all attachments in an external repository db." Title="Image:John's Blog - XPages Example: Building a Custom Control - How to build a Custom Multi-FileUpload Control that you can drop on any XPage, and it stores all attachments in an external repository db." />
<br /><font size=2 face="sans-serif"><em>*note: for this example the attachment repository is named &quot;FileUploadDB.nsf&quot; in the Domino root directory</em></font>
<br />
<br /><font size=2 face="sans-serif">Next drag a Repeat control to the canvas. &nbsp;Select JavaScript for the Iteration and enter the following for the &nbsp;formula. &nbsp;This formula looks up the associated attachments and generates an array of docIDs based on the document collection:</font>
<br /><img src="http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/d6plinks/GROC-7G3GF7/StoryRichTextMime/M5?OpenElement"  alt="Image:John's Blog - XPages Example: Building a Custom Control - How to build a Custom Multi-FileUpload Control that you can drop on any XPage, and it stores all attachments in an external repository db." Title="Image:John's Blog - XPages Example: Building a Custom Control - How to build a Custom Multi-FileUpload Control that you can drop on any XPage, and it stores all attachments in an external repository db." />
<br />
<br /><font size=2 face="sans-serif">Enter the following for the Repeat control options. The &quot;docid&quot; variable will contain the docUNID for each document:</font>
<br /><img src="http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/d6plinks/GROC-7G3GF7/StoryRichTextMime/M6?OpenElement"  alt="Image:John's Blog - XPages Example: Building a Custom Control - How to build a Custom Multi-FileUpload Control that you can drop on any XPage, and it stores all attachments in an external repository db." Title="Image:John's Blog - XPages Example: Building a Custom Control - How to build a Custom Multi-FileUpload Control that you can drop on any XPage, and it stores all attachments in an external repository db." />
<br /><font size=2 face="sans-serif"><em>*note: I do limit the amount of uploads to 30. &nbsp;I think that's enough...</em></font>
<br />
<br /><font size=2 face="sans-serif">Next drop a Panel control into the Repeat control. &nbsp;Set the Datasource as follows:</font>
<br />
<br /><img src="http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/d6plinks/GROC-7G3GF7/StoryRichTextMime/M7?OpenElement"  alt="Image:John's Blog - XPages Example: Building a Custom Control - How to build a Custom Multi-FileUpload Control that you can drop on any XPage, and it stores all attachments in an external repository db." Title="Image:John's Blog - XPages Example: Building a Custom Control - How to build a Custom Multi-FileUpload Control that you can drop on any XPage, and it stores all attachments in an external repository db." />
<br />
<br /><font size=2 face="sans-serif">Set the Document Id to be computed. &nbsp;The Document ID will be the &quot;docid&quot; variable from the Repeat control:</font>
<br /><img src="http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/d6plinks/GROC-7G3GF7/StoryRichTextMime/M8?OpenElement"  alt="Image:John's Blog - XPages Example: Building a Custom Control - How to build a Custom Multi-FileUpload Control that you can drop on any XPage, and it stores all attachments in an external repository db." Title="Image:John's Blog - XPages Example: Building a Custom Control - How to build a Custom Multi-FileUpload Control that you can drop on any XPage, and it stores all attachments in an external repository db." />
<br />
<br /><font size=2 face="sans-serif">There is one property we do have to set that is not obvious if you are starting out with XPages and Panels. &nbsp;That is to: &quot;ignoreRequestParams&quot;. &nbsp;The reason for this is we are setting the Document ID and default Action for the Panel ourselves and do not want the Panel to pick up these parameters from the request. &nbsp;Here is a screen shot of how to set that parameter:</font>
<br /><img src="http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/d6plinks/GROC-7G3GF7/StoryRichTextMime/M9?OpenElement"  alt="Image:John's Blog - XPages Example: Building a Custom Control - How to build a Custom Multi-FileUpload Control that you can drop on any XPage, and it stores all attachments in an external repository db." Title="Image:John's Blog - XPages Example: Building a Custom Control - How to build a Custom Multi-FileUpload Control that you can drop on any XPage, and it stores all attachments in an external repository db." />
<br />
<br /><font size=2 face="sans-serif">Drop a &quot;Table control&quot; to the Panel, 1 row by 2 columns. Now we need to add our controls to the Table. &nbsp;Add an &quot;Edit Box&quot;, &quot;File Upload&quot; and &quot;File Download&quot;. &nbsp;Here's a screen shot of the bindings for the controls:</font>
<br />
<br /><font size=2 face="sans-serif">Description Edit Box Control:</font>
<br /><img src="http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/d6plinks/GROC-7G3GF7/StoryRichTextMime/M10?OpenElement"  alt="Image:John's Blog - XPages Example: Building a Custom Control - How to build a Custom Multi-FileUpload Control that you can drop on any XPage, and it stores all attachments in an external repository db." Title="Image:John's Blog - XPages Example: Building a Custom Control - How to build a Custom Multi-FileUpload Control that you can drop on any XPage, and it stores all attachments in an external repository db." />
<br />
<br /><font size=2 face="sans-serif">FileUpload Control and FileDownload Control both have the same bindings:</font>
<br /><img src="http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/d6plinks/GROC-7G3GF7/StoryRichTextMime/M11?OpenElement"  alt="Image:John's Blog - XPages Example: Building a Custom Control - How to build a Custom Multi-FileUpload Control that you can drop on any XPage, and it stores all attachments in an external repository db." Title="Image:John's Blog - XPages Example: Building a Custom Control - How to build a Custom Multi-FileUpload Control that you can drop on any XPage, and it stores all attachments in an external repository db." />
<br />
<br /><font size=2 face="sans-serif">For the FileUpload control we want to hide the control after one file has been uploaded. &nbsp;We only want one attachment per repository document. &nbsp;Here is a screen shot of the Visibility formula and where you would set that:</font>
<br /><img src="http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/d6plinks/GROC-7G3GF7/StoryRichTextMime/M12?OpenElement"  alt="Image:John's Blog - XPages Example: Building a Custom Control - How to build a Custom Multi-FileUpload Control that you can drop on any XPage, and it stores all attachments in an external repository db." Title="Image:John's Blog - XPages Example: Building a Custom Control - How to build a Custom Multi-FileUpload Control that you can drop on any XPage, and it stores all attachments in an external repository db." />
<br />
<br /><font size=2 face="sans-serif">Set the opposite logic for the FileDownload control, that is return false if there are 0 attachments.</font>
<br />
<br /><font size=2 face="sans-serif">Place a Button control in the second column labeled &quot;Upload&quot;. &nbsp;Set the same visibilty formula as the FileUpload control. &nbsp;It has a very simple formula which saves all data sources. You could substitute a simple action here if you prefer:</font>
<br />
<br /><img src="http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/d6plinks/GROC-7G3GF7/StoryRichTextMime/M13?OpenElement"  alt="Image:John's Blog - XPages Example: Building a Custom Control - How to build a Custom Multi-FileUpload Control that you can drop on any XPage, and it stores all attachments in an external repository db." Title="Image:John's Blog - XPages Example: Building a Custom Control - How to build a Custom Multi-FileUpload Control that you can drop on any XPage, and it stores all attachments in an external repository db." />
<br />
<br />
<br /><font size=2 face="sans-serif">On the form where you will use the new MultiUpload control, I use the universalID for the link between the document and the attachment. &nbsp;I placed a hidden Edit Box control on the page with the following Default value formula:</font>
<br /><img src="http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/d6plinks/GROC-7G3GF7/StoryRichTextMime/M14?OpenElement"  alt="Image:John's Blog - XPages Example: Building a Custom Control - How to build a Custom Multi-FileUpload Control that you can drop on any XPage, and it stores all attachments in an external repository db." Title="Image:John's Blog - XPages Example: Building a Custom Control - How to build a Custom Multi-FileUpload Control that you can drop on any XPage, and it stores all attachments in an external repository db." />
<br />
<br /><font size=2 face="sans-serif">Lastly, here is the Attachment form in the FileuploadDB.nsf repository. I have a view sorted by ParentUNID named &quot;vAttachmentLkUp&quot;:</font>
<br /><img src="http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/d6plinks/GROC-7G3GF7/StoryRichTextMime/M15?OpenElement"  alt="Image:John's Blog - XPages Example: Building a Custom Control - How to build a Custom Multi-FileUpload Control that you can drop on any XPage, and it stores all attachments in an external repository db." Title="Image:John's Blog - XPages Example: Building a Custom Control - How to build a Custom Multi-FileUpload Control that you can drop on any XPage, and it stores all attachments in an external repository db." />
<br />
<br /><font size=2 face="sans-serif">That's it! &nbsp;It really is very minimal the amount of work involved. &nbsp;It took less than an hour for me to do. &nbsp;I am sure the interface could use a little bit more work, but I think it makes for a great example.</font>
<br />
<br /><font size=2 face="sans-serif">The one issue I had seemed to be a bug where I could not place the FileUpload control as the first control in the Panel. &nbsp;I ended up putting the Description first and that seemed to fix the issue...very odd issue. &nbsp;I posted the problem to the 8.5 Beta forum.</font>
<br />
<br /><font size=2 face="sans-serif">Download it and try it out. &nbsp;Hopefully seeing these techniques solving a real business need will start you thinking about other uses for this technology. &nbsp;Let me know if you have any questions....</font>
<br />
<br /><font size=2 face="sans-serif">John</font>
<br /> ]]></content:encoded><pubDate>Sun, 29 Jun 2008 08:17:49 -0400</pubDate><slash:comments>4</slash:comments><wfw:commentRss>http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/CommentsRSS?Open&amp;id=667EFE83D9BB79A88525747700438CB6</wfw:commentRss><wfw:comment>http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/PostComment?RunAgent&amp;id=667EFE83D9BB79A88525747700438CB6</wfw:comment></item></channel>
</rss>
