[Valid RSS] This is a valid RSS feed.


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


  1. <?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
  2. xmlns:content=""
  3. xmlns:wfw=""
  4. xmlns:dc=""
  5. xmlns:atom=""
  6. xmlns:sy=""
  7. xmlns:slash=""
  8. >
  10. <channel>
  11. <title>Software Development &#8211; Cameron Gregor</title>
  12. <atom:link href="" rel="self" type="application/rss+xml" />
  13. <link></link>
  14. <description>Sharing Tips, Tools and Techniques for XPages Developers</description>
  15. <lastBuildDate>Wed, 13 Dec 2017 22:50:49 +0000</lastBuildDate>
  16. <language>en-AU</language>
  17. <sy:updatePeriod>hourly</sy:updatePeriod>
  18. <sy:updateFrequency>1</sy:updateFrequency>
  19. <generator></generator>
  20. <item>
  21. <title>Minor enhancements to the XPages Table Control</title>
  22. <link></link>
  23. <comments></comments>
  24. <pubDate>Wed, 13 Dec 2017 10:44:04 +0000</pubDate>
  25. <dc:creator><![CDATA[camerongregor]]></dc:creator>
  26. <category><![CDATA[Software Development]]></category>
  27. <category><![CDATA[control]]></category>
  28. <category><![CDATA[extlibx]]></category>
  29. <category><![CDATA[xpages]]></category>
  31. <guid isPermaLink="false"></guid>
  32. <description><![CDATA[As mentioned in my previous post, I have started up a fork of the ExtLibX project and have started contributing to it instead of my previous GregorbyteXspLibrary. Last week I shared the JDBC Configuration&#46;&#46;&#46;]]></description>
  33. <content:encoded><![CDATA[<p>As mentioned in <a href="" target="_blank" rel="noopener">my previous post</a>, I have started up a fork of the ExtLibX project and have started contributing to it instead of my previous GregorbyteXspLibrary. Last week I shared the <a href="" target="_blank" rel="noopener">JDBC Configuration Provider</a> which uses Notes Documents to store the configuration info,  within this release was another small contribution with 2 minor enhancements for the XPages  <strong>table</strong> control.</p>
  34. <p>The core XPages table control does not provide support for <em>thead</em>, <em>tbody</em>, and <em>tfoot</em> elements. Also there isn&#8217;t an option for a <em>th</em> control.</p>
  35. <p>There are some easy workarounds for this such as just <a href="" target="_blank" rel="noopener">using passthrough html</a> as Chris Toohey demonstrated on his blog.</p>
  36. <p>This passthru technique works fine but I just thought I would share my approach, which was to add support for these elements by creating an extra <strong>th</strong> control, and also extending the table renderer to support use of thead, tfoot and tbody.</p>
  37. <p>It isn&#8217;t that exciting but I just thought it was a good example of being able to extend core controls, and add your own desired functionality to them, or modifying existing functionality.</p>
  38. <p>If you would like to try these modifications out, then <a href="" target="_blank" rel="noopener">download the latest release</a> from my camac/ExtLibX project and install to both domino designer and your target domino server.</p>
  39. <p>If you don&#8217;t want to install plugins, you should also be able to take the table renderer and th component source code from within <a href="" target="_blank" rel="noopener">this commit</a> and install it to the java, faces-config and xsp-config files in your nsf</p>
  40. <h2>Using the Table Header Cell control</h2>
  41. <p>To use a th Cell, simply use the Table Header Cell control. It is exactly like a normal <code>&lt;xp:td&gt;</code> control, except it will render as <em>th</em> instead of <em>td</em></p><pre class="crayon-plain-tag">&lt;xp:tr&gt;
  42.    &lt;!-- Using the th control --&gt;
  43.    &lt;xe:th&gt;Last Name&lt;/xe:th&gt;
  44.    &lt;xe:th&gt;First Name&lt;/xe:th&gt;
  45. &lt;/xp:tr&gt;</pre><p></p>
  46. <h2>Using Table Header, Footer and Body sections</h2>
  47. <p>Support for &lt;thead&gt;, &lt;tfoot&gt; and &lt;tbody&gt; elements is provided by an extended version of the Table Renderer, this renderer&#8217;s rendererType is: <strong></strong>.</p>
  48. <p>You have 2 choices on how to enable the table renderer</p>
  49. <ul>
  50. <li>Make the renderer default for all tables in the application</li>
  51. <li>Enable the renderer only for specific tables</li>
  52. </ul>
  53. <h3>Setting Table Renderer for All Tables</h3>
  54. <p>You can set the renderer Type for all Tables in your application by including the following in your theme configuration file:</p><pre class="crayon-plain-tag">&lt;control&gt;
  55.    &lt;name&gt;HtmlTable&lt;/name&gt;
  56.    &lt;property&gt;
  57.        &lt;name&gt;rendererType&lt;/name&gt;
  58.        &lt;value&gt;;/value&gt;
  59.    &lt;/property&gt;
  60. &lt;/control&gt;</pre><p></p>
  61. <h3>Setting RendererType for a specific table</h3>
  62. <p>To enable the renderer for specific tables, just set the rendererType to <strong></strong></p><pre class="crayon-plain-tag">&lt;xp:table rendererType=""&gt;</pre><p></p>
  63. <h3>How to specify thead, tfoot and tbody</h3>
  64. <p>The thead and tfoot elements can be used by providing a facet named thead or tfoot<br />
  65. The tbody element will be rendered by default and contain all the child elements of the table</p><pre class="crayon-plain-tag">&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  66. &lt;xp:view xmlns:xp="" xmlns:xe=""&gt;
  68.    &lt;xp:table rendererType=""&gt;
  69. &lt;!-- thead and tfoot are specified using facets --&gt;
  70. &lt;xp:this.facets&gt;
  71.    &lt;xp:tr xp:key="thead"&gt;
  72.    &lt;xe:th&gt;Header 1&lt;/xe:th&gt;
  73.    &lt;xe:th&gt;Header 2&lt;/xe:th&gt;
  74.    &lt;/xp:tr&gt;
  75.    &lt;xp:tr xp:key="tfoot"&gt;
  76.    &lt;xp:td&gt;Footer 1&lt;/xp:td&gt;
  77.    &lt;xp:td&gt;Footer 2&lt;/xp:td&gt;
  78.    &lt;/xp:tr&gt;
  80. &lt;/xp:this.facets&gt;
  81. &lt;!-- all the child controls will be automatically renderer within a tbody element --&gt;
  82. &lt;xp:tr&gt;
  83.    &lt;xp:td&gt;R1C1&lt;/xp:td&gt;
  84.    &lt;xp:td&gt;R1C2&lt;/xp:td&gt;
  85. &lt;/xp:tr&gt;
  86. &lt;xp:tr&gt;
  87.    &lt;xp:td&gt;R2C1&lt;/xp:td&gt;
  88.        &lt;xp:td&gt;R2C2&lt;/xp:td&gt;
  89.    &lt;/xp:tr&gt;
  90.    &lt;/xp:table&gt;
  92. &lt;/xp:view&gt;</pre><p></p>
  93. <h3>Multiple rows within thead / tfoot</h3>
  94. <p>Chris Toohey makes a good point in the comments, sometimes you want more than one row in the header or footer. You can achieve this by using a panel as the root component instead of the tr.  You can then put multiple tr&#8217;s within that panel.</p>
  95. <p>The panel&#8217;s &lt;div&gt; tags won&#8217;t be rendered unless it has an id.  If it has an id and you don&#8217;t want the tags rendered you can also use <code>disableOutputTag="false"</code>.</p><pre class="crayon-plain-tag">&lt;xp:table&gt;
  96. &lt;xp:this.facets&gt;
  97. &lt;!-- Multiple rows within tfoot / thead --&gt;
  98. &lt;xp:panel xp:key="tfoot"&gt;
  100. &lt;xp:tr&gt;
  101. &lt;xp:td&gt;&lt;/xp:td&gt;
  102. &lt;xp:td&gt;&lt;/xp:td&gt;
  103. &lt;/xp:tr&gt;
  104. &lt;xp:tr&gt;
  105. &lt;xp:td&gt;&lt;/xp:td&gt;
  106. &lt;xp:td&gt;&lt;/xp:td&gt;
  107. &lt;/xp:tr&gt;
  109. &lt;/xp:panel&gt;
  110. &lt;/xp:this.facets&gt;
  112. &lt;/xp:table&gt;</pre><p>&nbsp;</p>
  113. <p>Let me know what you think. I know this one wasn&#8217;t very exciting but I should have some better controls coming out soon! I just did this one because it was quick and easy.</p>
  114. ]]></content:encoded>
  115. <wfw:commentRss></wfw:commentRss>
  116. <slash:comments>2</slash:comments>
  117. </item>
  118. <item>
  119. <title>XPages JDBC Configuration via NotesDocuments</title>
  120. <link></link>
  121. <comments></comments>
  122. <pubDate>Tue, 05 Dec 2017 11:34:46 +0000</pubDate>
  123. <dc:creator><![CDATA[camerongregor]]></dc:creator>
  124. <category><![CDATA[Software Development]]></category>
  125. <category><![CDATA[extlibx]]></category>
  126. <category><![CDATA[jdbc]]></category>
  127. <category><![CDATA[xpages]]></category>
  129. <guid isPermaLink="false"></guid>
  130. <description><![CDATA[If you have used the Extension Library&#8217;s Relational controls, then you are probably familiar with the process of configuring your JDBC Connection details. You have the option of setting up a &#8216;named&#8217; connection so&#46;&#46;&#46;]]></description>
  131. <content:encoded><![CDATA[<p>If you have used the Extension Library&#8217;s Relational controls, then you are probably familiar with the process of configuring your JDBC Connection details.</p>
  132. <p>You have the option of setting up a &#8216;named&#8217; connection so you can reference a database connection by name. This involves creating an xml file <strong>&lt;yourconnection&gt;.jdbc</strong> in the <strong>WebContent\WEB-INF\jdbc\ </strong>directory. This xml file specifies the driver, url, username, password, and perhaps some information about connection pooling.</p>
  133. <p>Alternatively your can just build your own connection url and use this directly in your Java code or XPages controls.</p>
  134. <p>Named connections are a much nicer way to go, and they allow for connection pooling, however the method of using the xml file within the WEB-INF\jdbc directory is a little annoying.</p>
  135. <p>This is not a very accessible or flexible way to manage your connection information. Often your local development SQL Database will have different username / password / url etc. So you often end up changing the config files back and forth everytime you want to develop and deploy.</p>
  136. <p>So I decided to come up with a way to store JDBC Connection information somewhere else, and it seemed logical to store it in NotesDocuments. This way the JDBC connections are configurable at run-time and do not require a change to a design.</p>
  137. <p>Additionally, these JDBC configuration documents can be protected from read-access so that only admins and database signer&#8217;s can access them. The session as signer should be able to access them with elevated rights.</p>
  138. <p><strong>Short Demonstration Video</strong></p>
  139. <p>If you  would like to see the JDBC Provider in action please have a look at this video</p>
  140. <div class="video-container"><iframe width="500" height="281" src=";wmode=opaque" frameborder="0" gesture="media" allow="encrypted-media" allowfullscreen></iframe></div>
  141. <h3></h3>
  142. <h3>How can I use this JDBCNotesDocumentProvider system?</h3>
  143. <p>Download the <a href="" target="_blank" rel="noopener">Alpha Release</a> in my fork of the ExtLibX project and have a look at the documentation in the PDF in the release. You can also have a look in the demo video above.</p>
  144. <p>As mentioned in my previous post, <a href="" target="_blank" rel="noopener">I have decided to release all my future contributions through the ExtLibX project</a>.</p>
  145. <p>If this solution is working for you then you should be fine to use it in production but I am just calling it a alpha release because I am looking to get some feedback before making a final &#8216;release&#8217;.</p>
  146. <h3>How does the JDBCNotesDocumentProvider work?</h3>
  147. <p>I basically copied the way the Extension Library initializes it&#8217;s JDBC Information from the xml files in the WEB-INF/jdbc folder, and modified it to instead look in NotesDocuments! Sounds simple but there was a little bit of fiddling around.</p>
  148. <p>Basically:</p>
  149. <ul>
  150. <li>Someone Access the XPages application</li>
  151. <li>The JDBC Configuration Initialization is triggered
  152. <ul>
  153. <li>If it is set to use &#8216;local&#8217; configuration it will search the current database for JDBCConnection info</li>
  154. <li>If it is set to use &#8216;global&#8217; configuration it will search the central configuration database for JDBCConnection info</li>
  155. </ul>
  156. </li>
  157. </ul>
  158. <p>Actually in my original solution, I was using an &#8216;ApplicationInitializer&#8217; however this runs <em>before </em>you have access to sessionAsSigner, so this was a bit of a problem. I had trouble getting a full-access session but managed to do it with some trickery, however I don&#8217;t think this &#8216;trickery&#8217; is suitable to be shared, so I came up with an alternative.</p>
  159. <p>I moved the initialization code to a PhaseListener, and set it up so the initialization will only run if it hasn&#8217;t been successfully done yet. I still don&#8217;t like this so much but it works.</p>
  160. <h3>Feedback / Comments</h3>
  161. <p>Would love to hear if this is something you think you would use. If you have any suggestions / improvements please let me know!</p>
  162. <p>&nbsp;</p>
  163. ]]></content:encoded>
  164. <wfw:commentRss></wfw:commentRss>
  165. <slash:comments>0</slash:comments>
  166. </item>
  167. <item>
  168. <title>My New Approach for Sharing XPages Controls and Extensions</title>
  169. <link></link>
  170. <comments></comments>
  171. <pubDate>Fri, 01 Dec 2017 12:33:41 +0000</pubDate>
  172. <dc:creator><![CDATA[camerongregor]]></dc:creator>
  173. <category><![CDATA[Software Development]]></category>
  174. <category><![CDATA[extlib]]></category>
  175. <category><![CDATA[xpages]]></category>
  177. <guid isPermaLink="false"></guid>
  178. <description><![CDATA[Over the past few years I have shared a handful of controls and techniques on my blog, and most of these I have made available on github in one way or another. Originally I&#46;&#46;&#46;]]></description>
  179. <content:encoded><![CDATA[<p>Over the past few years I have shared a handful of controls and techniques on my blog, and most of these I have made available on github in one way or another. Originally I was creating a separate github project for each one such as <a href="" target="_blank" rel="noopener">EmailValidator</a>, <a href="" target="_blank" rel="noopener">PhoneNumberControl</a> and the <a href="" target="_blank" rel="noopener">Messages Controls.</a> After these few I decided it would be more efficient to create a single project that I could put them all into, so I then began to contribute them via my <a href="" target="_blank" rel="noopener">GregorbyteXspLibrary</a>.</p>
  180. <p>From time to time I had a few comments like &#8220;This would be a nice addition to the Extension Library&#8221;. However whenever I found time to work on open source projects, it always seemed to be a higher priority to work on sharing something new instead of doing more work on something I had already shared.</p>
  181. <p>It would mean the extra step of moving the work from GregorbyteXspLibrary into the ExtensionLibrary, refactoring package names, testing it all again, updating copyright licensing, and then creating a pull request to have it merged into the Extension Library.</p>
  182. <p>Even after that there would be no guarantee of pull requests being accepted into the OpenNTF repository. So the work maybe would just sit there and seem like a wasted effort. I thought &#8220;well maybe people would be still be able to install my &#8216;fork&#8217; of the Extension Library?&#8221;, but then I could see how this get messy when future IBM releases come out with newer Extension Library versions.</p>
  183. <p>The short story: I just wasn&#8217;t feeling that clear on how I should approach it so I just left it as it was.</p>
  184. <h3>What about ExtLibX?</h3>
  185. <p>I had totally forgotten about ExtLibX.</p>
  186. <p>ExtLib is the main Extension Library that we all know and love, but there is also the ExtLib<strong>X</strong> which is the &#8216;e<strong>X</strong>perimental&#8217; Extension Library.</p>
  187. <p>The ExtLibX project was created exactly for the purpose of submitting experimental controls. It is a bonus extension library that people have the option of installing alongside the main Extension Library.</p>
  188. <p>The idea is that after the experimental controls have gained acceptance as a &#8220;good idea&#8221; they could be migrated into the main Extension Library.</p>
  189. <p>The ExtLibX originally contained things like the Relational controls (which are now part of the core ExtLib), and currently has some work sitting in it for Bootstrap4.</p>
  190. <p>So now that I remember about ExtLibX, I have finally come up with a strategy for sharing controls that I am confident in.</p>
  191. <h2>My New Strategy for Sharing Reusable Controls and Techniques!</h2>
  192. <ul>
  193. <li>My existing <a href="" target="_blank" rel="noopener">camac/GregorbyteXspLibrary</a> will remain as it stands now, with no further development</li>
  194. <li>I&#8217;ve created my own fork of the experimental extension library: <a href="" target="_blank" rel="noopener">camac/XPagesExtLibX</a></li>
  195. <li>I&#8217;ll share all my new controls and techniques through camac/XPagesExtLibX</li>
  196. <li>I&#8217;ll prepare install-able releases so that people can use the controls straight away if they want to.  This will hopefully help me get some feedback / bug reports / suggested improvements.</li>
  197. <li>If I get feedback that a control or technique is useful and is working without problems, I will prepare a pull request for that control so that it can be reviewed for acceptance into the main <a href="" target="_blank" rel="noopener">OpenNTF/XPagesExtLibX</a> project.</li>
  198. <li>If IBM decide that control is useful to everyone, they are then able to migrate it from ExtLibX to ExtLib  at there own desire as they have access to both ExtLibX and ExtLib</li>
  199. <li>When I get time I will move the controls from GregorbyteXspLibrary over to ExtLibX</li>
  200. </ul>
  201. <p>Overall I am pretty happy with this new strategy as enables me to share controls so that they are immediately usable, but also still have a pathway to <em>possibly</em> be included in the ExtensionLibrary.</p>
  202. <p>I am hoping to share a few controls and techniques in the next few months that will be a bit more useful for day-to-day XPages work, and also a few extended versions of some standard controls that make them a little bit more developer friendly.</p>
  203. <p>I&#8217;m hoping to release the first version in the next week which should contain</p>
  204. <ul>
  205. <li>Some modified Table Controls
  206. <ul>
  207. <li>Modified table renderer to have proper <code>&lt;thead&gt; &lt;tfoot&gt; &lt;tbody&gt;</code> structure.</li>
  208. <li><code>&lt;th&gt;</code> control</li>
  209. </ul>
  210. </li>
  211. <li>Master / Slave checkbox controls
  212. <ul>
  213. <li>easy bulk record selection within repeat controls</li>
  214. <li>select all / deselect all functionality</li>
  215. <li>automatic row-styling based on selected checkbox</li>
  216. <li>ability to use the whole row as a click target for that row&#8217;s checkbox</li>
  217. </ul>
  218. </li>
  219. <li>A JDBC Connection provider that loads configuration information from Notes Documents in a config database (either current database or centralised database)</li>
  220. </ul>
  221. <p>If your interested in any of these above please let me know in the comments below!<br />
  222. Do you have any other ideas for other Controls? I have a few more in the pipeline. Let&#8217;s see if we can breathe a bit of life into the Extension Library!</p>
  223. ]]></content:encoded>
  224. <wfw:commentRss></wfw:commentRss>
  225. <slash:comments>2</slash:comments>
  226. </item>
  227. <item>
  228. <title>Embedded Experiences not rendering after IBM Notes FP9</title>
  229. <link></link>
  230. <comments></comments>
  231. <pubDate>Wed, 27 Sep 2017 05:36:43 +0000</pubDate>
  232. <dc:creator><![CDATA[camerongregor]]></dc:creator>
  233. <category><![CDATA[Software Development]]></category>
  234. <category><![CDATA[embeddedexperience]]></category>
  235. <category><![CDATA[FP9]]></category>
  236. <category><![CDATA[notes]]></category>
  238. <guid isPermaLink="false"></guid>
  239. <description><![CDATA[Embedded Experiences are no longer rendering after upgrading to FP9. I suspect it is something to do with the changes to Embedded Browser, either removing it or upgrading it or something else. I haven&#8217;t&#46;&#46;&#46;]]></description>
  240. <content:encoded><![CDATA[<p>Embedded Experiences are no longer rendering after upgrading to FP9.</p>
  241. <p>I suspect it is something to do with the changes to Embedded Browser, either removing it or upgrading it or something else.</p>
  242. <p>I haven&#8217;t had a chance to investigate fully. Perhaps there may be a workaround, or perhaps this is specific to the way we are using embedded experiences.</p>
  243. <p>We use embedded experiences quite a bit at our company so we have rolled back for now. If I figure anything out I will post an update but just be aware before upgrading if you are using embedded experiences to test FP9 in your situation before rolling out.</p>
  244. <p>The trace log shows the following stack traces.</p>
  245. <p><img class="aligncenter size-full wp-image-541" src="" alt="" width="798" height="573" srcset=" 798w, 300w, 768w" sizes="(max-width: 798px) 100vw, 798px" /></p>
  246. <p><img class="aligncenter size-full wp-image-542" src="" alt="" width="786" height="675" srcset=" 786w, 300w, 768w" sizes="(max-width: 786px) 100vw, 786px" /></p>
  247. ]]></content:encoded>
  248. <wfw:commentRss></wfw:commentRss>
  249. <slash:comments>2</slash:comments>
  250. </item>
  251. <item>
  252. <title>BuildXPages Deployment Automation Tools &#8211; v1.0.0</title>
  253. <link></link>
  254. <comments></comments>
  255. <pubDate>Thu, 21 Sep 2017 12:47:18 +0000</pubDate>
  256. <dc:creator><![CDATA[camerongregor]]></dc:creator>
  257. <category><![CDATA[Software Development]]></category>
  258. <category><![CDATA[ant]]></category>
  259. <category><![CDATA[deployment]]></category>
  260. <category><![CDATA[designer]]></category>
  261. <category><![CDATA[headless]]></category>
  262. <category><![CDATA[plugin]]></category>
  264. <guid isPermaLink="false"></guid>
  265. <description><![CDATA[After quite a bit of work I have finally published the first release of BuildXPages! What is BuildXPages? BuildXPages is a project which is useful if you are interested in Automating tasks that are&#46;&#46;&#46;]]></description>
  266. <content:encoded><![CDATA[<p>After quite a bit of work I have finally published the <a href="" target="_blank" rel="noopener">first release of BuildXPages!</a></p>
  267. <h2>What is BuildXPages?</h2>
  268. <div>
  269. <p>BuildXPages is a project which is useful if you are interested in Automating tasks that are involved in building XPages.</p>
  270. </div>
  271. <div>
  272. <p>For example you may be interested in automating some of these tasks:</p>
  273. </div>
  274. <div>
  275. <ul>
  276. <li>Building NSFs from an On-Disk Project</li>
  277. <li>Building Plugins and Features</li>
  278. <li>Refreshing NSF Designs</li>
  279. <li>Setting Template Inheritance of NSFs</li>
  280. <li>Start, Stop and Restart Http server</li>
  281. <li>Uploading Plugins to an NSF Update Site</li>
  282. <li>Deploy Plugins to Notes/Designer</li>
  283. </ul>
  284. </div>
  285. <div>
  286. <p>BuildXPages provides tools which can be used to achieve these tasks. The main artifact of the project is a collection of tasks that can be used in an Ant build script, but the project also includes a Plugin for Domino Designer to facilitate the building of NSFs.</p>
  287. <h2>Project Background</h2>
  288. </div>
  289. <p>Automating the build and deployment of any software application is a great idea to be able achieve the same result every time. Information and tools for doing this in XPages is relatively scarce but you can find blog posts and some tools out there.</p>
  290. <p>I have written a few years ago about the <a href="" target="_blank" rel="noopener">build system for XPages</a> we use at my workplace, and have shared my slides from the <a href="" target="_blank" rel="noopener">talk I gave at AUSLUG 2015</a> so have a look at those for some background (be aware these posts are old and I may be doing some things differently now), I decided to gather the tools that I have developed to support this and make them available under it&#8217;s own Open Source Project.</p>
  291. <p>If you look you will see the project has actually been on Github since 2014! But the project never had any good documentation and some of the parts where not very friendly to use.</p>
  292. <p>Over the last couple of months I have been working away on bringing the project up to a standard where it can be understood and used by others. This includes things like:</p>
  293. <ul>
  294. <li>making information and error messages more useful and understandable</li>
  295. <li>making task names and arguments more user-friendly</li>
  296. <li>replacing my hard-coded options with configurable options</li>
  297. <li>most of all .. writing documentation!</li>
  298. </ul>
  299. <h2>Documentation</h2>
  300. <p>You can always find the latest Documentation on the <a href="" target="_blank" rel="noopener">Github Project&#8217;s Documentation website</a>. The documentation is also contained as PDF and HTML in the release download.</p>
  301. <p>A large part of writing the documentation was trying to figure out how to explain getting your environment setup. Whilst I think I have everything covered there is a every chance I have missed something that may be different for your environment, so if you do try it out and it doesn&#8217;t work please don&#8217;t hesitate to contact me.</p>
  302. <h3>Asciidoctor FTW!</h3>
  303. <p>Documentation for the  Project is written Asciidoctor using AsciidoctFX and generated using the ant-asciidoctorj plugin. The Asciidoctor &#8216;toolchain&#8217; is awesome and deserves it&#8217;s own blog post / video but that will have to be another day. There is already plenty of information out there about it. If you are going to write any documentation I highly recommend having a look at using it and feel free to ask me about it here or in the <a href="" target="_blank" rel="noopener">XPages Slack chat</a>. You can see the &#8216;recipe&#8217; I use for generating the documentation by looking at the build.xml file in the root of the project, and you can see all the documentation &#8216;source&#8217; files in the doc folder.</p>
  304. <h3>Demonstration Tutorials</h3>
  305. <p>The Project contains some demonstration tutorials which are designed to verify that you have everything set up and to demonstrate the very basic tasks.</p>
  306. <h2>Feedback / Problems / Suggestions</h2>
  307. <p>I you have any problems with these let me know and I can double check what may be the problem either in your setup, or maybe a bug in the project.</p>
  308. <h2>A note about Build Tools</h2>
  309. <p>Part of your automation process is deciding what &#8216;build tool&#8217; you will use, which is usually program that helps coordinate a sequence of tasks that need to be done in order to build / deploy your project. This could be as simple as a batch file, or use a well developed system specifically for this purpose.</p>
  310. <p>I chose Ant because of it&#8217;s simplicity and availability of good documentation. It was very easy for me to get up and running and there were many examples out there to follow. I had also tried to give maven a go but found it hard to find good documentation and after a few dead ends just gave up and returned to making progress with ant.</p>
  311. <p>So with Ant as my choice I have written all these custom tasks to work with Ant. Ant is written in Java and so all the tasks are java based, Maven and Gradle are both Java based and I know there are other XPages developers who prefer maven or gradle. If anyone is interested in translating these tasks to be used as a plugin for gradle or maven plugin then I would be happy to help you adapt them and hopefully include them in this project so that others can also use.</p>
  312. <p>Also: if you are using maven be aware there is already the <a href="" target="_blank" rel="noopener">headlessdesigner-maven-plugin</a> which is written about on Christian Guedemann&#8217;s blog</p>
  313. ]]></content:encoded>
  314. <wfw:commentRss></wfw:commentRss>
  315. <slash:comments>1</slash:comments>
  316. </item>
  317. <item>
  318. <title>Generating and Downloading Files Using XPages&#8217; Persistence Service</title>
  319. <link></link>
  320. <comments></comments>
  321. <pubDate>Wed, 13 Sep 2017 11:42:23 +0000</pubDate>
  322. <dc:creator><![CDATA[camerongregor]]></dc:creator>
  323. <category><![CDATA[Software Development]]></category>
  324. <category><![CDATA[download]]></category>
  325. <category><![CDATA[file]]></category>
  326. <category><![CDATA[persistence]]></category>
  327. <category><![CDATA[xpages]]></category>
  329. <guid isPermaLink="false"></guid>
  330. <description><![CDATA[When developing an XPages application you may run into the need to generate files to be downloaded by the user. For example: Generating a PDF Report Exporting Data to Excel Spreadsheet Creating a Zip&#46;&#46;&#46;]]></description>
  331. <content:encoded><![CDATA[<p>When developing an XPages application you may run into the need to generate files to be downloaded by the user.</p>
  332. <p>For example:</p>
  333. <ul>
  334. <li>Generating a PDF Report</li>
  335. <li>Exporting Data to Excel Spreadsheet</li>
  336. <li>Creating a Zip File of several attachments</li>
  337. </ul>
  338. <p>Achieving these tasks usually raises 2 main problems to solve;</p>
  339. <ol>
  340. <li>What temporary place can I use to generate the files?</li>
  341. <li>How do I allow the user to download the generated files?</li>
  342. </ol>
  343. <p>For the temporary place problem, some common solution is to either generate the files to some &#8216;in memory&#8217; representation or alternatively use the Java Temporary Directory. For the downloading problem, a common solution is to provide a button which calls a SSJS or Java bean method that hijacks the HttpResponse and writes out the appropriate headers and file contents.</p>
  344. <p>These solutions work fine, however built in to the XPages framework is the &#8216;Persistence Service&#8217; which is a mechanism for temporarily Persisting files that need to be available for download . Although this persistence service was built primarily for the standard operations of XPages, there is nothing stopping us from also enjoying the way it solves these 2 problems.</p>
  345. <h2>Why does the Persistence Service exist?</h2>
  346. <p>An advantage of Domino Databases is how easy it is to store Files and Images inside &#8216;Rich Text&#8217; Fields. When XPages needs to display these Embedded Images or allow Downloads of files from within the Document, then the user&#8217;s web browser will need to make request for these embedded objects using some sort of URL.</p>
  347. <p>Domino provides URLs which provide direct access to these embedded files and images, however these only provide access to the &#8216;saved&#8217; version of a document as it exists inside the Notes Database. These URLs are of no help for the &#8216;No mans land&#8217; period of time in which someone is creating a new document, or when editing an existing document and uploads a new File or Image but has not yet saved the document.</p>
  348. <p>When you open up Domino Document via XPages, the persistence service extracts the Document&#8217;s embedded images to a temporary directory in the filesystem, and also uses this directory as a place for newly uploaded files/images to live until they are finally decided to be saved into the document inside the Notes Database. The files in this temporary directory are made available to the user via a special URL.</p>
  349. <h2>How does the Persistence Service Work?</h2>
  350. <p>The XPages server has a server-wide property which determines the <strong>Base Persistence Directory.</strong></p>
  351. <p>The default value for this is <strong>&lt;DominoDataDirectory&gt;/xsppers </strong> but you can configure it to be anywhere you like using the xsp property <strong></strong></p>
  352. <p>When a new XPages Application starts up, it is assigned an &#8216;Application Id&#8217; which is really just a sequential number, so the first application that starts up gets number 1, next number 2 etc.</p>
  353. <p>When a user starts using an Application they are given a &#8216;session id&#8217; which is a bit more like a Universal ID.</p>
  354. <blockquote><p>Side Note: I&#8217;m not sure how this technique goes with Anonymous access as I have only been programming for authenticated users.</p></blockquote>
  355. <p>The persistence service uses these 3 pieces of information to determine a user&#8217;s persistence directory for that application.</p>
  356. <p>So lets assume, my Base persistence directory is <strong>C:\Domino\Data\xsppers</strong>, and the application id is <strong>1</strong> and my session id is <strong>9847239OENTHUDO</strong> then we can find my persistence directory for that application in the file system at <strong>&lt;xsppers&gt;/&lt;applicationid&gt;/&lt;sessionid&gt;</strong> or in this example:</p>
  357. <p>C:\Domino\Data\xsppers\1\9847239OENTHUDO\</p>
  358. <p>Now here is the handy part, XPages has a resource provider which maps a special URL <strong>/xsp/.ibmmodres/persistence</strong> to the user&#8217;s persistence directory for that application.</p>
  359. <p>So lets assume we create a folder &#8216;myfolder&#8217; under my user persistence directory and put a file &#8216;myfile.pdf&#8217; in that folder::</p>
  360. <p>C:\Domino\Data\xsppers\1\9847239OENTHUDO\myfolder\myfile.pdf</p>
  361. <p>This file would then be available via the url:</p>
  362. <p>https://yourserver/yourapp.nsf<strong>/xsp/.ibmmodres/persistence/myfolder/myfile.pdf</strong></p>
  363. <p>If another user tried to use the same url it would not work because they would have a different session id, and would be mapping to a different directory</p>
  364. <h3>Cleaning up files</h3>
  365. <p>Another handy feature of the persistence service is that it cleans up after itself! So you can stress less about generating a massive zip file knowing that it won&#8217;t be left around for too long and end up filling up your server&#8217;s hard drive.</p>
  366. <p>After a user session for an application times-out then the user&#8217;s persistence directory and all its contents will be deleted.</p>
  367. <p>After the entire application times-out, then the application&#8217;s persistence directory  e.g. <strong>C:\Domino\Data\xsppers\1</strong> and all it&#8217;s contents will be deleted.</p>
  368. <h2>So how do I actually use this?</h2>
  369. <p>So your main 2 weapons here are :</p>
  370. <ul>
  371. <li>You have a User&#8217;s Persistence Directory in which you can generate files (which will also clean up after itself)</li>
  372. <li>You have a handy URL available for the user to access the User&#8217;s Persistence Directory</li>
  373. </ul>
  374. <p>To generate files into the User&#8217;s Persistence directory we can either just figure out the path of the user&#8217;s application directory and write files straight to it, or alternatively we can also ask the applications PersistenceService to do it for us.</p>
  375. <h3>Doing it ourselves</h3>
  376. <p>To do it ourselves we need to be able to figure out the User&#8217;s persistence directory.  I have included a Utility class at the bottom of this post with some handy methods. Let&#8217;s have a look at 3 of the methods:</p><pre class="crayon-plain-tag">public static String getSessionId() {
  377. return SessionUtil.getSessionId(FacesContext.getCurrentInstance());
  378. }
  380. public static String getBasePersistenceFolder() {
  382. ApplicationEx ex = ApplicationEx.getInstance();
  384. String propDir = ex.getProperty("", null);
  385. if (StringUtil.isEmpty(propDir)) {
  386. File defaultDir = SystemUtil.DEFAULT_PERSISTENCEDIR;
  387. return defaultDir.getAbsolutePath();
  388. } else {
  389. return propDir;
  390. }
  392. }
  394. public static String getPersistenceSessionFolder() {
  396. ApplicationEx ex = ApplicationEx.getInstance();
  398. return getBasePersistenceFolder() + File.separator + ex.getApplicationId() + File.separator + getSessionId();
  400. }</pre><p>So the main one here is <strong>getPersistenceSessionFolder</strong> and you can see it is just building up that folder location using the 3 parts mentioned earlier. We get the BasePersistenceFolder (xsppers) by querying the xsp property, and if it has not been set using an xsp property, we fall back to the default for the current platform.<br />
  401. We get the session id using the class</p>
  402. <p>Once you have access to this folder, you can create folders and files directly in here. The convention of the PersistenceService is to place your generated files within a subfolder of the User Persistence Directory e.g. <strong>&lt;userpersistencedir/&lt;somefolder&gt;/&lt;somefile&gt;</strong> instead of &lt;userpersistencedir&gt;/&lt;somefile&gt;. If you do not follow this convention then your download url will not work as it expects exactly this structure.</p>
  403. <h3>Doing it using the PersistenceService</h3>
  404. <p>An XPages Application has a PersistenceService which can be used for creating a &#8216;PersistedContent&#8217; object. This persisted content object can be used to get an OutputStream to write to, and also the corresponding java &#8216;File&#8217; object for that PersistedContent.</p>
  405. <p>The utility class has a method which shows how to get the persistence service. Note the persistence service is marked as Deprecated but you can still use it.</p><pre class="crayon-plain-tag">@SuppressWarnings("deprecation")
  406. public static PersistenceService getPersistenceService() {
  408. ApplicationEx ex = ApplicationEx.getInstance();
  409. return ex.getPersistenceService();
  411. }</pre><p>Also the utility class has a method to help create PersistedContent. You can see all the Persistence service methods follow the convention of using a folder and a file name.</p><pre class="crayon-plain-tag">public static PersistedContent createPersistedContent(String folderName, String fileName)
  412. throws IOException, NotesException {
  414. String sessionId = getSessionId();
  416. PersistenceService ps = getPersistenceService();
  418. PersistedContent pd = ps.createPersistedContent(sessionId, folderName, fileName);
  420. return pd;
  422. }</pre><p>And you can see how this is used in the method persistInputStream</p>
  423. <blockquote><p>Note: I am using Apache Commons IOUtils for copying a stream but if you cannot use this then you can replace with another stream copying algorithm or perhaps using IBM Commons StreamUtil.copy(inputstream, outputstream). I am using Apache commons because it automatically buffers the streams so that if you are dealing with large files you don&#8217;t use too much memory</p></blockquote>
  424. <p></p><pre class="crayon-plain-tag">public static File persistInputStream(InputStream is, String folderName, String fileName)
  425. throws NotesException, IOException {
  426. String sessionId = getSessionId();
  427. return persistInputStream(is, sessionId, folderName, fileName);
  428. }
  430. public static File persistInputStream(InputStream is, String sessionId, String folderName, String fileName)
  431. throws IOException {
  433. PersistenceService ps = getPersistenceService();
  435. PersistedContent pd = ps.createPersistedContent(sessionId, folderName, fileName);
  437. OutputStream fos = pd.getOutputStream();
  439., fos);
  441. fos.close();
  443. return pd.getContentAsFile();
  445. }</pre><p></p>
  446. <h2>Providing a Link to download the file</h2>
  447. <p>This is the easy part. all you have to do is use the standard link control!</p><pre class="crayon-plain-tag">&lt;xp:link escape="true" text="Download Me" id="link1"
  448.    value="/xsp/.ibmmodres/persistence/myfolder/myfile.pdf"&gt;&lt;/xp:link&gt;</pre><p></p>
  449. <h2>Summary</h2>
  450. <p>So I have found this way to be a very useful way to manage generating and downloading files, I hope it has been interesting / useful for you and if you have any questions or have found a mistake in this post please leave a comment and I promise to respond!</p>
  451. <h2>Utility Class</h2>
  452. <p>As promised here is the utility class which is also <a href="" target="_blank" rel="noopener">available as an XSnippet</a></p><pre class="crayon-plain-tag">package com.jord.xsp.file;
  454. import;
  455. import;
  456. import;
  457. import;
  458. import;
  459. import java.util.Arrays;
  461. import javax.faces.context.FacesContext;
  463. import;
  464. import;
  465. import;
  466. import;
  467. import;
  468. import;
  469. import;
  470. import;
  472. import lotus.domino.NotesException;
  474. public class PersistenceUtil {
  476. @SuppressWarnings("deprecation")
  477. public static PersistenceService getPersistenceService() {
  479. ApplicationEx ex = ApplicationEx.getInstance();
  480. return ex.getPersistenceService();
  482. }
  484. public static String getSessionId() {
  485. return SessionUtil.getSessionId(FacesContext.getCurrentInstance());
  486. }
  488. public static String getBasePersistenceFolder() {
  490. ApplicationEx ex = ApplicationEx.getInstance();
  492. String propDir = ex.getProperty("", null);
  493. if (StringUtil.isEmpty(propDir)) {
  494. File defaultDir = SystemUtil.DEFAULT_PERSISTENCEDIR;
  495. return defaultDir.getAbsolutePath();
  496. } else {
  497. return propDir;
  498. }
  500. }
  502. public static String getPersistenceSessionFolder() {
  504. ApplicationEx ex = ApplicationEx.getInstance();
  506. return getBasePersistenceFolder() + File.separator + ex.getApplicationId() + File.separator + getSessionId();
  508. }
  510. public static File createdPath(File file) {
  511. File dir = file;
  512. if (!file.isDirectory())
  513. dir = file.getParentFile();
  514. dir.mkdirs();
  515. return file;
  516. }
  518. public static File getAvailableFile(final File file) {
  520. if (file.exists()) {
  521. File testFile;
  522. int counter = 0;
  523. String extension = "";
  524. String fileName = file.getAbsolutePath();
  525. int dotIndex = fileName.lastIndexOf('.');
  526. if (dotIndex &gt; 0) {
  527. extension = fileName.substring(dotIndex);
  528. fileName = fileName.substring(0, dotIndex);
  529. }
  530. while ((testFile = new File(fileName + "_" + counter + extension)).exists())
  531. counter++;
  533. return testFile;
  535. } else {
  536. return file;
  537. }
  539. }
  541. /**
  542. * Returns a safe version of a given name Currently just prevents moving
  543. * directories etc
  544. *
  545. * @return
  546. */
  547. public static String safeFileName(String fileName) {
  548. return fileName.replace("/", "").replace("\\", "");
  549. }
  551. public static File persistFile(File file, String folderName, String fileName) throws IOException, NotesException {
  553. String sessionId = getSessionId();
  554. return persistFile(file, sessionId, folderName, fileName);
  556. }
  558. public static File persistFile(File file, String sessionId, String folderName, String fileName) throws IOException {
  560. PersistenceService ps = getPersistenceService();
  562. PersistedContent pd = ps.createPersistedContent(sessionId, folderName, fileName);
  564. FileInputStream fis = new FileInputStream(file);
  565. OutputStream fos = pd.getOutputStream();
  567., fos);
  569. fos.close();
  570. fis.close();
  572. return pd.getContentAsFile();
  574. }
  576. public static File persistInputStream(InputStream is, String folderName, String fileName)
  577. throws NotesException, IOException {
  578. String sessionId = getSessionId();
  579. return persistInputStream(is, sessionId, folderName, fileName);
  580. }
  582. public static File persistInputStream(InputStream is, String sessionId, String folderName, String fileName)
  583. throws IOException {
  585. PersistenceService ps = getPersistenceService();
  587. PersistedContent pd = ps.createPersistedContent(sessionId, folderName, fileName);
  589. OutputStream fos = pd.getOutputStream();
  591., fos);
  593. fos.close();
  595. return pd.getContentAsFile();
  597. }
  599. public static PersistedContent createPersistedContent(String folderName, String fileName)
  600. throws IOException, NotesException {
  602. String sessionId = getSessionId();
  604. PersistenceService ps = getPersistenceService();
  606. PersistedContent pd = ps.createPersistedContent(sessionId, folderName, fileName);
  608. return pd;
  610. }
  612. public static PersistedContent[] getPersistedContents(String folderName) throws IOException {
  614. String sessionId = getSessionId();
  616. PersistenceService ps = getPersistenceService();
  618. PersistedContent[] pcs = ps.getPersistedContents(sessionId, folderName);
  620. return pcs;
  622. }
  624. public static PersistedContent getPersistedContent(String folderName, String fileName)
  625. throws IOException, NotesException {
  627. String sessionId = getSessionId();
  629. PersistenceService ps = getPersistenceService();
  631. PersistedContent pd = ps.getPersistedContent(sessionId, folderName, fileName);
  633. return pd;
  635. }
  637. public static File persistUploadedFile(UploadedFile upload, String folderName) throws IOException, NotesException {
  639. String sessionId = getSessionId();
  640. return persistUploadedFile(upload, sessionId, folderName);
  642. }
  644. public static File persistUploadedFile(UploadedFile upload, String sessionId, String folderName)
  645. throws IOException {
  647. File file = upload.getUploadedFile().getServerFile();
  648. String fileName = upload.getUploadedFile().getClientFileName();
  650. return persistFile(file, sessionId, folderName, fileName);
  652. }
  654. public static File persistUploadedFile(IUploadedFile upload, String sessionId, String folderName)
  655. throws IOException {
  657. File file = upload.getServerFile();
  658. String fileName = upload.getClientFileName();
  660. return persistFile(file, sessionId, folderName, fileName);
  662. }
  664. public static void deletePersistenceFolder(String folderName) throws IOException {
  666. String sessionId = getSessionId();
  668. String[] folders = getPersistenceService().getFolders(sessionId);
  670. if (!Arrays.asList(folders).contains(folderName)) {
  671. return;
  672. }
  674. getPersistenceService().deleteFolder(sessionId, folderName);
  676. }
  678. }</pre><p>&nbsp;</p>
  679. <p>&nbsp;</p>
  680. ]]></content:encoded>
  681. <wfw:commentRss></wfw:commentRss>
  682. <slash:comments>8</slash:comments>
  683. </item>
  684. <item>
  685. <title>Bundle Inspector &#8211; Diagnosing XPages Plugin Resolution problems</title>
  686. <link></link>
  687. <comments></comments>
  688. <pubDate>Wed, 02 Aug 2017 12:26:56 +0000</pubDate>
  689. <dc:creator><![CDATA[camerongregor]]></dc:creator>
  690. <category><![CDATA[Software Development]]></category>
  691. <category><![CDATA[debug]]></category>
  692. <category><![CDATA[designer]]></category>
  693. <category><![CDATA[osgi]]></category>
  694. <category><![CDATA[plugin]]></category>
  695. <category><![CDATA[xpages]]></category>
  697. <guid isPermaLink="false"></guid>
  698. <description><![CDATA[A common task with XPages development is to installing some plugins that provide additional functionality. If you do any plugin development of your own, you end up doing this task a lot more as&#46;&#46;&#46;]]></description>
  699. <content:encoded><![CDATA[<p>A common task with XPages development is to installing some plugins that provide additional functionality.<br />
  700. If you do any plugin development of your own, you end up doing this task a lot more as you create new plugins, install new versions etc.</p>
  701. <p>It is also common to encounter some problems after installing plugins to your Domino Server! Maybe your expected plugin doesn&#8217;t load up at all? maybe the wrong version is loading?</p>
  702. <p>The standard method of diagnosing these problems is to use the OSGi console via the Domino Console (for the server) or by launching Designer with the -RPARAMS -console arguments.</p>
  703. <p>However to provide a more user friendly way to diagnose problems, I have written a plugin for both the Domino Server and Domino Designer which provides a little more user friendly experience of diagnosing plugin problems than the standard method of using the OSGi console.</p>
  704. <blockquote><p>Disclaimer: Throughout this I use the words Plugin and Bundle interchangeably. Technically in OSGi they are called Bundles, but Eclipse calls them plugins, so there is a weird overlap. But for the purpose of this they are the same thing.</p></blockquote>
  705. <p>The Some common root causes are:</p>
  706. <ul>
  707. <li><strong>You plugin is not loading at all<br />
  708. </strong>Maybe your Server/Domino designer is not actually configured to load plugins from where you think it is?</li>
  709. <li><strong>Some extra versions of the plugin are being loaded from somewhere you didn&#8217;t realise<br />
  710. </strong>Plugins can be loaded from more than one location, for example NSF Update Sites, File system, Eclipse Workspace Projects (when developing on a local Domino Server). So it is often very important to inspect exactly what plugins are loaded and where they are loading from.</li>
  711. <li><strong>You plugin is loaded but some of it&#8217;s dependencies cannot be resolved<br />
  712. </strong>Even when plugins do load correctly, they may have problems resolving their dependencies, and then they end up with the state &#8216;INSTALLED&#8217; but not resolved, and effectively useless.</li>
  713. </ul>
  714. <h2>How to Install Bundle Inspector</h2>
  715. <p>Download the <a href="">latest release of GregorbyteXspLibrary</a>, and Install the &#8216;Bundles Inspector&#8217; feature to your Domino Server and Domino Designer.<br />
  716. I am assuming if you have a need for the Bundle Inspector, then you must know how to install plugins to Domino Server or Designer, but if you don&#8217;t know then let me know via a comment and I will detail the process.</p>
  717. <p>You can also install the other main feature of GregorbyteXspLibrary if you would like some other XPages controls that I have blogged about before.</p>
  718. <h2>Using in Domino Designer</h2>
  719. <p>After you have installed and restarted, you should see 2 new buttons in the toolbar / menu bar</p>
  720. <p><img class="aligncenter size-full wp-image-501" src="" alt="" width="756" height="140" srcset=" 756w, 300w" sizes="(max-width: 756px) 100vw, 756px" /></p>
  721. <p>The Puzzle piece button will launch the Bundle Inspector. You can then filter for a particular plugin that you are having a problem with.</p>
  722. <p><img class="aligncenter size-full wp-image-502" src="" alt="" width="647" height="493" srcset=" 647w, 300w" sizes="(max-width: 647px) 100vw, 647px" /></p>
  723. <p>Note that by default it is a &#8216;starts with&#8217; match,  but you can use wildcards such as * if you would like to do a &#8216;contains&#8217; match as I am here for anything with &#8216;gregor&#8217; in it.</p>
  724. <ul>
  725. <li>Plugins are sorted alphabetically ascending, and then descending by version, so the most recent version should be at the top.</li>
  726. <li>Plugins that are Resolved will show the green puzzle piece icon, plugins that have not resolved will show the grey puzzle piece icon.</li>
  727. <li>Beneath the list you can view the &#8216;location&#8217; of  the selected plugin e.g. where did the plugin load from.</li>
  728. </ul>
  729. <p>If you would like to see the reason why a plugin has not resolved, select it from the list and click OK, as you can see here, the libphonenumber is plugin is not loaded because there is a newer version of it loaded.</p>
  730. <p><img class="aligncenter size-full wp-image-503" src="" alt="" width="518" height="141" srcset=" 518w, 300w" sizes="(max-width: 518px) 100vw, 518px" /></p>
  731. <h2>Using on a Domino Server</h2>
  732. <p>The way Bundles Inspector works on the server is, by providing a &#8216;bundlesBean&#8217; from an XspLibrary. To use this bean, you need to setup a particular page in an XPages Database.</p>
  733. <p>For these steps, It is assumed that you have the Bundles Inspector plugin installed to both your server and your Domino Designer.</p>
  734. <h3>Setup the XPage</h3>
  735. <p>It is a good idea to put the BundleInspector XPage in a database that does not depend on any other Xpages libraries. This way, if there is a problem with any of the Xpages libraries that you usually use, it will not affect the BundlesInspector Xpage. You can also put access control on this database if you want to restrict who can use the Bundles Inspector.</p>
  736. <p>Go to the XPages Properties page and enable the &#8216;com.gregorbyte.xsp.bundlesinspector&#8217; library</p>
  737. <p><img class="aligncenter size-full wp-image-505" src="" alt="" width="412" height="120" srcset=" 412w, 300w" sizes="(max-width: 412px) 100vw, 412px" />Then Create a new xpage in your desired database</p>
  738. <p>Select the &#8216;Copy Sample XPage to Clipboard&#8217; button.</p>
  739. <p><img class="aligncenter size-full wp-image-501" src="" alt="" width="756" height="140" srcset=" 756w, 300w" sizes="(max-width: 756px) 100vw, 756px" /></p>
  740. <p>You should then see the confirmation message</p>
  741. <p><img class="aligncenter size-full wp-image-506" src="" alt="" width="518" height="141" srcset=" 518w, 300w" sizes="(max-width: 518px) 100vw, 518px" /></p>
  742. <p>Go to the Source tab of your XPage and paste the contents over the top</p>
  743. <p><img class="aligncenter size-full wp-image-507" src="" alt="" width="597" height="373" srcset=" 597w, 300w" sizes="(max-width: 597px) 100vw, 597px" /></p>
  744. <p>Feel free to customise this page to however you like, you could change the colours layout etc. The page is merely provided as a starting point.</p>
  745. <h3>Using the Bundle Inspector for the Server</h3>
  746. <p>Navigate to your XPage in your web browser. (The XPage should be on the Server that you are diagnosing bundles for)</p>
  747. <ul>
  748. <li>You can filter for the plugin your are interested in using the filter</li>
  749. <li>There is also an example of including a quick link to a common search e.g. extlib</li>
  750. <li>The bundle location is shown in the table so you can see where the plugin is loading from</li>
  751. <li>The bundle state is shown on the Right, green means resolved, red means not resolved</li>
  752. </ul>
  753. <p><img class="aligncenter size-full wp-image-508" src="" alt="" width="1171" height="275" srcset=" 1171w, 300w, 768w, 1024w" sizes="(max-width: 1171px) 100vw, 1171px" /></p>
  754. <p>If a plugin is not resolved you can click the &#8216;Diagnose&#8217; button and the diagnosis will show beneath the row of the plugin</p>
  755. <p><img class="aligncenter size-full wp-image-509" src="" alt="" width="1237" height="99" srcset=" 1237w, 300w, 768w, 1024w" sizes="(max-width: 1237px) 100vw, 1237px" /></p>
  756. <p>&nbsp;</p>
  757. <h2>Conclusion</h2>
  758. <p>So there you have it, the aim of the Bundle Inspector is to give a better experience for diagnosing plugin problems.</p>
  759. <p>Let me know what you think, would this help you? any improvements? Can you think of a better name the Bundle Inspector? I don&#8217;t really like it but that is what I went with&#8230;</p>
  760. <p>If you have any problems installing let me know!</p>
  761. ]]></content:encoded>
  762. <wfw:commentRss></wfw:commentRss>
  763. <slash:comments>0</slash:comments>
  764. </item>
  765. <item>
  766. <title>Swiper Official Version 2 Release</title>
  767. <link></link>
  768. <comments></comments>
  769. <pubDate>Fri, 21 Jul 2017 13:52:52 +0000</pubDate>
  770. <dc:creator><![CDATA[camerongregor]]></dc:creator>
  771. <category><![CDATA[Software Development]]></category>
  772. <category><![CDATA[designer]]></category>
  773. <category><![CDATA[sourcecontrol]]></category>
  774. <category><![CDATA[swiper]]></category>
  776. <guid isPermaLink="false"></guid>
  777. <description><![CDATA[So I have finally posted Swiper version 2 to OpenNTF! (and Github of course) Swiper OpenNTF Project Page Swiper Github Releases The latest version is 2.0.1,  and is the same as 2.0.0beta but with&#46;&#46;&#46;]]></description>
  778. <content:encoded><![CDATA[<p>So I have finally posted Swiper version 2 to OpenNTF! (and Github of course)</p>
  779. <ul>
  780. <li><a href="" target="_blank" rel="noopener">Swiper OpenNTF Project Page</a></li>
  781. <li><a href="" target="_blank" rel="noopener">Swiper Github Releases</a></li>
  782. </ul>
  783. <p>The latest version is 2.0.1,  and is the same as 2.0.0beta but with a bug fix for the toolbar buttons.</p>
  784. <p>Swiper 2.0.0 beta has been available on the Github project site for a few months, and the core functionality of it works as planned. There was however a bug within the shortcut buttons that I added to the menu bar, and this is a bit of a nasty bug that can cause deletion of design elements.</p>
  785. <p>Why has it taken me so long to fix this bug and prepare the final release? to be perfectly honest with you, I just couldn&#8217;t muster up the motivation to get this done. My development process for Swiper involves launching Domino Designer from my eclipse IDE.  After I upgraded my IBM Notes to 9.0.1 FP8 my designer launch settings no longer worked. By this time frankly my tank was empty. I knew re-configuring the launch settings was destined to be a fiddly encounter, and entire nights can be wasted with no fruitful results. All my extra-curricular projects are done in my spare-time, and this usually means between 8:30pm-11:30pm, and after a full day of problem-solving at work, I just couldn&#8217;t muster up the courage to face a task that had a high-probability of failure. I was satisfied that the beta version was available, and the project would have to wait until I felt the motivation again.</p>
  786. <p>Well this week, I noticed a tweet from Per Henrik Lausten about &#8216;Open Source Friday&#8217;.</p>
  787. <blockquote class="twitter-tweet" data-lang="en">
  788. <p dir="ltr" lang="en">Contribute to open source on <a href="">#OpenSourceFriday</a> (by <a href="">@github</a>):<a href=""></a></p>
  789. <p>— Per Henrik Lausten (@perlausten) <a href="">July 19, 2017</a></p></blockquote>
  790. <p><script async src="//" charset="utf-8"></script></p>
  791. <p>It made me think a little about Swiper, and I thought I would give it another go. I also felt validated for taking my little break from the project when I read the &#8216;<a href="" target="_blank" rel="noopener">It&#8217;s ok to hit pause</a>&#8216; section of the Open Source best practices for Maintainers <img src="" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
  792. <p>So I needed to fix my Designer Launch settings, I really don&#8217;t know how to do this by myself and have relied on others for this information. Previously it was Mikkel Heisterberg, and then for the past few years I turned to <a href="" target="_blank" rel="noopener">Ralf M Petter</a>. I was very sad to see recent news that Ralf passed away from a cancer related illness. I would just like to express my sympathy to Ralf&#8217;s family for their loss. Ralf&#8217;s blog posts on setting up Eclipse to launch Notes and Designer were extremely helpful to me whilst developing Swiper and other plugins that I have made for Notes and Designer. Ralf was always quick to respond to my questions and his expertise will be missed.</p>
  793. <p>A couple of months ago I had asked Ralf if he knew how to launch Designer FP8 from eclipse and surely enough within a day he had provided me with updated instructions, I had also asked Gary Marjoram @ IBM for some advice and armed with all this advice I was able to get FP8 launching again after a couple of hours tweaking.</p>
  794. <p>Tonight I was able to debug the toolbar buttons again and therefore I was able to release the official version 2.</p>
  795. <p>Let me know if you have any problems or suggestions!</p>
  796. ]]></content:encoded>
  797. <wfw:commentRss></wfw:commentRss>
  798. <slash:comments>5</slash:comments>
  799. </item>
  800. <item>
  801. <title>Auto-width Bootstrap Column XPages Controls</title>
  802. <link></link>
  803. <comments></comments>
  804. <pubDate>Tue, 21 Mar 2017 13:13:18 +0000</pubDate>
  805. <dc:creator><![CDATA[camerongregor]]></dc:creator>
  806. <category><![CDATA[Software Development]]></category>
  807. <category><![CDATA[bootstrap]]></category>
  808. <category><![CDATA[control]]></category>
  809. <category><![CDATA[xpages]]></category>
  811. <guid isPermaLink="false"></guid>
  812. <description><![CDATA[I&#8217;ve been stuck working with OneUI Version 3 for the past couple of years, due to a regretful decision made at the beginning of my major project. OneUI was better than nothing but very frustrating&#46;&#46;&#46;]]></description>
  813. <content:encoded><![CDATA[<p>I&#8217;ve been stuck working with <a href="" target="_blank">OneUI Version 3</a> for the past couple of years, due to a regretful decision made at the beginning of my major project. OneUI was better than nothing but very frustrating at times.<br />
  814. Finally, I have moved on to my next project and I am now using bootstrap (version 3)</p>
  815. <p>A common task when laying out a page using bootstrap is to divide sections up into rows and columns, and use the appropriate css styles to do so. I&#8217;m going to assume you are familiar with bootstrap&#8217;s grid system, and if not I recommend you <a href="" target="_blank">hearing it from the horse&#8217;s mouth</a> instead of me trying to explain it again.</p>
  816. <p>I like creating XspLibrary controls, so I decided I would go ahead and create row and column controls. It could be seen as a little overkill and you can easily live without it, but I see the <a href="" target="_blank">Bootfaces project</a> did it, so I took inspiration from their container, row and column controls.</p>
  817. <p>I then also added the ability for the columns to have their widths automatically distributed. Auto-widths is a feature that is <a href="" target="_blank">coming with bootstrap 4</a>,  but for now we need to do it ourselves!</p>
  818. <h2>Example XPages Markup</h2>
  819. <p>The following examples end up looking like this: (<strong>Note:</strong> the blue border is just added for demo purposes to show the outline of the columns)</p>
  820. <p><img class="aligncenter size-full wp-image-481" src="" alt="" width="981" height="140" srcset=" 981w, 300w, 768w" sizes="(max-width: 981px) 100vw, 981px" /></p>
  821. <p>Here is a simple example of 2-column layout with equal width columns</p><pre class="crayon-plain-tag">&lt;gb:row id="row1"&gt;
  822.    &lt;gb:column id="column1"&gt;These two columns&lt;/gb:column&gt;
  823.    &lt;gb:column id="column2"&gt;are Equal Width&lt;/gb:column&gt;
  824. &lt;/gb:row&gt;</pre><p>Notice above how I haven&#8217;t specified any column widths? The columns will all become equal width, so in the example above, they will both be 6 columns wide (12 divided by 2 columns).</p>
  825. <p>If there have 3 columns, then they would each automatically be 4 columns wide (12 divided by 3 columns).</p><pre class="crayon-plain-tag">&lt;gb:row id="row5"&gt;
  826.    &lt;gb:column id="column3"&gt;These three &lt;/gb:column&gt;
  827.    &lt;gb:column id="column10"&gt;columns are also&lt;/gb:column&gt;
  828.    &lt;gb:column id="column11"&gt;Equal Width&lt;/gb:column&gt;
  829. &lt;/gb:row&gt;</pre><p></p>
  830. <h3>Specifying a column width</h3>
  831. <p>If you want a column to be a specifc width, you use the span property to specify the width for that column, the remaining columns will receive their fair share of whatever is left over.</p><pre class="crayon-plain-tag">&lt;gb:row id="row2"&gt;
  832.    &lt;gb:column id="column4"&gt;These columns have&lt;/gb:column&gt;
  833.    &lt;gb:column id="column5" span="6"&gt;the middle with span="6"&lt;/gb:column&gt;
  834.    &lt;gb:column id="column6"&gt;and the outer columns are auto width&lt;/gb:column&gt;
  835. &lt;/gb:row&gt;</pre><p></p>
  836. <h3>Specifying alignment</h3>
  837. <p>I&#8217;ve also added an align property so I can quickly align the contents.</p><pre class="crayon-plain-tag">&lt;gb:row id="row4"&gt;
  838.    &lt;gb:column id="column7" align="left"&gt;This is align left (default)&lt;/gb:column&gt;
  839.    &lt;gb:column id="column8" align="center"&gt;This is align middle&lt;/gb:column&gt;
  840.    &lt;gb:column id="column9" align="right"&gt;This is align left&lt;/gb:column&gt;
  841. &lt;/gb:row&gt;</pre><p></p>
  842. <h3>Full Row column</h3>
  843. <p>If you want to use the entire row, then you can just leave the column definition out entirely and the contents will automatically be wrapped in a col-md-12 column</p><pre class="crayon-plain-tag">&lt;gb:row id="row3"&gt;
  844. If you want a Full Row, then just don't include columns
  845. &lt;/gb:row&gt;</pre><p></p>
  846. <h3>Using style and styleClass</h3>
  847. <p>You can still use style and styleClass properties as you normally would.</p>
  848. <h3>Container Control</h3>
  849. <p>If you are using one of the extension library bootstrap applicationLayouts, then you won&#8217;t need to use the container control because it is already covered by that. But, If you are rolling your own you can use the container layout which has a fluid property to control whether is is a bootstrap fluid layout or not.</p><pre class="crayon-plain-tag">&lt;gb:container id="container1" fluid="true"&gt;
  851.    &lt;!-- rows, columns, your content --&gt;
  853. &lt;/gb:container&gt;</pre><p></p>
  854. <h2>Overview of creating the controls</h2>
  855. <p>Here is what we are going to do:</p>
  856. <ol>
  857. <li>Create the Container UIComponent</li>
  858. <li>Create the Column UIComponent</li>
  859. <li>Create the Row UIComponent</li>
  860. <li>Provide Control Definitions via an xsp-config file so that designer knows how to use them</li>
  861. <li>Program in the auto-width algorithm</li>
  862. </ol>
  863. <p>Notice we are not going to create a renderer. We will be extending the panel control, and the existing panel renderer will be used automatically.</p>
  864. <p>For each component we are just going to <em>extend </em>the existing <strong>&lt;xp:panel&gt;</strong> control to re-use all the existing functionality, and just add a few extra properties.</p>
  865. <h3>Creating the Container Component</h3>
  866. <p>The container component is simply an extension of the panel control (UIPanelEx) with an additional property &#8216;fluid&#8217;. We add the getters and setters for the fluid property, and make sure it is included in the restore and save state operations.</p>
  867. <p>We also override the getStyleClass method so that it will always concatenate &#8216;container&#8217; or &#8216;container-fluid&#8217; depending on the fluid property.</p><pre class="crayon-plain-tag">package com.gregorbyte.xsp.component.bootstrap;
  869. import javax.faces.context.FacesContext;
  870. import javax.faces.el.ValueBinding;
  872. import com.gregorbyte.xsp.util.GregorbyteUtil;
  873. import;
  875. public class UIContainer extends UIPanelEx {
  877. public Boolean fluid;
  879. public UIContainer() {
  881. }
  883. @Override
  884. public String getStyleClass() {
  886. String parent = super.getStyleClass();
  888. if (isFluid()) {
  889. return GregorbyteUtil.concatStyleClasses("container-fluid", parent);
  890. } else {
  891. return GregorbyteUtil.concatStyleClasses("container", parent);
  892. }
  894. }
  896. public Boolean isFluid() {
  898. if (this.fluid != null) {
  899. return this.fluid;
  900. }
  902. ValueBinding vb = getValueBinding("fluid");
  904. if (vb != null) {
  905. return (Boolean) vb.getValue(getFacesContext());
  906. }
  908. return false;
  910. }
  912. public void setFluid(Boolean fluid) {
  913. this.fluid = fluid;
  914. }
  916. @Override
  917. public void restoreState(FacesContext context, Object state) {
  919. Object[] values = (Object[]) state;
  921. super.restoreState(context, values[0]);
  922. fluid = (Boolean) values[1];
  924. }
  926. @Override
  927. public Object saveState(FacesContext context) {
  929. Object[] values = new Object[2];
  931. values[0] = super.saveState(context);
  932. values[1] = fluid;
  934. return values;
  936. }
  938. }</pre><p></p>
  939. <h3>Creating the Column Component</h3>
  940. <p>The column component is a little more complex. We are also going to extend the UIPanelEx control but we will also add some control properties</p>
  941. <ul>
  942. <li><strong>span</strong> &#8211; This will be an integer that can be set to specify the column span of the bootstrap grid</li>
  943. <li><strong>align</strong> &#8211; This will be a String which can be &#8216;left&#8217; (Default), &#8216;center&#8217; or &#8216;right&#8217;. This will then add the necessary bootstrap css class to perform aligning of the contents</li>
  944. </ul>
  945. <p>I am also going to add a property <strong>guessSpan </strong>which is not exposed to domino designer and will only be used to store our &#8216;guesstimate&#8217; column span when calculating the auto widths.</p>
  946. <p>Then, I create a private method &#8216;getEffectiveSpan&#8217; which will check if a column span has been explicitly set with the <strong>span</strong> property and if so it will use that. If a span was not set, it will use the &#8216;guessSpan&#8217; that was guessed via the algorithm</p>
  947. <p>Then we override the &#8216;getStyleClass&#8217; method, so that when the renderer comes along and asks for the styleClasses, we can inject some styleClasses of our own.</p>
  948. <p>We are using the very handy method from Extension Library&#8217;s ExtLibUtil, which allows us to easily concatenate styles. I have copied the method into my own Util class so that there will be no dependency on the Extension Library.</p>
  949. <p>First we ask for any styles that have been explicitly set. Then we concatenate our column style from the bootstrap grid system e.g. &#8220;col-md-8&#8221;, and then we concatenate an alignment style if one was set on the column.</p><pre class="crayon-plain-tag">package com.gregorbyte.xsp.component.bootstrap;
  951. import javax.faces.context.FacesContext;
  952. import javax.faces.el.ValueBinding;
  954. import com.gregorbyte.xsp.util.GregorbyteUtil;
  955. import;
  956. import;
  958. public class UIColumn extends UIPanelEx {
  960. private Integer guessSpan = null;
  962. // Defaults for Medium Columns, use styleClass for specific layouts
  963. private Integer span = null;
  965. private String align = null;
  967. public UIColumn() {
  968. super();
  969. }
  971. private Integer getEffectiveSpan() {
  972. if (getSpan() != null) {
  973. return getSpan();
  974. } else if (getGuessSpan() != null) {
  975. return getGuessSpan();
  976. }
  978. return 12;
  979. }
  981. @Override
  982. public String getStyleClass() {
  984. String styleClass = super.getStyleClass();
  986. styleClass = GregorbyteUtil.concatStyleClasses(styleClass, "col-md-" + getEffectiveSpan());
  988. String align = getAlign();
  990. if (StringUtil.equals(align, "left")) {
  991. styleClass = GregorbyteUtil.concatStyleClasses(styleClass, "text-left");
  992. } else if (StringUtil.equals(align, "right")) {
  993. styleClass = GregorbyteUtil.concatStyleClasses(styleClass, "text-right");
  994. } else if (StringUtil.equals(align, "center")) {
  995. styleClass = GregorbyteUtil.concatStyleClasses(styleClass, "text-center");
  996. }
  998. return styleClass;
  1000. }
  1002. public Integer getGuessSpan() {
  1003. return guessSpan;
  1004. }
  1006. public void setGuessSpan(Integer guessSpan) {
  1007. this.guessSpan = guessSpan;
  1008. }
  1010. public Integer getSpan() {
  1012. if (this.span != null) {
  1013. return this.span;
  1014. }
  1016. ValueBinding vb = getValueBinding("span");
  1018. if (vb != null) {
  1019. return (Integer) vb.getValue(getFacesContext());
  1020. }
  1022. return null;
  1024. }
  1026. public void setSpan(Integer span) {
  1027. this.span = span;
  1028. }
  1030. public String getAlign() {
  1032. if (this.align != null) {
  1033. return this.align;
  1034. }
  1036. ValueBinding vb = getValueBinding("align");
  1038. if (vb != null) {
  1039. return (String) vb.getValue(getFacesContext());
  1040. }
  1042. return null;
  1044. }
  1046. public void setAlign(String align) {
  1047. this.align = align;
  1048. }
  1050. @Override
  1051. public void restoreState(FacesContext context, Object state) {
  1053. Object[] values = (Object[]) state;
  1055. super.restoreState(context, values[0]);
  1057. guessSpan = (Integer) values[1];
  1058. span = (Integer) values[2];
  1059. align = (String) values[3];
  1061. }
  1063. @Override
  1064. public Object saveState(FacesContext context) {
  1066. Object[] values = new Object[4];
  1068. values[0] = super.saveState(context);
  1069. values[1] = guessSpan;
  1070. values[2] = span;
  1071. values[3] = align;
  1073. return values;
  1075. }
  1077. }</pre><p></p>
  1078. <h3>Creating the Row Component</h3>
  1079. <p>The row component is also an extension of the panel control. But we are going to add some extra behaviour to it. Just before the Row&#8217;s children (the columns) are Rendered we are going to calculate the necessary spans for any columns that did not have a span. If we can&#8217;t find any columns as children, then we will assume that we are supposed to wrap all the contents into a single column and therefore we will render a start and end tag for a &lt;div class=&#8221;col-md-12&#8243;&gt;</p>
  1080. <h3>Programming the auto-width algorithm</h3>
  1081. <p>The auto-width algorithm does the following</p>
  1082. <ol>
  1083. <li>Finds the total span of columns that have been explicitly allocated using the <strong>span</strong> property</li>
  1084. <li>Figures out the remaining span available (e.g. 12 &#8211; allocated)</li>
  1085. <li>Figures out the average span to allocate to remaining columns without a span</li>
  1086. <li>Allocates the &#8216;guessed&#8217; span to the remaining columns</li>
  1087. </ol>
  1088. <p></p><pre class="crayon-plain-tag">package com.gregorbyte.xsp.component.bootstrap;
  1090. import;
  1091. import java.util.ArrayList;
  1092. import java.util.List;
  1094. import javax.faces.FacesException;
  1095. import javax.faces.component.UIComponent;
  1096. import javax.faces.context.FacesContext;
  1098. import com.gregorbyte.xsp.util.GregorbyteUtil;
  1099. import;
  1100. import;
  1102. public class UIRow extends UIPanelEx {
  1104. private Boolean autoColumn = false;
  1106. public UIRow() {
  1107. super();
  1109. }
  1111. @Override
  1112. public String getStyleClass() {
  1114. String parent = super.getStyleClass();
  1116. return GregorbyteUtil.concatStyleClasses("row", parent);
  1118. }
  1120. @Override
  1121. public void encodeBegin(FacesContext context) throws IOException {
  1123. super.encodeBegin(context);
  1125. calculateColumnSpans(context);
  1126. if (autoColumn) {
  1127. context.getResponseWriter().startElement("div", null);
  1128. context.getResponseWriter().writeAttribute("class", "col-md-12", null);
  1129. }
  1131. }
  1133. @Override
  1134. public void encodeEnd(FacesContext context) throws IOException {
  1136. if (autoColumn) {
  1137. context.getResponseWriter().endElement("div");
  1138. }
  1140. super.encodeEnd(context);
  1141. }
  1143. public void calculateColumnSpans(FacesContext context) throws FacesException {
  1145. List&lt;UIComponent&gt; kids = TypedUtil.getChildren(this);
  1147. List&lt;UIColumn&gt; cols = new ArrayList&lt;UIColumn&gt;();
  1149. int totalMediumSpecified = 0;
  1151. for (UIComponent comp : kids) {
  1152. if (comp instanceof UIColumn) {
  1154. UIColumn col = (UIColumn) comp;
  1156. if (col.getSpan() != null) {
  1157. totalMediumSpecified += col.getSpan();
  1158. } else {
  1159. cols.add(col);
  1160. }
  1162. }
  1163. }
  1165. // If No Columns we will render
  1166. autoColumn = (cols.size() == 0);
  1168. if (autoColumn)
  1169. return;
  1171. int remaining = 12 - totalMediumSpecified;
  1173. Integer colGuess = remaining / cols.size();
  1175. if (colGuess != null) {
  1176. for (UIColumn uiColumn : cols) {
  1177. uiColumn.setGuessSpan(colGuess);
  1178. }
  1179. }
  1181. }
  1183. @Override
  1184. public void restoreState(FacesContext context, Object state) {
  1186. Object[] values = (Object[]) state;
  1188. super.restoreState(context, values[0]);
  1189. autoColumn = (Boolean) values[1];
  1191. }
  1193. @Override
  1194. public Object saveState(FacesContext context) {
  1196. Object[] values = new Object[2];
  1198. values[0] = super.saveState(context);
  1199. values[1] = autoColumn;
  1201. return values;
  1203. }
  1205. }</pre><p></p>
  1206. <h2>Provide Component Definition via xsp-config file</h2>
  1207. <p>The xsp-config file tells Domino Designer everything it needs to know to include it on an XPage so we need to specify the properties that can be set.</p>
  1208. <p>The file starts with namespace definition to say &#8216;all component definitions in this file are under this namespace&#8217; and then it specifies the 2 components.</p>
  1209. <p>We provide the description, tagname, display name, corresponding java class (so it knows how to instantiate it) a component type (usually just the same as the class).</p>
  1210. <p>Then we specify the properties that can be set. You can see for the row there is no extra properties, but for the column we have added the <strong>span</strong> and <strong>align </strong>properties and have provided combo options Left, Center and Right for the <strong>align</strong> property. For the container component, we have specified the <strong>fluid</strong> property.</p><pre class="crayon-plain-tag">&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  1211. &lt;faces-config&gt;
  1213. &lt;faces-config-extension&gt;
  1214. &lt;namespace-uri&gt;;/namespace-uri&gt;
  1215. &lt;default-prefix&gt;gb&lt;/default-prefix&gt;
  1216. &lt;/faces-config-extension&gt;
  1218. &lt;component&gt;
  1220. &lt;description&gt;Row Container for Bootstrap Columns
  1221. &lt;/description&gt;
  1222. &lt;display-name&gt;Bootstrap Row&lt;/display-name&gt;
  1223. &lt;component-type&gt;com.gregorbyte.xsp.bootstrap.Row
  1224. &lt;/component-type&gt;
  1225. &lt;component-class&gt;com.gregorbyte.xsp.component.bootstrap.UIRow
  1226. &lt;/component-class&gt;
  1228. &lt;component-extension&gt;
  1230. &lt;base-component-type&gt;
  1231. &lt;/base-component-type&gt;
  1233. &lt;component-family&gt;javax.faces.Panel
  1234. &lt;/component-family&gt;
  1236. &lt;tag-name&gt;row&lt;/tag-name&gt;
  1238. &lt;designer-extension&gt;
  1239. &lt;in-palette&gt;true&lt;/in-palette&gt;
  1240. &lt;category&gt;Gregorbyte Library&lt;/category&gt;
  1241. &lt;/designer-extension&gt;
  1243. &lt;/component-extension&gt;
  1245. &lt;/component&gt;
  1247. &lt;component&gt;
  1249. &lt;description&gt;Bootstrap Columns
  1250. &lt;/description&gt;
  1251. &lt;display-name&gt;Bootstrap Column&lt;/display-name&gt;
  1252. &lt;component-type&gt;com.gregorbyte.xsp.bootstrap.Column
  1253. &lt;/component-type&gt;
  1254. &lt;component-class&gt;com.gregorbyte.xsp.component.bootstrap.UIColumn
  1255. &lt;/component-class&gt;
  1257. &lt;property&gt;
  1258. &lt;description&gt;Adds an Alignment class to the column &lt;/description&gt;
  1259. &lt;display-name&gt;Alignment&lt;/display-name&gt;
  1260. &lt;property-name&gt;align&lt;/property-name&gt;
  1261. &lt;property-class&gt;java.lang.String&lt;/property-class&gt;
  1262. &lt;property-extension&gt;
  1263. &lt;designer-extension&gt;
  1264. &lt;editor&gt;;/editor&gt;
  1265. &lt;editor-parameter&gt;
  1266. left
  1267. center
  1268. right
  1269. &lt;/editor-parameter&gt;
  1270. &lt;category&gt;basics&lt;/category&gt;
  1271. &lt;/designer-extension&gt;
  1272. &lt;/property-extension&gt;
  1273. &lt;/property&gt;
  1275. &lt;property&gt;
  1276. &lt;description&gt;Number of Columns to Span (Medium Screen size). Leave blank for auto calculation&lt;/description&gt;
  1277. &lt;display-name&gt;Columns to Span&lt;/display-name&gt;
  1278. &lt;property-name&gt;span&lt;/property-name&gt;
  1279. &lt;property-class&gt;java.lang.Integer&lt;/property-class&gt;
  1280. &lt;property-extension&gt;
  1281. &lt;allow-run-time-binding&gt;true&lt;/allow-run-time-binding&gt;
  1282. &lt;designer-extension&gt;
  1283. &lt;category&gt;basics&lt;/category&gt;
  1284. &lt;/designer-extension&gt;
  1285. &lt;/property-extension&gt;
  1286. &lt;/property&gt;
  1288. &lt;component-extension&gt;
  1290. &lt;base-component-type&gt;
  1291. &lt;/base-component-type&gt;
  1293. &lt;component-family&gt;javax.faces.Panel
  1294. &lt;/component-family&gt;
  1296. &lt;tag-name&gt;column&lt;/tag-name&gt;
  1298. &lt;designer-extension&gt;
  1299. &lt;in-palette&gt;true&lt;/in-palette&gt;
  1300. &lt;category&gt;Gregorbyte Library&lt;/category&gt;
  1301. &lt;/designer-extension&gt;
  1303. &lt;/component-extension&gt;
  1305. &lt;/component&gt;
  1307. &lt;component&gt;
  1309. &lt;description&gt;Container for Bootstrap Layout
  1310. &lt;/description&gt;
  1311. &lt;display-name&gt;Bootstrap Container&lt;/display-name&gt;
  1312. &lt;component-type&gt;com.gregorbyte.xsp.bootstrap.Container
  1313. &lt;/component-type&gt;
  1314. &lt;component-class&gt;com.gregorbyte.xsp.component.bootstrap.UIContainer
  1315. &lt;/component-class&gt;
  1317. &lt;property&gt;
  1318. &lt;description&gt;Use Fluid Layout
  1319. &lt;/description&gt;
  1320. &lt;display-name&gt;Use Fluid Layout&lt;/display-name&gt;
  1321. &lt;property-name&gt;fluid&lt;/property-name&gt;
  1322. &lt;property-class&gt;java.lang.Boolean&lt;/property-class&gt;
  1323. &lt;property-extension&gt;
  1324. &lt;allow-run-time-binding&gt;true&lt;/allow-run-time-binding&gt;
  1325. &lt;designer-extension&gt;
  1326. &lt;category&gt;display&lt;/category&gt;
  1327. &lt;/designer-extension&gt;
  1328. &lt;/property-extension&gt;
  1329. &lt;/property&gt;
  1331. &lt;component-extension&gt;
  1333. &lt;base-component-type&gt;
  1334. &lt;/base-component-type&gt;
  1336. &lt;component-family&gt;javax.faces.Panel
  1337. &lt;/component-family&gt;
  1339. &lt;tag-name&gt;container&lt;/tag-name&gt;
  1341. &lt;designer-extension&gt;
  1342. &lt;in-palette&gt;true&lt;/in-palette&gt;
  1343. &lt;category&gt;Gregorbyte Library&lt;/category&gt;
  1344. &lt;/designer-extension&gt;
  1346. &lt;/component-extension&gt;
  1348. &lt;/component&gt;
  1350. &lt;/faces-config&gt;</pre><p></p>
  1351. <h2>Installing</h2>
  1352. <p>If you would like to use these controls, you have 2 choices!</p>
  1353. <ol>
  1354. <li>Install the <a href="" target="_blank">latest version of my GregorbyteXspLibrary</a> to your Designer Client and Domino Server using the same method as Extension Library Installation</li>
  1355. <li>Scavenge the necessary files from my Github repository and include it your own NSF</li>
  1356. </ol>
  1357. <p>To Scavenge the necessary files from my <a href="" target="_blank">Github Repo</a>:</p>
  1358. <ul>
  1359. <li>You will need to place these java files in your java design elements:
  1360. <ul>
  1361. <li>/com.gregorbyte.xsp.controls/src/com/gregorbyte/xsp/component/bootstrap/</li>
  1362. <li>/com.gregorbyte.xsp.controls/src/com/gregorbyte/xsp/component/bootstrap/</li>
  1363. <li>/com.gregorbyte.xsp.controls/src/com/gregorbyte/xsp/component/bootstrap/</li>
  1364. <li>/com.gregorbyte.xsp.core/src/com/gregorbyte/xsp/util/</li>
  1365. </ul>
  1366. </li>
  1367. <li>You will need to place this xsp-config file in the WEB-INF directory
  1368. <ul>
  1369. <li>/com.gregorbyte.xsp.controls/src/com/gregorbyte/xsp/config/gregorbyte-bootstrap.xsp-config</li>
  1370. </ul>
  1371. </li>
  1372. </ul>
  1373. <h1>Conclusion</h1>
  1374. <p>You can easily get the job done without these controls, but so far I have really enjoyed having them in my palette.</p>
  1375. <p>I&#8217;ve only just started using these controls, so I expect to improve on them. Maybe by adding the &#8216;small&#8217;, &#8216;medium&#8217;, &#8216;large&#8217;, &#8216;extraLarge&#8217; properties to the columns (but for now I can use styleClass=&#8221;col-sm-4&#8243; etc.)</p>
  1376. <p>I&#8217;m also keen to take a look at other parts of the bootfaces project and see if any of the ideas might be effective in Xpages.</p>
  1377. <p>If you end up using these please let me know! I&#8217;d love to hear any suggestions and as always if any problems then please leave a comment or post an issue on my GregorbyteXspLibrary project.</p>
  1378. <p>&nbsp;</p>
  1379. <h3></h3>
  1380. ]]></content:encoded>
  1381. <wfw:commentRss></wfw:commentRss>
  1382. <slash:comments>0</slash:comments>
  1383. </item>
  1384. <item>
  1385. <title>Swiper FP8 Version Beta Release</title>
  1386. <link></link>
  1387. <comments></comments>
  1388. <pubDate>Thu, 16 Mar 2017 12:50:18 +0000</pubDate>
  1389. <dc:creator><![CDATA[camerongregor]]></dc:creator>
  1390. <category><![CDATA[Software Development]]></category>
  1391. <category><![CDATA[designer]]></category>
  1392. <category><![CDATA[sourcecontrol]]></category>
  1393. <category><![CDATA[swiper]]></category>
  1395. <guid isPermaLink="false"></guid>
  1396. <description><![CDATA[Last week I released the &#8216;alpha&#8217; version of Swiper which was untested on FP8 but presumed to be ok. So far I have only had good reports from the pioneers who have gone ahead&#46;&#46;&#46;]]></description>
  1397. <content:encoded><![CDATA[<p>Last week <a href="" target="_blank">I released the &#8216;alpha&#8217; version of Swiper</a> which was untested on FP8 but presumed to be ok. So far I have only had good reports from the pioneers who have gone ahead and installed FP8 + the alpha version.</p>
  1398. <p>I have since managed to ugrade my home office setup to FP8 which unfortunately has broken my ability to launch designer from eclipse but I am seeking some advice on fixing this up.</p>
  1399. <p>In the meantime I have to test the slow way of building plugins, import plugins, restart &#8230; ugh.</p>
  1400. <p>Anyway, I persist because I want to give the people what they want! I have prepared another release with some requests received last week. This will most likely be the final 2.0.0 release but I am just releasing as beta for now. You can <a href="" target="_blank">download the v2.0.0 Beta release from the github repo right now</a>! I&#8217;d love to hear if the requested features are also useful for you.</p>
  1401. <p>Note: for the toolbar buttons to enable, you must click on the Project Header in the left pane</p>
  1402. <h3><strong>&#8216;Refresh ODP and then Sync&#8217; button</strong></h3>
  1403. <p>requested by Tinus Riyanto</p>
  1404. <p><img class="aligncenter size-full wp-image-470" src="" alt="" width="434" height="143" srcset=" 434w, 300w" sizes="(max-width: 434px) 100vw, 434px" /></p>
  1405. <p>Tinus&#8217; setup is to have Build Automatically off, Refresh Automatically off (I assume) and also &#8216;Auto Import&#8217; off.<br />
  1406. This means that to for sync, he would need to find the ODP and right-click refresh, and then run a sync</p>
  1407. <p>Instead, he can now just click &#8216;Refresh ODP and then Sync&#8217; button!</p>
  1408. <p>I spent about 20 minutes trying to figure out what Icon could represent &#8216;Refresh and Sync&#8217; without confusing it with the other icons. I gave up and chose the 8-ball :p</p>
  1409. <p>For bonus points I threw in a &#8216;Refresh ODP&#8217; button which just refreshes the ODP.</p>
  1410. <p><img class="aligncenter size-full wp-image-471" src="" alt="" width="434" height="144" srcset=" 434w, 300w" sizes="(max-width: 434px) 100vw, 434px" /></p>
  1411. <h3><strong>&#8216;Launch ODP Folder in System Explorer&#8217;</strong></h3>
  1412. <p>requested by me!</p>
  1413. <p>A few times I just want to open the ODP in the System Explorer (windows Explorer) so I added this button to quickly launch it without having to navigate to package explorer etc.</p>
  1414. <p><img class="aligncenter size-full wp-image-472" src="" alt="" width="434" height="144" srcset=" 434w, 300w" sizes="(max-width: 434px) 100vw, 434px" /></p>
  1415. <p>&nbsp;</p>
  1416. <h3>&#8216;Enable Swiper for All projects&#8217; preference option</h3>
  1417. <p>Requested by Patrick Kwinten</p>
  1418. <p><img class="aligncenter size-full wp-image-474" src="" alt="" width="518" height="220" srcset=" 518w, 300w" sizes="(max-width: 518px) 100vw, 518px" /></p>
  1419. <p>Patrick wants to &#8216;Fire and Forget&#8217; on a Headless Build setup so that all projects will definitely have swiper enabled when the Headless build runs.</p>
  1420. <h2>Next step</h2>
  1421. <p>As long as I hear everything is good, I will publish the final version 2.0.0 to OpenNTF next week.</p>
  1422. <p>As always happy to hear any further suggestions that may make your life with source-control in Domino Designer easier.</p>
  1423. ]]></content:encoded>
  1424. <wfw:commentRss></wfw:commentRss>
  1425. <slash:comments>6</slash:comments>
  1426. </item>
  1427. </channel>
  1428. </rss>

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

  1. Download the "valid RSS" banner.

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

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

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

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