<?xml version="1.0" encoding="UTF-8"?>
<!--Generated by Squarespace Site Server v5.11.0 (http://www.squarespace.com/) on Thu, 29 Jul 2010 11:15:24 GMT--><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rss="http://purl.org/rss/1.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:content="http://purl.org/rss/1.0/modules/content/" xmlns:cc="http://web.resource.org/cc/"><rss:channel rdf:about="http://xpagesblog.com/xpages-blog/"><rss:title>The XPages Blog</rss:title><rss:link>http://xpagesblog.com/xpages-blog/</rss:link><rss:description>A blog about IBM Lotus Domino XPages</rss:description><dc:language>en-US</dc:language><dc:date>2010-07-29T11:15:24Z</dc:date><admin:generatorAgent rdf:resource="http://www.squarespace.com/">Squarespace Site Server v5.11.0 (http://www.squarespace.com/)</admin:generatorAgent><rss:items><rdf:Seq><rdf:li rdf:resource="http://xpagesblog.com/xpages-blog/2010/7/26/free-xpages-training-options.html"/><rdf:li rdf:resource="http://xpagesblog.com/xpages-blog/2010/7/15/whats-new-in-852-for-xpages.html"/><rdf:li rdf:resource="http://xpagesblog.com/xpages-blog/2010/7/5/writing-a-managed-bean-to-automate-server-side-functionality.html"/><rdf:li rdf:resource="http://xpagesblog.com/xpages-blog/2010/6/28/quick-tip-passing-a-value-from-the-client-to-the-server-usin.html"/><rdf:li rdf:resource="http://xpagesblog.com/xpages-blog/2010/6/24/calling-timeout-on-large-file-uploads-in-xpages.html"/><rdf:li rdf:resource="http://xpagesblog.com/xpages-blog/2010/6/23/session-review-a-deep-dive-on-building-notesdomino-applicati.html"/><rdf:li rdf:resource="http://xpagesblog.com/xpages-blog/2010/6/21/tutorial-introduction-to-xpages.html"/><rdf:li rdf:resource="http://xpagesblog.com/xpages-blog/2010/6/20/resizing-an-xpage-control-with-dhtml.html"/><rdf:li rdf:resource="http://xpagesblog.com/xpages-blog/2010/6/16/quick-dojoquery-tip-for-cross-browser-compatibility.html"/><rdf:li rdf:resource="http://xpagesblog.com/xpages-blog/2010/6/16/single-copy-xpage-design-another-piece-of-xpages-magic.html"/></rdf:Seq></rss:items></rss:channel><rss:item rdf:about="http://xpagesblog.com/xpages-blog/2010/7/26/free-xpages-training-options.html"><rss:title>Free XPages Training Options</rss:title><rss:link>http://xpagesblog.com/xpages-blog/2010/7/26/free-xpages-training-options.html</rss:link><dc:creator>David Leedy</dc:creator><dc:date>2010-07-26T11:31:39Z</dc:date><dc:subject>General XPages Training</dc:subject><content:encoded><![CDATA[<p>August is a big month for XPages as there are two U.S. based User Group Meetings offering a TON of XPages training.&nbsp;</p>
<p>First in St. Louis we have:</p>
<p><a href="http://iamlug.org/iamlug/IamLug2010.nsf/home.xsp">IamLUG</a> - August 2-3</p>
<ul>
<li><a id="view:_id1:_id2:_id23:repeat1:19:_id25:link1" class="xspLink" href="http://iamlug.org/iamlug/IamLug2010.nsf/sessions.xsp#">Mobilize Your Existing Apps in 30 Minutes Using XPages and Unplugged</a> - Richard Sharpe</li>
<li><a id="view:_id1:_id2:_id23:repeat1:28:_id25:link1" class="xspLink" href="http://iamlug.org/iamlug/IamLug2010.nsf/sessions.xsp#">Ten XPages Design Patterns</a> - Matt White</li>
<li><a id="view:_id1:_id2:_id23:repeat1:29:_id25:link1" class="xspLink" href="http://iamlug.org/iamlug/IamLug2010.nsf/sessions.xsp#">The Xpages Revolution: Scalabilit&eacute;, Maintenabilit&eacute;, Usabilit&eacute;</a> - Tim Tripcony/Nathan Freeman</li>
<li><a id="view:_id1:_id2:_id23:repeat1:32:_id25:link1" class="xspLink" href="http://iamlug.org/iamlug/IamLug2010.nsf/sessions.xsp#">Using XML and RDBMS Data Sources in XPages</a> - Paul Calhoun</li>
<li><a id="view:_id1:_id2:_id23:repeat1:34:_id25:link1" class="xspLink" href="http://iamlug.org/iamlug/IamLug2010.nsf/sessions.xsp#">XPages beyond the Introduction</a> - David Leedy</li>
</ul>
<p>Then later in Cleveland we have:</p>
<p><a href="http://www.mwlug.com/mwlug/mwlug2010.nsf/uxpages/welcome.uxp">MWLug</a> - August 19-20</p>
<ul>
<li><a href="http://www.mwlug.com/MWLUG/mwlug2010.nsf/uxpages/sessions.uxp">Introduction to XPages</a> - David Leedy</li>
<li><a href="http://www.mwlug.com/MWLUG/mwlug2010.nsf/uxpages/sessions.uxp">Starting XPages? Avoid These 10 XPages Gotchas</a> - Richard Sharpe</li>
<li><a href="http://www.mwlug.com/MWLUG/mwlug2010.nsf/uxpages/sessions.uxp">What You Need to Know to Get Started with Server-Side JavaScript</a> - Scott Good</li>
<li><a href="http://www.mwlug.com/MWLUG/mwlug2010.nsf/uxpages/sessions.uxp">XPages Workshop: Building a Simple Application</a> - Michael McGarel &amp; Roy Rumaner</li>
<li><a href="http://www.mwlug.com/MWLUG/mwlug2010.nsf/uxpages/sessions.uxp">XPages: Beyond the Introduction</a> - David Leedy</li>
<li><a href="http://www.mwlug.com/MWLUG/mwlug2010.nsf/uxpages/sessions.uxp">XPages: The Evolution of Possible</a> - Tim Tripcony</li>
<li><a href="http://www.mwlug.com/MWLUG/mwlug2010.nsf/uxpages/sessions.uxp">Web Technologies Every Domino Developer Should Know</a> - Brandt Fundak</li>
</ul>
<p>In addition, for those looking to get even more training in XPages, Matt White from Elguji and xpages101.net will be giving a full day's worth of training in the <a href="http://iamlug.org/iamlug/IamLug2010.nsf/bonuscontent1.xsp">Tack It On</a> portion of IamLUG.&nbsp; Only $495 to IamLUG attendees for a full days worth of XPages training.&nbsp;&nbsp;</p>
<p>&nbsp;</p>]]></content:encoded></rss:item><rss:item rdf:about="http://xpagesblog.com/xpages-blog/2010/7/15/whats-new-in-852-for-xpages.html"><rss:title>What's New in 852 for XPages</rss:title><rss:link>http://xpagesblog.com/xpages-blog/2010/7/15/whats-new-in-852-for-xpages.html</rss:link><dc:creator>Paul Hannan</dc:creator><dc:date>2010-07-15T10:03:20Z</dc:date><dc:subject>852 General</dc:subject><content:encoded><![CDATA[<div id="_mcePaste"><strong>DISCLAIMER:</strong> IBM Lotus Notes Domino R8.5.2 is pre-release software so there is no guarantee that what is written below will be part of the final release.</div>
<div></div>
<div style="text-align: center;">***</div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div id="_mcePaste"></div>
<div id="_mcePaste">Here is a list of the new XPages features and enhancements, some big, some small, coming in 852. It's an A to Z with one-liners (a little rough now, some with placeholders - we will get to those in time), with links to existing articles and blog posts.</div>
<div>So here goes...</div>
<div></div>
<div style="text-align: center;">***</div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div id="_mcePaste"></div>
<div id="_mcePaste"><strong>Accessibility:</strong></div>
<div>
<ul>
<li>ARIA support (includes the role property added to many controls) - the role property implements the W3C ARIA specification on roles at <a href="http://www.w3.org/TR/wai-aria/#Using_intro" target="_blank">http://www.w3.org/TR/wai-aria/#Using_intro</a>.</li>
</ul>
</div>
<div style="padding-left: 30px;"></div>
<div style="padding-left: 30px;"></div>
<div id="_mcePaste"></div>
<div id="_mcePaste"><strong>Active Content Filter:</strong></div>
<div id="_mcePaste">
<ul>
<li>The ACF has been upgrade since 851. The version in 852 is 2.4.0 &lt;placeholder&gt;</li>
</ul>
</div>
<div style="padding-left: 30px;"></div>
<div style="padding-left: 30px;"></div>
<div id="_mcePaste"></div>
<div id="_mcePaste"><strong>Agents:</strong></div>
<div>
<ul>
<li>Ability to run Agents with In-Memory documents -&nbsp;Agent.runWithDocumentContext(Document doc) -&nbsp;Agent.runWithDocumentContext(Document doc, String noteID)</li>
<li>Java Agents in XPiNC.</li>
</ul>
</div>
<div id="_mcePaste"></div>
<div id="_mcePaste"><strong>Ajax - Partial Refresh:</strong></div>
<div id="_mcePaste">
<ul>
<li>Set a timeout for partial refresh - "xsp.partial.update.timeout" - See <a href="http://xpagesblog.com/xpages-blog/2010/6/24/calling-timeout-on-large-file-uploads-in-xpages.html" target="_blank">this</a>&nbsp;for a use case.</li>
</ul>
</div>
<div id="_mcePaste"></div>
<div id="_mcePaste"><strong>Ajax - Type-ahead:</strong></div>
<div id="_mcePaste">
<ul>
<li>Prevent-filtering property (TypeAhead preventFiltering property).&nbsp;The typeahead *always* automatically filters the entries based on the first characters sent by the browser, which prevent some use cases from working. For example, where you would like to show results from the first character on the second word.&nbsp;This new property prevents this filtering.</li>
</ul>
</div>
<div id="_mcePaste"></div>
<div id="_mcePaste"><strong>CKEditor:</strong></div>
<div id="_mcePaste">
<ul>
<li>CKEditor - new default rich text editor to XPages. This is the new default Rich Text Editor for 852, though if you need to switch back to using the previous dojo editor, there is an option here to do so.</li>
</ul>
</div>
<div id="_mcePaste"></div>
<div id="_mcePaste"><strong>Controls:</strong></div>
<div id="_mcePaste">
<ul>
<li>Radio Group &amp; Checkbox Group - has been re-implemented in Designer</li>
<li>HTML tag support for Computed text (tagName Property). This allow the control to emit a tag for computed text, like h1, h2, h3 tags to aid in creating semantic HTML structures for documents (to help in search engine optimizations, etc).</li>
<li>Support for the "autocomplete" attribute on the EditBox to help manage the setting and changing of passwords.</li>
</ul>
<strong>Data Sources:</strong></div>
<div id="_mcePaste">
<ul>
<li>Soft deletes support enhancement.</li>
<li>Better server name support in the database Name attribute. This allows the database to be deployed on different servers and run on the client, XPiNC, without having to update the databaseName property for each NSF deployed to each server.</li>
</ul>
</div>
<div id="_mcePaste"></div>
<div id="_mcePaste"><strong>Designer:</strong></div>
<div>
<ul>
<li>Most if not all of the 'pretty' panels have been enhanced. The widely used properties from the 'All Properties' tab have now been promoted to the more user friendly panels. See the Data panel for the View Panel control. &lt;imageplaceholder&gt;</li>
<li>Drag and drop to the Source pane.</li>
<li>Lots of other stuff... &lt;placeholder&gt;</li>
</ul>
</div>
<div id="_mcePaste"></div>
<div id="_mcePaste"><strong>Discussion Template:</strong></div>
<div id="_mcePaste">
<ul>
<li>The Discussion template has gotten a further update in 852 so that it performs better and has a better user experience.</li>
</ul>
</div>
<div id="_mcePaste"></div>
<div id="_mcePaste"><strong>Documentation:</strong></div>
<div>
<ul>
<li>For Release 8.5.2, the XPages user's guide in the product documentation has been revised. It now includes reference topics for all controls and properties. The overview and other material has also been redrafted. Work is on going to improve this guide. &lt;thx Bob &gt;</li>
</ul>
</div>
<div id="_mcePaste"></div>
<div id="_mcePaste"><strong>Dojo:</strong></div>
<div id="_mcePaste">
<ul>
<li>Upgraded to Dojo 1.4.3 for the server and XPiNC. The server install will also include a further upgrade to 1.3.x to Dojo 1.3.3.</li>
<li>Dojo Type and Attributes added to more controls (including scriptBlock)</li>
<li>Support for dojoForms (dojoForm="true")</li>
</ul>
</div>
<div id="_mcePaste"></div>
<div id="_mcePaste"></div>
<div id="_mcePaste"><strong>Events:</strong></div>
<div id="_mcePaste">
<ul>
<li>onClientLoad Event. Its now possible to add scripts in the events to be executed when the page is submitted or this panel or some containing panel is partial updated.&nbsp;</li>
</ul>
</div>
<div id="_mcePaste"></div>
<div id="_mcePaste"></div>
<div id="_mcePaste"><strong>Extensions API:</strong></div>
<div>
<ul>
<li>Some have been calling this <strong>XPages, The Next Generation</strong>, and this feature is one of the main, if not the main highlight for XPages in 852.</li>
<li>Current documentation on the Wiki -&nbsp;<a href="http://www-10.lotus.com/ldd/ddwiki.nsf/dx/Master_Table_of_Contents_for_XPages_Extensibility_APIs_Developer_Guide" target="_blank">XPages Extensibility APIs Developer Guide</a></li>
<li>Tim Tripcony's blog post on this -&nbsp;<a href="http://www.timtripcony.com/blog.nsf/d6plinks/TTRY-86X7KV" target="_blank">the power of the extensibility API</a></li>
<li>Declan Lynch's post - &nbsp;<a href="http://www.qtzar.com/blogs/qtzar.nsf/d6plinks/DSLH-8673BY" target="_blank">XPages Is About To Get A Lot More Powerful</a></li>
</ul>
</div>
<div id="_mcePaste"></div>
<div id="_mcePaste"><strong>Global Objects:</strong></div>
<div id="_mcePaste">
<ul>
<li>Two new Global Objects for Server Side JavaScript, sessionAsSigner (open a session using the signer rights) and sessionAsSignerWithFullAccess(open a session using the signer rights, while giving it full access to the data)</li>
<li>sessionAsSigner - assigns credentials based on the signer of the of XPages design element. The session is restricted by the application's ACL and the security tab of the server's Domino Directory entry.</li>
<li>sessionAsSignerWithFullAccess - assigns credentials based on the signer of the of XPages design element and allows full administrative access to the application's data. The signer must have the right to such access or the session is not created.&nbsp;</li>
</ul>
</div>
<div id="_mcePaste"></div>
<div id="_mcePaste"><strong>HeadTag:</strong></div>
<div id="_mcePaste">
<ul>
<li>New resource xp:headTag - this allow you in an easy way to put stuff into the header of a XPage - and <a href="http://www-10.lotus.com/ldd/heidloffblog.nsf/dx/quick-tip-prereq-to-run-xpages-on-blackberry" target="_blank">here</a>&nbsp;is an example of it's use.</li>
</ul>
</div>
<div id="_mcePaste"></div>
<div id="_mcePaste"><strong>HTML5:</strong></div>
<div id="_mcePaste">
<ul>
<li>HTML5 cache manifest support. This offers&nbsp;off-line&nbsp;capabilities. See Niklas Heidloff's <a href="http://www.openntf.org/blogs/openntf.nsf/d6plinks/NHEF-85588X" target="_blank">HTML5 Offline Functionality in XPages 8.5.2</a>&nbsp;and&nbsp;Mark Hughes: <a href="http://dominoextnd.blogspot.com/2010/05/html-5-cache-manifest-and-dynamic-data.html" target="_blank">HTML 5 Cache Manifest and dynamic data</a></li>
<li>HTML5 Base resource support - pageBaseUrl property renders as a base tag in the header. The &lt;base&gt; tag specifies a default URL and\or a default target, for all elements with a URL.</li>
</ul>
</div>
<div id="_mcePaste"></div>
<div id="_mcePaste"><strong>Infrastructure:</strong></div>
<div id="_mcePaste">
<ul>
<li>OSGi Framwork. The runtime has switched over to use the OSGi framework.&nbsp;All the XPages libraries (which are under xsp/nsf/lib in 851) have being moved to the OSGI framework under the shared eclipse location.</li>
</ul>
</div>
<div id="_mcePaste"></div>
<div id="_mcePaste"><strong>Miscellaneous:</strong>&nbsp;</div>
<div id="_mcePaste">
<ul>
<li>New complex-type "loaded" property. New support has been added for the loaded attribute to complex types. This will allow for a&nbsp;way to conditionally define a complex objects like a dominoDocument on an XPage.&nbsp;</li>
</ul>
</div>
<div id="_mcePaste"></div>
<div id="_mcePaste"><strong>OneUI:</strong></div>
<div>
<ul>
<li>A new version fully available -&nbsp;oneuiv2. &nbsp;Try out these new themes: oneuiv2,&nbsp;oneuiv2_green,&nbsp;oneuiv2_gold,&nbsp;oneuiv2_metal and&nbsp;oneuiv2_red.&nbsp;</li>
</ul>
</div>
<div><strong>Pagers:</strong></div>
<div id="_mcePaste">
<ul>
<li>Last Page - allow for calculating the Last page in a Pager. In 851, there is a&nbsp;restriction on the number of pages the Pager will display. This is because of associated performance hit (this is still the case with this new property).&nbsp;However, customers have asked for an option to calculate this regardless. The 'alwaysCalculateLast' property, new to 852, allows you to do just that.<br />'</li>
</ul>
</div>
<div id="_mcePaste"></div>
<div id="_mcePaste"><strong>Performance:</strong></div>
<div id="_mcePaste">
<ul>
<li>Further enhancements in the Java back-end classes help XPages perform better. &lt;placeholder&gt;</li>
</ul>
</div>
<div id="_mcePaste"></div>
<div id="_mcePaste"><strong>Repeat Control:</strong></div>
<div id="_mcePaste">
<ul>
<li>Repeat Control enhancements - "xsp.repeat.allowZeroRowsPerPage". This option may be useful when you need to compute the number of rows to display as there may be situations where no rows should be displayed but the Repeat control should still render.</li>
</ul>
</div>
<div id="_mcePaste"></div>
<div id="_mcePaste"><strong>Security:</strong>&nbsp;</div>
<div id="_mcePaste">
<ul>
<li>Java Agents in XPiNC. &lt;placeholder&gt;</li>
<li>New ECL Permissions.&nbsp;&lt;placeholder&gt;</li>
<li>Public Access. Support for Public Access documents in XPages.&nbsp;</li>
<li>Managed beans from JS support 'JQUL7XPMVJ' &lt;placeholder&gt;</li>
</ul>
</div>
<div id="_mcePaste"></div>
<div id="_mcePaste"><strong>Single Copy XPage Design (SCXD):</strong></div>
<div>
<ul>
<li>My favourite. Redirect XPages design elements to other databases. See <a href="http://xpagesblog.com/xpages-blog/2010/6/16/single-copy-xpage-design-another-piece-of-xpages-magic.html" target="_blank">this</a> and <a href="http://www-10.lotus.com/ldd/ddwiki.nsf/dx/Single_Copy_XPage_Design" target="_blank">this</a> for more information.</li>
</ul>
</div>
<div id="_mcePaste"></div>
<div id="_mcePaste"><strong>Validation:</strong></div>
<div id="_mcePaste">
<ul>
<li>Save Only Validation - disableValidation property - allows you to process data without validation and so firing the validation when it really matters. Resolves&nbsp;<a href="http://www.juliusbuss.de/web/youatnotes/blog-jb.nsf/dx/xpages-am-i-the-only-one-fighting-with-validation-on-every-partial-update.htm?opendocument&amp;comments" target="_blank">XPages: am I the only one fighting with validation on every partial update</a> and&nbsp;<a href="http://www.bleedyellow.com/blogs/dotdomino/entry/xpages_the_good_the_bad_and_the_ugly_x14?lang=en_ie" target="_blank">The Bad: Invalid Invalidation</a>&nbsp;</li>
</ul>
<strong>View Filtering:</strong></div>
<div id="_mcePaste">
<ul>
<li>startKey. Very much like 'keys', startKey allows you to filter the view to start at a certain value. &lt;placeholder&gt;</li>
<li>multi-level category. This is an addition to categoryFilter that allows you to filter a view by the category and then the sub-category.&nbsp;</li>
</ul>
</div>
<div id="_mcePaste"></div>
<div id="_mcePaste"></div>
<div id="_mcePaste"></div>
<div id="_mcePaste"><strong>Views and View Panel:</strong></div>
<div id="_mcePaste">
<ul>
<li>Clickable View Column Header Icons - &lt;placeholder&gt;</li>
<li>NotesXspViewEntry.setSelected() - &lt;placeholder&gt;</li>
</ul>
</div>
<div id="_mcePaste"></div>
<div id="_mcePaste"><strong>XPages in the Notes Client (XPiNC) Integration:</strong></div>
<div id="_mcePaste">
<ul>
<li>Run agents in XPiNC.&nbsp;The following NotesAgent methods are supported: NotesAgent.run, NotesAgent.runWithDocumentContext, and NotesAgent.runOnServer. Security is based on the client ECL settings for the signer of the agent.</li>
<li>New Tab\Window management support.</li>
<li>New Replica option.</li>
<li>Open in Designer option.</li>
<li>XulRunner upgrade to 1.9</li>
<li>window.close() support &nbsp;-' &nbsp;Adds the ability to Close a Window from a Client Side or Server Side JavaScript event&nbsp;'&nbsp;&lt;placeholder&gt;</li>
</ul>
</div>
<div></div>
<div></div>
<div>*** more updates to come - stay tuned. ***</div>]]></content:encoded></rss:item><rss:item rdf:about="http://xpagesblog.com/xpages-blog/2010/7/5/writing-a-managed-bean-to-automate-server-side-functionality.html"><rss:title>Writing a Managed Bean to Automate Server Side Functionality in XPages</rss:title><rss:link>http://xpagesblog.com/xpages-blog/2010/7/5/writing-a-managed-bean-to-automate-server-side-functionality.html</rss:link><dc:creator>Jeremy Hodge</dc:creator><dc:date>2010-07-06T00:46:27Z</dc:date><dc:subject>Development JSF Java Managed Beans XPages best practices</dc:subject><content:encoded><![CDATA[<p>In recent articles I've discussed how to create a client side controller using JavaScript and Dojo to enhance and automate your XPages application UI, but that is really only one-half of the story. The automation and control of the server-side application logic is also a very important piece, and critical to the proper implementation of an MVC design pattern.</p>
<p>With this article I am going to kick off a series of articles discussing how to create managed beans that you can use (and re-use) throughout your XPages application, in very powerful ways. To do this we are going to start to look at the underlying structure of XPages, Java Server Faces (or JSF) and how we can utilize the JSF framework to enhance our applications.</p>
<p>Before we get started, I should mention I am going to only scratch the surface of JSF and its capabilities. For more indepth review, I suggest you read <a href="http://www.amazon.com/gp/product/0072262400/ref=s9_simh_gw_p14_i1?pf_rd_m=ATVPDKIKX0DER&amp;pf_rd_s=center-2&amp;pf_rd_r=10PGAQD364Y9X1YP1010&amp;pf_rd_t=101&amp;pf_rd_p=470938631&amp;pf_rd_i=507846">Java Server Faces: The Complete Reference</a>, originally suggested by <a href="http://blog.mindoo.com/web/blog.nsf">Karsten Lehmann</a>, who wrote an excellent series on XPages and the JSF. While the book is not about XPages, and there is no discussion of XPages in it, it serves as a very strong foundation for understanding the underpinnings of XPages.</p>
<p>Ok, so lets get the basics covered. First, lets talk in general about a "managed bean," or more generically a "bean."&nbsp; If you are not familiar yet with Java, you may heard about beans, but wondered what exactly it is. All a bean is, is a single Java object that has been integrated into your XPages (or JSF) application. Its a simple class that has public and private properties, methods, etc. There is no magic, or special construction to a Bean. It is a simple, basic, plain Java Object. The Java class follows this basic construction:</p>
<blockquote>
<p>package com.ZetaOne.myFirstManagedBeans;</p>
<p>public class HelloWorld {</p>
<p>&nbsp;&nbsp;&nbsp; private String SomeVariable;<br />&nbsp;&nbsp;&nbsp; private String AnotherVariable;</p>
<p>&nbsp;&nbsp;&nbsp; // Class Constructor...<br />&nbsp;&nbsp;&nbsp; public HelloWorld() {</p>
<p>&nbsp;&nbsp;&nbsp; }</p>
<p>&nbsp;&nbsp;&nbsp; // Property getters/setters<br />&nbsp;&nbsp;&nbsp; public String getSomeVariable() {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return SomeVariable;<br />&nbsp;&nbsp;&nbsp; }</p>
<p>&nbsp;&nbsp;&nbsp; public String getAnotherVariable() {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return AnotherVariable;<br />&nbsp;&nbsp;&nbsp; }<br /><br />&nbsp;&nbsp;&nbsp; public void setSomeVariable(String someVariable) {<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SomeVariable = someVariable;<br /> &nbsp;&nbsp;&nbsp; }</p>
<p>&nbsp;&nbsp;&nbsp; public void setAnotherVariable(String anotherVariable) {<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AnotherVariable = anotherVariable;<br /> &nbsp;&nbsp;&nbsp; }<br /> <br /></p>
<p>}</p>
</blockquote>
<p>The full name of this class is com.ZetaOne.myFirstManagedBeans.HelloWorld. This simple class holds two "Properties": SomeVariable, and AnotherVariable. Because the properties are declares as private, they are not publically available to be modified by external objects or functions, but must use the respective getXXX, and setXXX functions to access or change the properties' value.</p>
<p>Later on, when we plug this object into our XPages application as a managed bean, those two variables become available to us to use within our application, just like the properties of other objects we regularly utilize, like fields on a notes document.</p>
<p>For example, given a defined NotesDocument named myDataDoc, if we wanted to access the field myDataField on that document, we could use the expression #{myDataDoc.myDataField} to bind a UI Component to that value. This is called a <em>value binding</em>, and is also available with our managed bean. for example, to access the AnotherVariable property of our managed bean (which for discussion we have given the name myFirstBeanie) we would use the value binding #{myFirstBeanie.anotherVariable}. The proper use of case on the variable is important.&nbsp; When we use that value binding, the JSF will look at the myFirstBeanie object, and will convert "anotherVariable" into a function call to "getAnotherVariable" to see if it exists. [ NOTE: JSF will actually go through a list of other possibilities if getAnotherVariable() doesn't exist, but we'll discuss those later ].</p>
<p>Now, you can see how we can connect the object in the backend to UI elements on the front end. But it doesn't end there.&nbsp; In SSJS, you can also access the object globally, like any other defined element.&nbsp; To get or set a value on the object you can call the getter/setter functions directly, like this:</p>
<blockquote>
<p>var x = "This is some text that I am going to put into another variable";<br />myFirstBeanie.setAnotherVariable(x);</p>
</blockquote>
<p>You can do the same thing with methods and functions, which is called a <em>method binding</em> to connect events in the UI to the backend java class. We'll go over that more in detail later.</p>
<p>If all of this sounds familiar, its because it should be. This is 100% how XPages work. Every XPage you create is actually "compiled" down to Java source code that performs these same actions based on what you have created in in your XPages application. The only difference is that the java object that is created is called a <em>backing bean</em> and there is one controlling backing bean for every XPage you create. A managed bean is just another bean that can be integrated into other backing beans as a reusable object.</p>
<p>Ok, so lets get a little dirty here and actually learn how to integrate this bean into your XPages application. To add a managed bean, you have to switch perspectives in Domino Designer to the Java Perspective. After you do that, you have to create the actual Java source code for your bean. Doing so is easy, first we need to create a folder inside the NSF to hold the source code files. These files need to be within the folder /WebContent/WEB-INF:</p>
<p><span class="full-image-block ssNonEditable"><span><img src="http://xpagesblog.com/storage/webinf.JPG?__SQUARESPACE_CACHEVERSION=1278379728563" alt="" /></span></span></p>
<p>Open Your NSF in the Package Explorer, and right click the WEB-INF folder, and select "New &gt; Folder", and name it src.</p>
<p>After we create our folder, we need to tell domino designer to include the files that we put into it in the build process, so our source code gets compiled and included when DDE compiles our XPages. To do this, right click the new src folder, and select "Build Path &gt; Add To Build Path". If you do not see "Add To Build Path," you can also click "Configure Build Path..." and in the dialog that opens, click the Add Folder... button, find the src folder, and click Add.</p>
<p>Now, let's create our source code. When we added the src folder to the build path, you will see a new entry appear in the outline called "WebContent/WEB-INF/src" towards the top of the items in the application. This is where we want to create our source code.</p>
<p><span class="full-image-block ssNonEditable"><span><img src="http://xpagesblog.com/storage/srcpath.JPG?__SQUARESPACE_CACHEVERSION=1278380111789" alt="" /></span></span></p>
<p>Right click this folder, and select New Package, give the package a name, like your reverse domain, and myFirstBeans, like com.ZetaOne.MyFirstBeans, and click finish. This will add a "package" to your src folder, which is basically just a collection of Java classes.</p>
<p><span class="full-image-block ssNonEditable"><span><img src="http://xpagesblog.com/storage/myfirstbeans.JPG?__SQUARESPACE_CACHEVERSION=1278380261736" alt="" /></span></span></p>
<p>Right Click this package, and select "New &gt; Class", name it HelloWorld, and click Finish. Don't worry about all the other options for now.</p>
<p>Now you should have the start of your bean.&nbsp; Go ahead and copy in the innards from my class above and save your class.</p>
<p>Now, we have to expose this new bean to our XPages application. To do that, we need to edit the faces.config file found in the WEB-INF folder. Scroll back down in your NSF outline until you see the WebContent folder, and expand it so you can see the WEB-INF folder, and expand it. In there, you should see a faces-config.xml file. Double click it to edit.</p>
<p><span class="full-image-block ssNonEditable"><span><img src="http://xpagesblog.com/storage/face.JPG?__SQUARESPACE_CACHEVERSION=1278380581226" alt="" /></span></span></p>
<p>That file should look like this:</p>
<blockquote>
<p>&lt;?xml version="1.0" encoding="UTF-8"?&gt;<br />&lt;faces-config&gt;<br />&nbsp; &lt;!--AUTOGEN-START-BUILDER: Automatically generated by IBM Lotus Domino Designer. Do not modify.--&gt;<br />&nbsp; &lt;!--AUTOGEN-END-BUILDER: End of automatically generated section--&gt;<br />&lt;/faces-config&gt;</p>
</blockquote>
<p>We are going to add lines to this file, outside the &lt;!--AUTOGEN --&gt; block to define our bean.&nbsp; Here's what we are going to add:</p>
<blockquote>
<p>&lt;managed-bean&gt;<br />&nbsp; &nbsp; &lt;managed-bean-name&gt;HelloWorld&lt;/managed-bean-name&gt;<br />&nbsp;&nbsp;&nbsp; &lt;managed-bean-class&gt;com.ZetaOne.MyFirstBeans.HelloWorld&lt;/managed-bean-class&gt;<br />&nbsp; &nbsp; &lt;managed-bean-scope&gt;session&lt;/managed-bean-scope&gt;<br />&lt;/managed-bean&gt;</p>
</blockquote>
<p>The managed-bean-name gives a name to the bean, and defines how we will access it in our XPages application; managed-bean-class is the fully qualified Java class name that we created earler; and managed-bean-scope defines in which scope our bean will be stored. This can be request, session or application, and just like the scope variables requestScope or sessionScope, it determines how long that object will be cached. For now, we'll use session.&nbsp; Your final faces-config.xml should look like this:</p>
<blockquote>
<p>&lt;?xml version="1.0" encoding="UTF-8"?&gt;<br />&lt;faces-config&gt;<br />&nbsp; &lt;!--AUTOGEN-START-BUILDER: Automatically generated by IBM Lotus Domino Designer. Do not modify.--&gt;<br />&nbsp; &lt;!--AUTOGEN-END-BUILDER: End of automatically generated section--&gt;<br />&nbsp; &lt;managed-bean&gt;<br />&nbsp;&nbsp;&nbsp; &lt;managed-bean-name&gt;HelloWorld&lt;/managed-bean-name&gt;<br />&nbsp;&nbsp;&nbsp; &lt;managed-bean-class&gt;com.ZetaOne.MyFirstBeans.HellowWorld&lt;/managed-bean-class&gt;<br />&nbsp;&nbsp;&nbsp; &lt;managed-bean-scope&gt;session&lt;/managed-bean-scope&gt;<br />&nbsp; &lt;/managed-bean&gt;<br />&lt;/faces-config&gt;</p>
</blockquote>
<p>Now we are ready to use our bean in an XPage. Create a new XPage, and put a field and a computed field on the page; the field with a label of "Some" and the computed field with "Another". Value bind the two fields to your HelloWorld bean by using #{HelloWorld.someVariable} (to the field) and #{HelloWorld.anotherVariable} (to the computed field).</p>
<p>Also add a button that does a full refresh, and uses server side JavaScript to set the value of AnotherVariable to "Hello World!".</p>
<p>Your source code should look similar to this:</p>
<blockquote>
<p>&lt;?xml version="1.0" encoding="UTF-8"?&gt;<br />&lt;xp:view xmlns:xp="http://www.ibm.com/xsp/core"&gt;<br /><br />&nbsp;&nbsp; &nbsp;&lt;xp:label value="Some:" id="label1"&gt;&lt;/xp:label&gt;<br />&nbsp;&nbsp; &nbsp;&lt;xp:inputText id="inputText1" value="#{HelloWorld.someVariable}"&gt;&lt;/xp:inputText&gt;<br />&nbsp;&nbsp; &nbsp;&lt;br /&gt;&lt;br /&gt;<br />&nbsp;&nbsp; &nbsp;&lt;xp:label value="Another:" id="label2"&gt;&lt;/xp:label&gt;<br />&nbsp;&nbsp; &nbsp;&lt;xp:text id="text1" value="#{HelloWorld.anotherVariable}"&gt;&lt;/xp:text&gt;<br />&nbsp;&nbsp; &nbsp;&lt;br /&gt;&lt;br /&gt;<br />&nbsp;&nbsp; &nbsp;&lt;xp:button value="Set It and Forget It" id="button1"&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;xp:eventHandler event="onclick" submit="true" refreshMode="complete"&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;xp:this.action&gt;&lt;![CDATA[#{javascript:<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;HelloWorld.setAnotherVariable("Hello World!");<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;}]]&gt;&lt;/xp:this.action&gt;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;/xp:eventHandler&gt;<br />&nbsp;&nbsp; &nbsp;&lt;/xp:button&gt;<br />&nbsp;&nbsp; &nbsp;<br />&lt;/xp:view&gt;</p>
</blockquote>
<p>Now, you can enter text in the field, and click the button, and you should see the page retain the value you entered (its now cached in the HelloWorld object), and you should see the Hello World! appear in the computed field, like this:</p>
<p><span class="full-image-block ssNonEditable"><span><img src="http://xpagesblog.com/storage/ronco.JPG?__SQUARESPACE_CACHEVERSION=1278382553359" alt="" /></span></span></p>
<p>And there you go, your first real-world implementation of a managed bean.&nbsp; The next few articles will expand upon the capability of the managed bean, and show you how you can perform complex functions and transformations on data easily, without getting your controller all mixed up in your view.</p>
<p>Happy Coding!</p>]]></content:encoded></rss:item><rss:item rdf:about="http://xpagesblog.com/xpages-blog/2010/6/28/quick-tip-passing-a-value-from-the-client-to-the-server-usin.html"><rss:title>Quick Tip: Passing a Value from the client to the Server using XSP.PartialRefreshGet</rss:title><rss:link>http://xpagesblog.com/xpages-blog/2010/6/28/quick-tip-passing-a-value-from-the-client-to-the-server-usin.html</rss:link><dc:creator>Jeremy Hodge</dc:creator><dc:date>2010-06-28T16:18:12Z</dc:date><dc:subject>Partial Updates Tips and Tricks XSP</dc:subject><content:encoded><![CDATA[<p>I make extensive use of the XSP object's partialRefreshGet and partialRefreshPost functions to invoke interactions with the Domino XSP server. It's generally accepted that a Get is faster than a Post because there is no data updating to do, no data to collect etc.</p>
<p>But sometimess, I need to send a single transient value up to the server to influence the returning results. You can do this on a get through the combination of a params object in the options object sent to the partialRefreshGet, and then using context.getSubmittedValue() in your Server Side JavaScript.</p>
<p>To do this, you call XSP.partialRefreshGet() just like has been illustrated before, but you add a new object to your options object, called params. You'll want to add a name/value pair to the params object with the name $$xspsubmitvalue, and the value of your choice.</p>
<p>Fully coded, it would look like something like this:</p>
<p>(client side javascript code)</p>
<blockquote>
<p>var refreshId=dojo.query('[id$="serverSideIdYouWantToRefresh"]')[0];<br />var mySubmitValue='whatYouWantToSendHere';</p>
<p>XSP.partialRefreshGet(refreshId, {<br />&nbsp;&nbsp;&nbsp;&nbsp; params: {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '$$xspsubmitvalue': mySubmitValue<br />&nbsp;&nbsp;&nbsp;&nbsp; },<br />&nbsp;&nbsp;&nbsp;&nbsp; onStart: function () {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; alert('starting');<br />&nbsp;&nbsp;&nbsp;&nbsp; },<br />&nbsp;&nbsp;&nbsp;&nbsp; onComplete: function () {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; alert('boo-yah!');<br />&nbsp;&nbsp;&nbsp;&nbsp; },<br />&nbsp;&nbsp;&nbsp;&nbsp; onError: function () {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; alert('aww shucks cletus, it done don't worked');<br />&nbsp;&nbsp;&nbsp;&nbsp; }<br />});</p>
</blockquote>
<p>&nbsp;</p>
<p>Then, in your SSJS, you can retrieve your value, like this:</p>
<blockquote>
<p>var mySubmittedVal = context.getSubmittedValue();</p>
</blockquote>
<p>&nbsp;</p>
<p>Happy Coding!</p>]]></content:encoded></rss:item><rss:item rdf:about="http://xpagesblog.com/xpages-blog/2010/6/24/calling-timeout-on-large-file-uploads-in-xpages.html"><rss:title>Calling Timeout on Large File Uploads in XPages</rss:title><rss:link>http://xpagesblog.com/xpages-blog/2010/6/24/calling-timeout-on-large-file-uploads-in-xpages.html</rss:link><dc:creator>Paul Hannan</dc:creator><dc:date>2010-06-24T11:50:20Z</dc:date><dc:subject></dc:subject><content:encoded><![CDATA[<p>This is two XPages tips rolled into one prompted by my colleagues Maire Kehoe and Niklas Heidloff.</p>
<p><br />So the question was how do I upload files larger than 1mb via XPages and how do I increase the timeout limit to allow for slow network speeds when I'm uploading these big files?</p>
<p>So the first part, how do I increase the file upload limit?&nbsp;I posted <a href="http://www.bleedyellow.com/blogs/XPagesStuff/entry/re_xpages_exceeding_max_file_upload_size_can_it_be_prevented?lang=en">this</a>&nbsp;a while back explaining how this can be done. There's two parts that need to be done to get this to work.&nbsp;First, you set the size you want of the option '<strong>xsp.upload.maximumsize</strong>' in the xsp.properties file (at app or server level). The default being 1024Kb, e.g. xsp.upload.maximumsize=1024.</p>
<p>The second is done on the server document where you got to set a higher level on the HTTP stack. Go to Internet Protocols\Domino Web Engine and set what you need on 'POST Data' in 'Maximise POST data'. The default here is 10Mb.</p>
<p><span class="full-image-block ssNonEditable"><span><img src="http://xpagesblog.com/storage/MaximumPostData.jpg?__SQUARESPACE_CACHEVERSION=1277380852658" alt="" /></span></span></p>
<p>So that's your limit done.</p>
<p>&nbsp;</p>
<p>Now to increase timeout so when I'm uploading those large file it doesn't fallover.&nbsp;The timeout default is 20 seconds in this case, but you may get some cases where it will take longer to upload an attachment. The current way to do this is by using XSP.submitLatency</p>
<blockquote>
<p>&nbsp;</p>
<div id="_mcePaste"><span> </span>&lt;xp:scriptBlock id="scriptBlock1"&gt;</div>
<div id="_mcePaste"><span> </span>&lt;xp:this.value&gt;&lt;![CDATA[XSP.addOnLoad(function(){</div>
<div id="_mcePaste"><span> </span>// change submitLatency to 2 seconds (defaults to 6 seconds):</div>
<div id="_mcePaste"><span> </span>XSP.submitLatency = 5 * 1000;&nbsp;</div>
<div id="_mcePaste"><span> </span>alert(XSP.submitLatency);</div>
<div id="_mcePaste">});]]&gt;&lt;/xp:this.value&gt;</div>
<div id="_mcePaste"><span> </span>&lt;/xp:scriptBlock&gt;</div>
</blockquote>
<p>&nbsp;</p>
<p><span> </span>In 852* a new option has been added to the xsp.properties which will do the same - <strong>xsp.partial.update.timeout</strong></p>
<p><strong>&nbsp;</strong><br /># #######################################<br /># PARTIAL UPDATE TIMEOUT<br /># #######################################<br /># There allows a use to configure the partial update timeout in Designer# The default is 20 seconds #xsp.partial.update.timeout=20</p>
<p><br />Or you can set the option for just this XPage:</p>
<blockquote>
<p>&lt;?xml version="1.0" encoding="UTF-8"?&gt; <br /> &lt;xp:view xmlns:xp="http://www.ibm.com/xsp/core"&gt;<span> </span>&lt;xp:this.properties&gt;<span> </span>&lt;xp:parameter name="xsp.partial.update.timeout" value="3"&gt;&lt;/xp:parameter&gt;<span> </span>&lt;/xp:this.properties&gt;<span> </span>&lt;/xp:view&gt;</p>
</blockquote>
<p>&nbsp;</p>
<p>The option is in seconds (the submitLatency is in milliseconds).</p>
<p>&nbsp;Hope this helps.</p>
<p>p.</p>
<p>&nbsp;</p>
<p>* IBM Lotus Notes Domino 8.5.2 is still pre-release software so there is no&nbsp;guarantee&nbsp;that this feature will be in the finished product.</p>]]></content:encoded></rss:item><rss:item rdf:about="http://xpagesblog.com/xpages-blog/2010/6/23/session-review-a-deep-dive-on-building-notesdomino-applicati.html"><rss:title>Session Review: A Deep Dive on building Notes/Domino Applications with XPages</rss:title><rss:link>http://xpagesblog.com/xpages-blog/2010/6/23/session-review-a-deep-dive-on-building-notesdomino-applicati.html</rss:link><dc:creator>Peter Presnell</dc:creator><dc:date>2010-06-23T19:07:57Z</dc:date><dc:subject></dc:subject><content:encoded><![CDATA[<p>Since the release of Lotus XPages we have seen a number of significant contributions from IBM and the Notes community to assist developers learn how to harness the power of this new technology.&nbsp; It all started with <a href="http://www.qtzar.com/blogs/qtzar.nsf">Declan Lynch</a>'s <a href="http://www.qtzar.com/blogs/qtzar.nsf/htdocs/LearningXPages.htm">54 Part series</a>.&nbsp; Since then we have seen many great bloggers such as<a href="http://www.juliusbuss.de/"> Julian Buss</a>, <a href="http://www.jmackey.net/">John Mackey</a>, <a href="http://www.timtripcony.com/">Tim Tripcony</a>,<a href="http://dontpanic82.blogspot.com/"> Tommy Valand</a>, <a href="http://www.wissel.net/">Stefan Wissel</a>, <a href="http://hermes.intec.co.uk/intec/blog.nsf">Paul Withers</a>, and many others contribute great technical content for XPages.&nbsp; We now also have some great XPage applications available on <a href="http://www.openntf.org">OpenNTF</a> to download and dissect.&nbsp; At Lotusphere 2010 there were some excellent technical presentations on XPages, the best perhaps being the BOF session attended by the entire XPage development team.&nbsp; Last week, another great asset was added to the Lotus XPage technical collection, A Webcast&nbsp; from IBM - <a href="http://event.on24.com/eventRegistration/EventLobbyServlet?target=lobby.jsp&amp;eventid=212403&amp;sessionid=1&amp;key=04F5F1A8E84708E855B4354ECF92FB32&amp;eventuserid=37547087">A Deep Dive on building Notes/Domino Applications with XPages</a>.&nbsp; If there are any XPage developers out there who have not yet had a chance to view this Webcast, I would highly recommend it.&nbsp; It is a 2 hour video so I thought it might help to provide a synopsis of what is covered by that presentation to assist both you and your favorite search engine match the specific aspects of XPages covered.<br /><br />This presentation does exactly what its title suggests.&nbsp; It is perhaps best viewed by people who have already started doing some XPage development, but certainly doesn't require that you already be an expert in XPages.&nbsp; The session includes a high level overview of the XPages architecture along with a roadmap for XPages since its inception with 8.5.0.&nbsp; This includes new features being added with 8.5.2 along with features we are likely to see in 8.5.3 and 9.0.&nbsp; The bulk of the session is a show and tell given by two of IBM's leading XPage developers&nbsp; Martin Donelly, and Tony McGukin.<br /><br />Martin's session focuses on some of the capabilities built into the View data source.&nbsp; And while the examples given focus on the View control, they also can be applied to the Repeat control and the Data Table control.&nbsp; Most of the functionality being shown has been available since 8.5.0 but its potential has probably not been well documented.&nbsp; I certainly learnt a lot.&nbsp; The parameters covered include:-</p>
<ol>
<li><strong>expandLevel</strong> - Allows control over the number of levels to be automatically expnded when displaying a view</li>
<li><strong>parentID</strong> - Allows the collection to be restricted to just those documents with be specific parent document</li>
<li><strong>search</strong> - A search to be performed against the view collection</li>
<li><strong>keys</strong> - A view filter based upon the keys for one or more sorted columns</li>
<li><strong>requestParamPrefix</strong> - Allows parameters to be passing via a URL when more than one View datasource is contained on an Xpage.</li>
<li><strong>databaseName</strong> - On how setting this value to blank can be used to refer to the current database.</li>
<li>Using JavaScript to define column values</li>
<li><strong>categoryFilter</strong> - This was supposed to work in 8.5.0 with multiple categorized columns.&nbsp; It finally does work as designed in 8.5.2</li>
<li><strong>alwaysCalculateLast</strong> - a new parameter being added with 8.5.2 that will control the ability to jump to the last page of a view.</li>
</ol>
<p><br />Tony's session provided an introduction to a number of ways in which the power of XPages can be extended using companion technologies.&nbsp; This includes:-</p>
<ol>
<li>dojo&nbsp; - Adding dojo capabilities to XPage controls via <strong>dojoType</strong> and <strong>dojoAttribute</strong>s.</li>
<li>Simple invocatiion of <strong>AJAX</strong> via Partial Update</li>
<li>Interfacing with Java/JSF with an example of using <strong>Managed Beans</strong> to add state to your application.</li>
<li><strong>themeId</strong> - Linking controls to a theme file and the opportunities this provides to theme both the look/feel and the behaviour of an application.</li>
</ol>
<p><br />The level of details provided by this Webcast is typically only available when attending LotusSphere or major LUG events so it is great to see this quality of technical presentation given by IBM via a WebCast.</p>]]></content:encoded></rss:item><rss:item rdf:about="http://xpagesblog.com/xpages-blog/2010/6/21/tutorial-introduction-to-xpages.html"><rss:title>Tutorial: Introduction to XPages</rss:title><rss:link>http://xpagesblog.com/xpages-blog/2010/6/21/tutorial-introduction-to-xpages.html</rss:link><dc:creator>Bruce Elgort</dc:creator><dc:date>2010-06-21T20:36:50Z</dc:date><dc:subject>Tutorial education introduction</dc:subject><content:encoded><![CDATA[<p>Joyce Davis of IBM Lotus LTIE fame reminded me about a wiki article on developerWorks that contains 26 exercises that can help get you started with XPages development.</p>
<p>From the abstract:&nbsp;</p>
<blockquote>
<p>These workshop exercises are designed as an introduction to Lotus Domino's xPages functionality. To give you a complete learning experience, you will build a demo application in the course of completing the exercises. The result of a previous exercise will be needed as input for following exercises.&nbsp;</p>
<p>Some of the exercises do not directly contribute to the sample application, since they are designed to highlight and explore functionality and capabilities of xPages not needed in the sample application in all variations. These exercises are typically followed by an exercise that implements a subset of the function in the sample application.&nbsp;<br /><br />Note: To be able to complete the exercises you will need to consult the documentation for Lotus Domino development since information given in the documentation is not duplicated in the exercises.&nbsp;</p>
</blockquote>
<p>&nbsp;Check out the entire wiki article at <a href="http://www-10.lotus.com/ldd/ddwiki.nsf/dx/Tutorial-intro-to-XPages.htm">http://www-10.lotus.com/ldd/ddwiki.nsf/dx/Tutorial-intro-to-XPages.htm</a></p>]]></content:encoded></rss:item><rss:item rdf:about="http://xpagesblog.com/xpages-blog/2010/6/20/resizing-an-xpage-control-with-dhtml.html"><rss:title>Resizing an XPage Control with DHTML</rss:title><rss:link>http://xpagesblog.com/xpages-blog/2010/6/20/resizing-an-xpage-control-with-dhtml.html</rss:link><dc:creator>Peter Presnell</dc:creator><dc:date>2010-06-20T16:09:13Z</dc:date><dc:subject></dc:subject><content:encoded><![CDATA[<p>From time to time there is a need to design an XPage in which one section needs to fill the remaining screen real estate. Setting width to 100% and height to 100% does not always produce the desired result, especially across multiple browsers.&nbsp; One solution to this need is to use DHTML to calculate the available height/width and assign the height/width to the appropriate components of the HTML.&nbsp; Because browsers can be resized we need to perform this calculation when the page is first loaded as well as each time the page is resized. The following is an example of how I solved this need for one of my own XPage applications.</p>
<ol>
<li>I use the #{id:<em>XPageControlID</em>}' statement to resolve the HTML name of the ID that is being rendered on my browser.</li>
<li>An inline statement such as document.getElementById('#{id:<em>XPageContrilID</em>}').style.height = document.body.clientHeight - <em>offset</em> + "px"; has the desired effect of setting the ids height via DHTML</li>
<li>I can use the dojo function dojo.connect to add an event listener for the client side onresize event and pass an anonymous function that contains the code to resize one or more XPage controls.</li>
</ol>
<p><strong>Example</strong></p>
<p>The following example also demonstrates the new <strong>onClientLoad</strong> event that is available in the current 8.5.2 beta to inject the JavaScript code and execute it when the XPage is loaded.&nbsp; Being a beta release IBM may decide to remove this feature before the final release..</p>
<blockquote>
<p>&lt;xp:eventHandler event="onClientLoad" submit="false"&gt;<br />&nbsp;&nbsp;&nbsp; &lt;xp:this.script&gt;&lt;![CDATA[document.getElementById('#{id:pagePanel}').style.height = document.body.clientHeight -72 + "px";<br />document.getElementById('#{id:pagePanel}').style.width = document.body.clientWidth -250 + "px";<br />document.getElementById('#{id:Content}').style.width = document.body.clientWidth -250 + "px";<br />document.getElementById('#{id:ContentPanel}').style.width = document.body.clientWidth -250 + "px";<br />document.getElementById('#{id:Page}').style.height = document.body.clientHeight -72 + "px";<br />document.getElementById('#{id:Main}').style.height = document.body.clientHeight -72 + "px";<br />dojo.connect(window,"onresize",function(evt)<br />{<br />&nbsp;&nbsp; &nbsp;document.getElementById('#{id:pagePanel}').style.height = document.body.clientHeight -72 + "px";<br />&nbsp;&nbsp; &nbsp;document.getElementById('#{id:pagePanel}').style.width = document.body.clientWidth -250 + "px";<br />&nbsp;&nbsp; &nbsp;document.getElementById('#{id:Content}').style.width = document.body.clientWidth -250 + "px";<br />&nbsp;&nbsp; &nbsp;document.getElementById('#{id:ContentPanel}').style.width = document.body.clientWidth -250 + "px";<br />&nbsp;&nbsp; &nbsp;document.getElementById('#{id:Page}').style.height = document.body.clientHeight -72 + "px";<br />&nbsp;&nbsp; &nbsp;document.getElementById('#{id:Main}').style.height = document.body.clientHeight -72 + "px";<br />});]]&gt;</p>
<p>&nbsp; &lt;/xp:this.script&gt;<br />&lt;/xp:eventHandler&gt;</p>
</blockquote>
<p>Note: Thre is probably an OOP approach to this need that lifts all the JavaScript code off the XPage and places it a JavaScript library where it belongs, but I ams till working on that.</p>]]></content:encoded></rss:item><rss:item rdf:about="http://xpagesblog.com/xpages-blog/2010/6/16/quick-dojoquery-tip-for-cross-browser-compatibility.html"><rss:title>Quick dojo.query tip for Cross Browser compatibility.</rss:title><rss:link>http://xpagesblog.com/xpages-blog/2010/6/16/quick-dojoquery-tip-for-cross-browser-compatibility.html</rss:link><dc:creator>Jeremy Hodge</dc:creator><dc:date>2010-06-16T22:16:03Z</dc:date><dc:subject></dc:subject><content:encoded><![CDATA[<p>One big client side plus to dojo in XPages is the dojo.query function that can find an HTML element using CSS selectors.&nbsp; For example to find a div tag with an ID attribute equal to "findMePlease", you can use the following code:</p>
<blockquote>
<p>var myDiv = dojo.query('div[id="findMePlease"]')[0];</p>
</blockquote>
<p>And you will get back the node you were looking for.</p>
<p>Where dojo.query really shines is with XPages. For example, when you created an xp:div in the XPages designer with an ID of 'findMePlease' .. the actual client side id is something like view:_id01:01:findMePlease.&nbsp; Server side you can get the client side id with #{id:findMePlease} or #{javascript:getClientId('findMePlease')} ... but what if you are writing a client side script, and don't have access to anything that tells you want the generated ID is. Well, you use dojo.query with the CSS $= selector that selects elements that "end with" the query.</p>
<p>For example to select that same node client side, you can use:</p>
<blockquote>
<p>dojo.query('div[id$="findMePlease"]')[0]</p>
</blockquote>
<p>and you'll get the first (because of the [0] at the end) div whose id ends in "findMePlease".</p>
<p>Here's the tip:</p>
<p>If you need to access a FIELD such as an input or a hiddenInput ... don't use ID, use the NAME attribute.&nbsp; IE 7/8 and Firefox 3.0.x have a problems locating fields using the ID attribute for some reason.</p>
<p>So intead of</p>
<blockquote>
<p>dojo.query('input[id$="myField"]')[0]</p>
</blockquote>
<p>use</p>
<blockquote>
<p>dojo.query('input[name$="myField"]')[0]</p>
</blockquote>
<p>and You'll get better cross browser compatibility.</p>
<p>&nbsp;</p>
<p>Happy Coding!</p>
<p>&nbsp;</p>]]></content:encoded></rss:item><rss:item rdf:about="http://xpagesblog.com/xpages-blog/2010/6/16/single-copy-xpage-design-another-piece-of-xpages-magic.html"><rss:title>Single Copy XPage Design, another piece of XPages magic!</rss:title><rss:link>http://xpagesblog.com/xpages-blog/2010/6/16/single-copy-xpage-design-another-piece-of-xpages-magic.html</rss:link><dc:creator>Paul Hannan</dc:creator><dc:date>2010-06-16T14:18:54Z</dc:date><dc:subject></dc:subject><content:encoded><![CDATA[<p>More detail posted to the <a href="http://www-10.lotus.com/ldd/ddwiki.nsf/dx/Single_Copy_XPage_Design">wiki</a>.</p>
<p>Here's another piece of XPages magic coming your way in 852* and it's called Single Copy XPage Design (SCXD). Doesn't sound too exciting does it? But it's cool, real cool.</p>
<div></div>
<div id="_mcePaste"></div>
<div id="_mcePaste">So what is it? Single Copy XPage Design is a new feature in 852 that allows for XPage resources to be shared. XPages design elements (XPages, Custom Controls, CSS, client/server JS libraries, themes) are stored in one database and then other databases can point to this common "SCXD" database through a new database property available in Designer (in the Performance section on the XPages tab in the Application Properties). At runtime, XPages will read this information and, if it is not empty, will then use the design elements from the "SCXD" database instead of the current database. So effectively you have UI in one database and data in another.</div>
<div></div>
<div><span class="full-image-block ssNonEditable"><img src="http://xpagesblog.com/storage/scxd01.jpg?__SQUARESPACE_CACHEVERSION=1276698248419" alt="" /></span></div>
<div></div>
<div id="_mcePaste"></div>
<div id="_mcePaste">So what are the benefits of this new feature? Being placed under the Performance section in the Application Properties should be a give it away. The benefits are felt at runtime where the browser caching becomes more efficient as the same resources can be served for many separate applications. Rather than having same resources being served from each application which isn't optimal from a browser point of view.</div>
<div id="_mcePaste">Another benefit is that you can use this feature to your advantage by cutting down on design and admin time required to maintain the same UI across databases.</div>
<div></div>
<div></div>
<div id="_mcePaste"></div>
<div id="_mcePaste">So let's have an example. Say you've upgraded your Domino server to 852 and on this server you've got some legacy, pre-8.5, applications which you're thinking about upgrading as well as take advantage of this new XPages technology.</div>
<div>Let's take an old application is from an old Discussion template.</div>
<div></div>
<div id="_mcePaste"></div>
<div><span class="full-image-block ssNonEditable"><img src="http://xpagesblog.com/storage/scxd02.jpg?__SQUARESPACE_CACHEVERSION=1276698449226" alt="" /></span></div>
<div></div>
<div id="_mcePaste"></div>
<div>And you've also got newer discussion app based upon the 852 template (this is it set to the green theme from oneuiv2).</div>
<div id="_mcePaste"></div>
<div><span class="full-image-block ssNonEditable"><img src="http://xpagesblog.com/storage/scxd03.jpg?__SQUARESPACE_CACHEVERSION=1276698592919" alt="" /></span></div>
<div></div>
<div></div>
<div id="_mcePaste"></div>
<div>So in the old app we're going to open the Application Properties in Designer and set the SCXD path to the newer discussion application to use it's XPages design elements.</div>
<div></div>
<div><span class="full-image-block ssNonEditable"><img src="http://xpagesblog.com/storage/scxd04.jpg?__SQUARESPACE_CACHEVERSION=1276698638486" alt="" /></span></div>
<div></div>
<div>Both of these applications would have the same forms and views (the newer discussion template has new forms and views which need to be copied over to the pre-85 discussion application to get this scenario to work).</div>
<div></div>
<div>Now hit the old pre-85 app in the browser - http://yourDomino/oldDisc7App.nsf/allDocuments.xsp</div>
<div></div>
<div></div>
<div id="_mcePaste"></div>
<div><span class="full-image-block ssNonEditable"><img src="http://xpagesblog.com/storage/scxd05.jpg?__SQUARESPACE_CACHEVERSION=1276698716594" alt="" /></span></div>
<div></div>
<div></div>
<div>So there it is, a Domino app without XPages using XPages! :D</div>
<div></div>
<div>MAGIC!?</div>
<div></div>
<div></div>
<div></div>
<div id="_mcePaste"></div>
<div id="_mcePaste"></div>
<div></div>
<div id="_mcePaste"></div>
<div id="_mcePaste"></div>
<div><em style="font-size: 80%;"><span style="font-size: 80%;"><strong>Some limitations to this feature:</strong></span></em></div>
<div id="_mcePaste">
<ul>
<li><em style="font-size: 80%;"><span style="font-size: 80%;"><strong>A dummy or blank XPage with the same name of the default XPage from the SCXD database is needed to allow it to launch app in the default XPage.</strong></span></em></li>
<li><em style="font-size: 80%;"><span style="font-size: 80%;"><strong>The SCXD database has to be a NSF, not an NTF.</strong></span></em></li>
<li><em style="font-size: 80%;"><span style="font-size: 80%;"><strong>Common 'classic' design elements (Views, Form, Agents...) are needed in both NSFs. Only the XPages design elements can be shared</strong></span></em></li>
<li><em style="font-size: 80%;"><span style="font-size: 80%;"><strong>The XPages design elements cannot currently be overridden on a per instance basis.</strong></span></em></li>
<li><em style="font-size: 80%;"><span style="font-size: 80%;"><strong>The HTTP task needs to be restarted when the SCXD is set.</strong></span></em></li>
</ul>
</div>
<div></div>
<div>* Disclaimer: this is pre-release software so there is no guarantee that this will be part of the final release.</div>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>]]></content:encoded></rss:item></rdf:RDF>