<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Intec</title>
	<atom:link href="http://www.intec.co.uk/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.intec.co.uk</link>
	<description>IT Software Solutions, IT Consultancy UK, IT Development Services</description>
	<lastBuildDate>Thu, 23 May 2013 22:12:50 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5</generator>
		<item>
		<title>When Does a Control That Has An Id, Not Have An Id?</title>
		<link>http://www.intec.co.uk/when-does-a-control-that-has-an-id-not-have-an-id/</link>
		<comments>http://www.intec.co.uk/when-does-a-control-that-has-an-id-not-have-an-id/#comments</comments>
		<pubDate>Thu, 23 May 2013 22:12:50 +0000</pubDate>
		<dc:creator>paulwithers</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[XPages]]></category>

		<guid isPermaLink="false">http://www.intec.co.uk/?p=3238</guid>
		<description><![CDATA[As part of some work on XPages OpenLog Logger, I&#8217;m looking to not only log SSJS errors but also give the facility to push them to an Error control for the relevant component or an Errors control if they are not associated directly to a control. There have been a couple of challenges around this. [...]]]></description>
				<content:encoded><![CDATA[<p>As part of some work on <a href="http://www.openntf.org/Internal/home.nsf/project.xsp?action=openDocument&amp;name=XPages%20OpenLog%20Logger">XPages OpenLog Logger</a>, I&#8217;m looking to not only log SSJS errors but also give the facility to push them to an Error control for the relevant component or an Errors control if they are not associated directly to a control.</p>
<p>There have been a couple of challenges around this.</p>
<p>First, I&#8217;m aggregating error objects into a LinkedHashSet so there are no exact duplicates &#8211; because dynamically computed properties can be calculated during a number of phases of the XPages lifecycle, the same error could be encountered a number of times during a partial refresh. The errors are then logged out to OpenLog by a PhaseListener in the afterPhase() method for the Render Response phase. That&#8217;s right at the end of the lifecycle, when we cannot encounter any further errors.</p>
<p>However, if you call FacesContext.getCurrentInstance().addMessage()during that method, rendering has already occurred, so although they&#8217;re added to the FacesContext, all Error controls have already been rendered without any errors. So we need to add it earlier.</p>
<p>So I moved my code to the beforePhase() method. But that runs <em>before</em> the Render Response phase, so any errors encountered during the Render Response phase are not written to the FacesContext.</p>
<p>So I leave the writing to OpenLog until the PhaseListener&#8217;s afterPhase() method for the Render Response phase. But I moved the code to call FacesContext.getCurrentInstance().addMessage() to run the first time an error gets added to the LinkedHashSet. But I want to tell the user which component the error is for, so I include component.getId().</p>
<p>Here things got strange. When FacesContext.getCurrentInstance().addMessage() ran, the component had no id. component.getId() returned null. But OpenLog had the component id. The property that triggered the error was a computed on page load validateRequired validator. The source pane code is below:</p>
<p><a href="http://www.intec.co.uk/when-does-a-control-that-has-an-id-not-have-an-id/valdaterequired/" rel="attachment wp-att-3241"><img class="alignnone size-full wp-image-3241" alt="valdateRequired" src="http://www.intec.co.uk/wp-content/uploads/2013/05/valdateRequired.png" width="500" height="162" /></a></p>
<p>&nbsp;</p>
<p>Nothing unusual, so it would appear. So I looked at the .java file that gets created. You can probably see why it&#8217;s not outputting an id for the component when it hits an error with the validateRequired:</p>
<p><a href="http://www.intec.co.uk/when-does-a-control-that-has-an-id-not-have-an-id/validaterequiredjava/" rel="attachment wp-att-3242"><img class="alignnone size-full wp-image-3242" alt="validateRequiredJava" src="http://www.intec.co.uk/wp-content/uploads/2013/05/validateRequiredJava.png" width="526" height="276" /></a></p>
<p>&nbsp;</p>
<p>As you can see, the setId method comes after the evaluator.evaluateAsString() call which throws the error. I wondered if perhaps I had added the id to the component on a subsequent save, so perhaps the order in which the properties had been defined caused the problem. No. Invariably, setId() is called last. setUrl method on an Image control is added after setId, but that&#8217;s the only one I&#8217;ve seen so far.</p>
<p>So almost any loaded property is calculated <em>before</em> an id is added to the control.</p>
<p>I have an idea or two how to work around it, but it&#8217;s an interesting point to note.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.intec.co.uk/when-does-a-control-that-has-an-id-not-have-an-id/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>org.openntf.domino M2 Release and Demo Database</title>
		<link>http://www.intec.co.uk/org-openntf-domino-m2-release-and-demo-database/</link>
		<comments>http://www.intec.co.uk/org-openntf-domino-m2-release-and-demo-database/#comments</comments>
		<pubDate>Wed, 22 May 2013 20:58:57 +0000</pubDate>
		<dc:creator>paulwithers</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[org.openntf.domino]]></category>
		<category><![CDATA[XPages]]></category>

		<guid isPermaLink="false">http://www.intec.co.uk/?p=3232</guid>
		<description><![CDATA[The second release of org.openntf.domino has today been pushed up to OpenNTF. As I blogged earlier in the week, there are a host of enhancements as well as bug fixes. For those wanting to hit the ground running with the project, I&#8217;ve posted a video on what needs deploying to the server and your client, [...]]]></description>
				<content:encoded><![CDATA[<p>The second release of org.openntf.domino has today been pushed up to <a href="http://www.openntf.org/internal/home.nsf/release.xsp?databaseName=CN=NotesOSS2/O=NotesOSS!!Projects\pmt.nsf&amp;documentId=4F251B0896AB463E86257B73006E8F18&amp;action=openDocument">OpenNTF</a>. As I <a href="http://www.intec.co.uk/update-on-org-openntf-domino/">blogged earlier in the week</a>, there are a host of enhancements as well as bug fixes.</p>
<p>For those wanting to hit the ground running with the project, I&#8217;ve posted a video on what needs deploying to the server and your client, embedded below.</p>
<p>Declan has also updated the <a href="http://domino1.qtzar.com/org.openntf.domino/index.html">JavaDoc</a> and is kindly hosting it.</p>
<p>For anyone who wants a bit more information on how to use the code and some comparisons, I&#8217;ve been working on a sample application. It requires M2 as a minimum. So far there is import code and some samples of some new methods in DateTime. There is also some code to performance benchmark. I would recommend downloading from <a href="https://github.com/paulswithers/org.openntf.domino-Demo-Database">GitHub</a> (using Git rather than Mercurial) because I will be continuing to work on it. But if you&#8217;re not comfortable yet with source control, I&#8217;m attaching a copy of the database.</p>
<p><iframe src="http://www.youtube.com/embed/6j9nHOPg-FA" height="360" width="640" allowfullscreen="" frameborder="0"></iframe></p>
<p><a href="http://www.intec.co.uk/org-openntf-domino-m2-release-and-demo-database/openntfdominodemo/" rel="attachment wp-att-3233">OpenNTF Domino Demo Database</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.intec.co.uk/org-openntf-domino-m2-release-and-demo-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Update on org.openntf.domino</title>
		<link>http://www.intec.co.uk/update-on-org-openntf-domino/</link>
		<comments>http://www.intec.co.uk/update-on-org-openntf-domino/#comments</comments>
		<pubDate>Mon, 20 May 2013 12:44:51 +0000</pubDate>
		<dc:creator>paulwithers</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[XPages Java org.openntf.domino]]></category>

		<guid isPermaLink="false">http://www.intec.co.uk/?p=3228</guid>
		<description><![CDATA[It&#8217;s been a little while since the initial release of org.openntf.domino, but as we&#8217;re gearing up towards M2 release, it&#8217;s worth giving an update of all the work that&#8217;s been going on under the hood. M1 provided the core set of Java code that offered a host of possibilities for looping Collections, avoiding recycle, throwing [...]]]></description>
				<content:encoded><![CDATA[<p>It&#8217;s been a little while since the initial release of org.openntf.domino, but as we&#8217;re gearing up towards M2 release, it&#8217;s worth giving an update of all the work that&#8217;s been going on under the hood.</p>
<p>M1 provided the core set of Java code that offered a host of possibilities for looping Collections, avoiding recycle, throwing generic exceptions instead of NotesExceptions and providing the MIMEBean. The jar could also be added to jvm/lib/ext for use in Java agents etc and could be added to WebContent\WEB-INF\lib for use in Java in XPages. These steps alone significantly sped up development. But for M2 we&#8217;ve gone further.</p>
<h3>Bug Fixes</h3>
<p>We may be good but we&#8217;re still human! Some deep bugs on recycling and MIMEBean have been identified and fixed as members of the team have been using the API more intensively. Resurrection of recycled objects is robust across the run context &#8211; XPages, agents etc. Code has been added to identify the run context.</p>
<h3>Making Integration into XPages Easier</h3>
<p>A plugin project &#8211; org.openntf.domino.xsp &#8211; has been added to enable the jar to any XPages application on the server as well as adding global objects as entry points (opensession and opendatabase). It still requires the plugin and jar, but details of exporting and deploying from the source code are on the <a href="https://github.com/OpenNTF/org.openntf.domino/wiki/Plug-and-Play-into-an-NSF-the-org.openntf.domino-way">wiki</a>.</p>
<p>If you&#8217;re working on a clean environment and want to only use the new API, you can set org.openntf.domino.xsp=godmode in the server&#8217;s xsp.properties file so we override session and database.</p>
<p>And the API is now fully integrated into SSJS as well. You&#8217;ll need to import the update site into Designer and put the plugin in your &lt;<strong><em>notes</em></strong>&gt;/jvm/lib.ext folder. But then, cast variables to the new classes (e.g. var myView:org.openntf.domino.View = &#8230;) and you will get typeahead support for standard and new methods.</p>
<h3>Architecture of Class Interfaces and Implementations</h3>
<p>This isn&#8217;t something you have to worry about, but an interesting change for the geeks. As part of M2 we&#8217;ve changed the underlying architecture of the API. Previously we had interfaces in the org.openntf.domino package that mixed both standard and new methods. We&#8217;ve changed that so the org.openntf.domino package has the standard methods and all new methods are in parallel interfaces in org.openntf.domino.ext. The classes that implement those interfaces are still in the org.openntf.domino.impl package. (You cast to and import the org.openntf.domino classes, but you&#8217;re actually using org.openntf.domino.impl classes, the same as happens when you cast to lotus.domino interfaces but actually use lotus.domino.local classes.)</p>
<h3>Logging</h3>
<p>A logger was added to M1 but wasn&#8217;t fully operational. Now it is. It allows high-level logging to server console, full stack trace logging to a file in IBM_TECHNICAL_SUPPORT folder and the whole lot also logged to OpenLog.nsf on the relevant server, if it exists. Longer term I&#8217;ll be looking at making the path configurable and other elements, which may or may not be feasible (and may even already be possible!).</p>
<h3>Transaction Logging</h3>
<p>You may have seen <a href="http://nathantfreeman.wordpress.com/2013/04/05/org-openntf-domino-transactions-databasetransaction/">Nathan&#8217;s post last month</a> about him adding transaction logging into the API. This is a huge addition. Most databases have code somewhere where the user clicks a button and business processing kicks off that does something like setting fields on the source document, then updating child documents or related documents in another database. What happens if the code fails on updating all those other documents after successfully updating the source document? You might have coded an exception for that but you the only possible cause may be a connectivity blip, so you didn&#8217;t bother coding for an extremely rare occurrence. But it hits exactly when you&#8217;re at your busiest!</p>
<p>This is where transaction logging comes in. Now start the transaction, change your fields, update your related documents and <em>then</em> call transaction.commit(). In your error handling call transaction.rollback(). And even better, the transaction logging that Nathan has written is clever enough to only save documents that have changed. I know I&#8217;ll be using that.</p>
<h3>Graph Databases</h3>
<p>Graph databases are something I haven&#8217;t yet fully got my head around. But Nathan has added an implementation for writing to Graph databases from the API.</p>
<h3>Demo Database</h3>
<p>We&#8217;re also working on a demo database. I posted a YouTube video (embedded below) a few weeks ago. (As an aside, what I mention as a bug in the API was actually developer error &#8211; I called the wrong method from SSJS!) The version that will ship with M2 will probably just include the data import routine and comparison of code and some of the new DateTime methods, as well as a performance comparator on looping through documents and setting a DateTime field. We&#8217;ll be adding to it to provide SSJS and Java bean samples of the full API along with code comparisons of Java to lotus.domino Java code, and also give sample Java agents.</p>
<h3>Resting on Our Laurels?</h3>
<p>No way. When you see the release notes for M2 you&#8217;ll see there are additional bits that are not yet operational. And I will be hugely surprised if that&#8217;s the end of the new functionality.</p>
<p><iframe src="http://www.youtube.com/embed/IH8T-RvyFz8" height="360" width="640" allowfullscreen="" frameborder="0"></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://www.intec.co.uk/update-on-org-openntf-domino/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Business Use Cases &#8211; Customer Service</title>
		<link>http://www.intec.co.uk/business-use-cases-customer-service/</link>
		<comments>http://www.intec.co.uk/business-use-cases-customer-service/#comments</comments>
		<pubDate>Sun, 19 May 2013 16:30:16 +0000</pubDate>
		<dc:creator>intec</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[collaboration software]]></category>
		<category><![CDATA[Social Business]]></category>

		<guid isPermaLink="false">http://www.intec.co.uk/?p=3220</guid>
		<description><![CDATA[The overarching benefit to deploying Social Business solutions in customer service operations is the ability to engage with customers and understand them more deeply. This helps organisations to anticipate and meet their customers’ needs in ways that differentiate them from the competition. If companies could increase customer retention rates by 5%, they could grow their [...]]]></description>
				<content:encoded><![CDATA[<p><iframe width="420" height="315" src="http://www.youtube.com/embed/ASJie4CZENg" frameborder="0" allowfullscreen></iframe></p>
<p>The overarching benefit to deploying Social Business solutions in customer service operations is the ability to engage with customers and understand them more deeply. This helps organisations to anticipate and meet their customers’ needs in ways that differentiate them from the competition.</p>
<blockquote><p><strong>If companies could increase customer retention rates by 5%, they could grow their profits by 25% -100%.</strong></p></blockquote>
<p><em>Frederick Reichheld, The Loyalty Effect</em></p>
<p>According to a recent ITSV CEO study, ‘Getting closer to the customer is the top focus for CEOs over the next 5 years.’</p>
<p>Specifically, customer service teams can:</p>
<ul>
<li>Find the right people via profiles connecting customers with similar interests or find employees with specific skills</li>
<li>Easily adapt web content that captures customer interest based on behaviour – without calling IT support</li>
<li>Streamline operational efficiencies with consistent workflow processes via enhanced email and messaging capabilities integrated with social applications</li>
<li>Update web content based on customer behaviour to provide critical information when needed</li>
<li>Share best practices with blogging, shared bookmarks, shared files and activities</li>
<li>Provide additional online self-services for communities</li>
<li>Instantly chat to experts in customer behaviour.</li>
</ul>
<p><a href="http://www.intec.co.uk/social-business-whitepaper/" title="Social Business Whitepaper"><strong>This article was taken from Intec&#8217;s whitepaper &#8211; Social Business &#8211; Connect. Collaborate. Compete.</strong></a></p>
<p><a href="http://www.intec.co.uk/software-solutions/collaboration-solutions/" title="Collaboration Solutions"><strong>For more information or to talk to Intec about Social Business Collaboration Software visit www.intec.co.uk/software-solutions/collaboration-solutions/</strong></a> </p>
<p>Or call +44(0)1252 775400</p>
]]></content:encoded>
			<wfw:commentRss>http://www.intec.co.uk/business-use-cases-customer-service/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Social Business Use Cases: Marketing &amp; Sales</title>
		<link>http://www.intec.co.uk/social-business-use-cases-marketing-sales/</link>
		<comments>http://www.intec.co.uk/social-business-use-cases-marketing-sales/#comments</comments>
		<pubDate>Sun, 12 May 2013 17:09:01 +0000</pubDate>
		<dc:creator>intec</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[collaboration software]]></category>
		<category><![CDATA[Social]]></category>
		<category><![CDATA[Social Business]]></category>

		<guid isPermaLink="false">http://www.intec.co.uk/?p=3218</guid>
		<description><![CDATA[Social technologies are being used to gather insights about products and brands, opinions about competitors, and perceptions of market segments. This market research and customer insight can be used as input for product requirements and design, advertising campaigns, pricing, packaging, and other marketing and product development activities. In a recent study of 541 executives at [...]]]></description>
				<content:encoded><![CDATA[<p><iframe width="560" height="315" src="http://www.youtube.com/embed/WRko6xVtVn8" frameborder="0" allowfullscreen></iframe></p>
<p>Social technologies are being used to gather insights about products and brands, opinions about competitors, and perceptions of market segments. This market research and customer insight can be used as input for product requirements and design, advertising campaigns, pricing, packaging, and other marketing and product development activities.</p>
<blockquote><p>In a recent study of 541 executives at 500 companies, 40% found that they could see specific improvements and increases in sales from social customer relationship management and 71% found that it led to a reduction in time to resolution for support issues.</p></blockquote>
<h3>Social Businesses increase their customer reach by accessing more customers – and spending more time with them.</h3>
<p><strong>Social selling allows organisations to:</strong><br />
•	Access core opportunity, contact and account data from mobile devices<br />
•	See a 360 degree view of the customer<br />
•	Reduce time spent learning about the customer<br />
•	Reduce time spent searching for experts and information<br />
•	Reduce time spent filling in opportunity data for forecasts<br />
•	Engage customers remotely with a rich set of collaboration and social tools<br />
•	Save time and cover all stakeholders with one-to-many communications<br />
•	Keep entire teams, including channel partners, in sync on closing the deal.</p>
<p><strong>Social Businesses engage the entire sales team and apply expertise from across the organisation. Sales representatives can work together in collaborative communities to solve problems and:</strong><br />
•	Gain easy access to experts for fast answers to customer questions<br />
•	Provide recommended sales content based on the specific opportunity<br />
•	Easily collaborate with co-workers from across the organisation<br />
•	Quickly reach out to experts when emergencies arise<br />
•	Re-use best practices from other teams.</p>
<p><a href="http://www.intec.co.uk/social-business-whitepaper/" title="Social Business Whitepaper"><strong>This article was taken from Intec&#8217;s whitepaper &#8211; Social Business &#8211; Connect.Collaborate.Compete.</strong></a></p>
<p>For more information or to talk to Intec about <a href="http://www.intec.co.uk/software-solutions/collaboration-solutions/" title="Collaboration Software">Social Business Collaboration Software</a> visit <a href="http://www.intec.co.uk/software-solutions/collaboration-solutions/" title="Collaboration Solutions">www.intec.co.uk/software-solutions/collaboration-solutions/</a></p>
<p>or call +44(0)1252 775400</p>
]]></content:encoded>
			<wfw:commentRss>http://www.intec.co.uk/social-business-use-cases-marketing-sales/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Java and Selections Part Six: Value Picker Solution Continued</title>
		<link>http://www.intec.co.uk/java-and-selections-part-six-value-picker-solution-continued/</link>
		<comments>http://www.intec.co.uk/java-and-selections-part-six-value-picker-solution-continued/#comments</comments>
		<pubDate>Thu, 09 May 2013 21:52:28 +0000</pubDate>
		<dc:creator>paulwithers</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[selections tutorial]]></category>
		<category><![CDATA[XPages]]></category>

		<guid isPermaLink="false">http://www.intec.co.uk/?p=3203</guid>
		<description><![CDATA[In the previous part I created a ListPicker class that extends IValuePickerData and Serializable. The hasCapability() and getSourceLabels() methods that the IValuePickerData interface requires have been implemented and just return false. In addition to the default constructor public ListPicker(), I&#8217;ve created two more: public ListPicker(List&#60;String&#62;) and public ListPicker(Set&#60;String&#62;). Because I&#8217;ve just used the generic classes [...]]]></description>
				<content:encoded><![CDATA[<p>In the previous part I created a ListPicker class that extends IValuePickerData and Serializable. The hasCapability() and getSourceLabels() methods that the IValuePickerData interface requires have been implemented and just return false. In addition to the default constructor public ListPicker(), I&#8217;ve created two more: public ListPicker(List&lt;String&gt;) and public ListPicker(Set&lt;String&gt;). Because I&#8217;ve just used the generic classes as parameters of the methods, List will take any type of list like an ArrayList and Set will take any kind of set like a TreeSet. Both methods store the collection passed into them into a private List variable called options_.</p>
<p>Now we&#8217;re ready to start on the two pivotal methods that do the work &#8211; readEntries() and loadEntries().</p>
<p>readEntries takes an IPickerOptions object as its parameter. These are the options passed in via the underlying AJAX call to the dataProvider. There are four properties used:</p>
<ul>
<li><span class="Apple-style-span" style="line-height: 13px;" data-mce-mark="1"><strong>startKey</strong>: a full or partial value that is passed from the Value Picker&#8217;s search box, if search is enabled by setting dojoType=&#8221;extlib.dijit.PickerListSearch&#8221; on the Value Picker.</span></li>
<li><strong>key</strong>: a full or partial value that is passed from an Edit Box that uses typeahead, where the typeahead is bound to the Value Picker.</li>
<li><strong>start</strong>: the starting position in the collection. It doesn&#8217;t look like there&#8217;s any current functionality in the Value Picker to take advantage of this.</li>
<li><strong>count</strong>: the number of entries to return. It looks like the Value Picker doesn&#8217;t support this property, but the Name Picker does by providing the maxRowCount dojoAttribute in the PickerName JavaScript Library, as <a href="http://www.seancull.co.uk/public/seancull.nsf/dx/getting-the-xpage-extension-library-name-pickers-to-show-more-than-50-names.htm">Sean Cull blogged</a>.</li>
</ul>
<p>Looking at the functionality provided, it should be possible to extend the Value Picker or Name Picker to add paging which would pass back start and count options via an AJAX request. Those who saw my session at IBM Connect or the <a href="https://www.youtube.com/watch?v=LBtubRN_EaU">video on YouTube of the final demo</a> from it will know that I&#8217;ve had some experience doing that. Though that&#8217;s beyond the scope of this tutorial.</p>
<p>So the code for the readEntries method is:</p>
<p><code>public IPickerResult readEntries(IPickerOptions options) {<br />
String startKey = options.getStartKey();<br />
String key = options.getKey();<br />
int start = options.getStart();<br />
int count = options.getCount();<br />
int searchIndex = 0;<br />
List opts = filteredOptions(key, startKey, start, searchIndex);<br />
List entries = new ArrayList();<br />
for (String opt : opts) {<br />
entries.add(new SimplePickerResult.Entry(opt, opt));<br />
}<br />
return new SimplePickerResult(entries, -1);<br />
}</code></p>
<p>So first we extract the options passed in. We then call a method filteredOptions(), passing in the various criteria to return a list of just the options we want to display. I&#8217;ll come back to that shortly, but initially it will be the same as the options_ variable we initialised the ListPicker with. We then crerate a new ArrayList, loop through the filtered options and create a SimplePickerResult.Entry object for each. Entry is a class within the SimplePickerResult class, and the constructor takes two parameters &#8211; a label and a value. For these collections the value and the label are the same, so both parameters are the same. Finally we return a new SimplePickerResult object that holds the values. In the examples I found in the Extension Library the second parameter is always -1, so that&#8217;s what is passed in here.</p>
<p>So now to the filteredOptions method. This just takes the options_ variable and filters it depending on those IPickerOptions that were passed in:</p>
<p><code>private List filteredOptions(String key, String startKey, int start, int searchIndex) {<br />
List retVal = new ArrayList();<br />
int first = -1;<br />
if (StringUtil.isNotEmpty(key)) {<br />
// We've got a typeahead key passed in, jump to first entry beginning with that key<br />
for (int i = 0; i &lt; options_.size(); i++) {<br />
if (StringUtil.startsWithIgnoreCase(options_.get(i), key)) {<br />
first = i;<br />
break;<br />
}<br />
}<br />
if (first &gt;= 0) {<br />
// And add entries that start with the key<br />
for (int i = first; i &lt; options_.size(); i++) {<br />
if (StringUtil.startsWithIgnoreCase(options_.get(i), key)) {<br />
retVal.add(options_.get(i));<br />
}<br />
}<br />
}<br />
} else if (StringUtil.isNotEmpty(startKey)) {<br />
// We've got a search key passed in, jump to that entry<br />
for (int i = 0; i &lt; options_.size(); i++) {<br />
if (options_.get(i).compareToIgnoreCase(startKey) &gt;= 0) {<br />
first = i;<br />
break;<br />
}<br />
}<br />
if (first &gt;= 0) {<br />
// And add all remaining entries<br />
for (int i = first; i &lt; options_.size(); i++) {<br />
retVal.add(options_.get(i));<br />
}<br />
}<br />
} else {<br />
retVal.addAll(options_);<br />
}<br />
return retVal;<br />
}</code></p>
<p>First we create a return variable retVal, an ArrayList to put our filtered options into. Then we have three checks: if key is not empty, is startKey is not empty, or if they&#8217;re both empty. The last option is what&#8217;s going to be true the first time the user clicks on the Value Picker icon &#8211; they haven&#8217;t initiated typeahead (key) or done a search in the Value Picker (startKey). In that case (right near the bottom) we just add all to our return variable.</p>
<p>The first if statement runs if key is not empty, so the user is typing into an Edit Box and triggering typeahead. In this case we only want to return any entries that match exactly the letters typed in. If the letters are found, we set <em>first</em> to that entry&#8217;s index. If first is greater than or equal to zero (it&#8217;s been initialised to -1), we then add that and any subsequent entries starting with the letters typed in by the user.</p>
<p>The second if statement run if startKey is not empty, so the user is entering a search into the Value Picker dialog itself. First it compares lexicographically each option to the startKey, that means that in a dictionary and ignoring case sensitivity, does it come before (less than zero), at the same place (zero) or after (greater than zero). So we set <em>first</em> to the entry that matches the search criteria, begins with the letters typed, or is the closest after the letters typed. We then get all subsequent entries.</p>
<p>Let me just give an example for the startKey scenario. Say we have a List with entries &#8220;apple&#8221;, &#8220;banana&#8221;, &#8220;grape&#8221; and &#8220;plum&#8221;. When the Value Picker is first shown, the user sees all four. If the user types &#8220;grape&#8221; or &#8220;GRAPE&#8221; or &#8220;Grape&#8221; in the search box and searches, they get a list comprising &#8220;grape&#8221; and &#8220;plum&#8221;. If the user types &#8220;ba&#8221; and searches, they get &#8220;banana&#8221;, &#8220;grape&#8221; and &#8220;plum&#8221; because banana comes after ba in a dictionary. The fact that banana starts with the letters the user is searching on is irrelevant. Equally if they type &#8220;nectarine&#8221; and search, they get &#8220;plum&#8221;, because nectarine is not in the list and plum is the next entry alphabetically that is in the list.</p>
<p>So the readEntries() method gets entries for the user to select from. Now onto the loadEntries() method. This is used when the Value Picker dialog is launched to identify which options in the dialog have already been selected. That&#8217;s so they can be highlighted. Here is the code we use:</p>
<p><code>public List loadEntries(Object[] values, String[] attributes) {<br />
List entries = new ArrayList();<br />
if (null != values) {<br />
for (int i = 0; i &lt; values.length; i++) {<br />
String checkStr = values[i].toString();<br />
if (StringUtil.isNotEmpty(checkStr)) {<br />
for (String option : options_) {<br />
if (checkStr.equals(option)) {<br />
break;<br />
}<br />
}<br />
entries.add(new SimplePickerResult.Entry(checkStr, checkStr));<br />
}<br />
}<br />
}<br />
return entries;<br />
}</code></p>
<p>This takes two parameters, an array of objects called values and a String array attributes. Attributes is not used in the examples I&#8217;ve seen and not used here. The array of objects is the one or more elements from the list that were previously selected. If it&#8217;s null, we don&#8217;t have to do anything, because nothing has ever been selected before. Otherwise, for each entry in the values array we get it as a String, then loop through the options_ List and try to find each previously selected value. If we can, we add it to the entries ArrayList as a new SimplePickerResult.Entry. As before, the label and value are the same, so both parameters for the SimplePickerResult.Entry are the same.</p>
<p>Put this all together and we have a generic class that can be used as a dataProvider for any List or Set for a Value Picker on any page of the database. But how do we call it. First we need the List or Set. That could be provided in a number of ways. Explicitly in the code for the dataProvider; in a viewScope variable; in a dataContext; or in an xe:objectData datasource. We then just need to compute the dataProvider property of the Value Picker, creating a new ListPicker object and passing in the List or Set using the variable name from the viewScope variable, dataContext or datasource, like so:</p>
<p><code>${javascript:new org.openntf.pickerdata.ListPicker(myValuesSet)}</code></p>
<p>Now we have a fully working dataProvider. You can find the full code on <a href="http://openntf.org/XSnippets.nsf/snippet.xsp?id=listpicker-dataprovider-for-value-picker">XSnippets</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.intec.co.uk/java-and-selections-part-six-value-picker-solution-continued/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Java and Selections Part Five: Value Pickers Solution</title>
		<link>http://www.intec.co.uk/java-and-selections-part-five-value-pickers-solution/</link>
		<comments>http://www.intec.co.uk/java-and-selections-part-five-value-pickers-solution/#comments</comments>
		<pubDate>Wed, 08 May 2013 12:46:43 +0000</pubDate>
		<dc:creator>paulwithers</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[selections tutorial]]></category>
		<category><![CDATA[XPages]]></category>

		<guid isPermaLink="false">http://www.intec.co.uk/?p=3198</guid>
		<description><![CDATA[So we&#8217;ve added our Value Picker to the XPage, bound the component to an Edit Box or Dojo List Text Box or some other control that&#8217;s bound to a field on a Notes Document or viewScope variable. Now we&#8217;re ready to go. A dataProvider for a Value Picker needs to implement the Java class com.ibm.xsp.extlib.component.picker.data.IValuePickerData (implement [...]]]></description>
				<content:encoded><![CDATA[<p>So we&#8217;ve added our Value Picker to the XPage, bound the component to an Edit Box or Dojo List Text Box or some other control that&#8217;s bound to a field on a Notes Document or viewScope variable. Now we&#8217;re ready to go.</p>
<p>A dataProvider for a Value Picker needs to implement the Java class com.ibm.xsp.extlib.component.picker.data.IValuePickerData (<em>implement</em> not <em>extend</em>). I also needed to implement Serializable, just like we do with a bean. IValuePickerData is an Extension Library class, so the source code is freely available on <a href="http://extlib.openntf.org">the OpenNTF project</a> and you can look at it in Eclipse. When you import the Extension Library source code into Eclipse there are quite a few Eclipse plug-in projects involved, so the plug-in project you want to look at is com.ibm.xsp.extlib.controls. Expand the src folder and look in the package com.ibm.xsp.extlib.component.picker.data.</p>
<p>First off, you&#8217;ll see IPickerData is not a Java class but a Java <em>interface</em>. If you&#8217;re relatively new to Java, you may not know the difference. An interface defines a set of properties and methods that any Java class based on this interface <strong>must</strong> implement. It specifies the property data types and method names, parameters and return types. But there is no code in the methods in the interface. It&#8217;s effectively a schema that says &#8220;You must include these methods and I don&#8217;t care your code actually does, as long as it takes these parameters and returns this type of object&#8221;. The Extension Library does provide example implementations of the IValuePickerData interface, including both the SimpleValuePickerData and the BeanValuePickerData. And there is also the example in the Extension Library Demo database.</p>
<p>There are four methods that have to be implemented:</p>
<p><strong>getSourceLabels()</strong> takes no parameters and returns a String array. This is used by the Name Picker to define labels for each dataProvider, because the NamePickerAggregatorData allows you to add multiple dataProviders, for which you need to give a label so the user knows which is which. The Value Picker only allows one dataProvider, so we can just return null, like the two examples available.</p>
<p><strong>hasCapability()</strong> takes an int parameter and returns a boolean. SimpleValuePickerData returns false in all cases whereas BeanValuePickerData calls a hasCapability(int) method of the underlying bean. Looking at the interface, it appears this is used to check what functionality can be applied to the Value Picker &#8211; label, search by key, extra attributes, search list, multiple sources, multiple aggregation. The DominoViewValuePickerData class (extended eventually from AbstractDominoViewValuePickerData class) provides all except multiple aggregation. The NamePickerAggregatorData class provides only multiple sources.</p>
<p><strong>readEntries()</strong> takes an IPickerOptions object and returns an IPickerResult object. This is used to retrieve the values the user can select from. This is the first method we&#8217;ll implement.</p>
<p><strong>loadEntries()</strong> takes two parameters, an array of Objects and an array of Strings. It returns a List of IPickerEntry objects. This appears to be used to validate the component the Value Picker is bound to, if validation is done, or to highlight the already selected entry / entries when the Value Picker dialog is presented to the user. This is the other method we&#8217;ll implement.</p>
<p>In the example of the BeanValuePicker in the Extension Library demo database, the readEntries() and loadEntries() methods both explicitly go to the States properties file and load the contents. But the aim here is to make it generic, to be able to specify the contents and load them accordingly to return the right kinds of objects.</p>
<p>So the first step is to add a new property, then create not only the default constructor for the class, but also two more as below:</p>
<p><code>private List options_ = null;</p>
<p>public ListPicker() {<br />
}</p>
<p>public ListPicker(List options) {<br />
options_ = options;<br />
}</p>
<p>public ListPicker(Set options) {<br />
options_ = new ArrayList(options);<br />
}<br />
</code></p>
<p>So we have two additional constructors. The first takes a List and the second a Set. That&#8217;s because they are different underlying Java classes, so we can&#8217;t just pass in our TreeSet to the ListPicker(List) constructor. Nor can we pass in the ArrayList to the ListPicker(Set) constructor. But the ListPicker(Set) constructor converts the Set to an ArrayList, so we have a consistent approach.</p>
<p>Next we&#8217;ll go on to creating the readEntries() and loadEntries() methods and bind the ListPicker to our XPage.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.intec.co.uk/java-and-selections-part-five-value-pickers-solution/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Java and Selections Part Four: Value Pickers Introduction</title>
		<link>http://www.intec.co.uk/java-and-selections-part-four-value-pickers-introduction/</link>
		<comments>http://www.intec.co.uk/java-and-selections-part-four-value-pickers-introduction/#comments</comments>
		<pubDate>Tue, 07 May 2013 13:21:19 +0000</pubDate>
		<dc:creator>paulwithers</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[selections tutorial]]></category>
		<category><![CDATA[XPages]]></category>

		<guid isPermaLink="false">http://www.intec.co.uk/?p=3196</guid>
		<description><![CDATA[The Extension Library brings a new control to the party, the Value Picker. This gives the user an image or link that spawns a dialog from which they can select one or more options and even search for options. (The Value Picker itself doesn&#8217;t differentiate whether or not multiple items can be selected. That&#8217;s handled [...]]]></description>
				<content:encoded><![CDATA[<p>The Extension Library brings a new control to the party, the Value Picker. This gives the user an image or link that spawns a dialog from which they can select one or more options and even search for options. (The Value Picker itself doesn&#8217;t differentiate whether or not multiple items can be selected. That&#8217;s handled by the component into which the selected values are stored and to which the Value Picker is bound. Logically speaking, the Value Picker is bound to a component &#8211; an Edit Box, a Dojo List Text Box etc. &#8211; which is bound to a field on a document or a property in a bean.)</p>
<p>The Value Picker, like the Name Picker, does not take a selectItems component as its source but rather a dataProvider. Why take a different approach? The selectItems component doesn&#8217;t permit any searching or &#8220;starts with&#8221; functionality, which is included in dataProviders. There are three dataProviders available  to choose from for a Value Picker:</p>
<ul>
<li><span class="Apple-style-span" style="line-height: 13px;">dominoViewValuePicker, allowing the developer to map to a Domino view.</span></li>
<li>simpleValuePicker, taking a String of options. Properties allow the developer to define whether searching is case insensitive, what the separator between labels and their respective values is, and what the separator between each value is.</li>
<li>beanValuePicker, where you can create a Java bean where you code methods to retrieve the values and handle searching.</li>
</ul>
<p>Sometimes you don&#8217;t want to or can&#8217;t create a specific view from which to get the options. You won&#8217;t be able to create a view if you&#8217;re picking options from a keyword document. If, for example, you have country documents with a geographic region defined and you want to restrict to a previously-selected geographic region, you won&#8217;t want to create a separate view for each geographic region and you can&#8217;t pre-select all entries based on a key.</p>
<p>None of these dataProviders takes a Java collection as its source, so we have to get a little more sophisticated. The option with the lowest level of complexity would appear to be the simpleValuePicker. But although this is the easiest, it&#8217;s not going to perform very well, because you need to take your ArrayList or TreeSet or other collection and convert it to a String. And what if you&#8217;re working dynamically from documents under a specific category and a lot of documents get added? What are the limits, and how do you work around them? Plus (ideally) you&#8217;re wanting to constantly build your expertise, so you want to look at the beanValuePicker.</p>
<p>First off, the beanValuePicker is not the easiest of beasts to understand. Also, the examples in the Extension Library demo database are rather hard-coded. The beanValuePicker there works only with states. There&#8217;s nothing that gets passed in to determine the source. There are no properties you can set to make it more generic. But if you want to pick from keywords documents, for example, that&#8217;s exactly what you want: something generic that you can pass a key to and get the options for.</p>
<p>Thankfully, Toby Samples pointed me in the right direction by saying the dataProvider can be computed &#8211; just like virtually everything else in XPages. So in the next article I&#8217;ll explain the key methods of a dataProvider and how to extend it to make it more flexible by passing in a collection.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.intec.co.uk/java-and-selections-part-four-value-pickers-introduction/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Java and Selections Part Three: Core Controls and Sorted Lists</title>
		<link>http://www.intec.co.uk/java-and-selections-part-three-core-controls-and-sorted-lists/</link>
		<comments>http://www.intec.co.uk/java-and-selections-part-three-core-controls-and-sorted-lists/#comments</comments>
		<pubDate>Fri, 03 May 2013 23:48:25 +0000</pubDate>
		<dc:creator>paulwithers</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[selections tutorial]]></category>
		<category><![CDATA[XPages]]></category>

		<guid isPermaLink="false">http://www.intec.co.uk/?p=3190</guid>
		<description><![CDATA[Ok. So we&#8217;ve seen we can pass a Vector or an ArrayList into a selectItems control for a Combo Box or Radio Button. And we&#8217;ve seen we can pass it via SSJS or EL (but EL is slightly more efficient). That&#8217;s all well and good if your options are already unique and already sorted. But [...]]]></description>
				<content:encoded><![CDATA[<p>Ok. So we&#8217;ve seen we can pass a Vector or an ArrayList into a selectItems control for a Combo Box or Radio Button. And we&#8217;ve seen we can pass it via SSJS or EL (but EL is slightly more efficient). That&#8217;s all well and good if your options are already unique and already sorted. But what if they&#8217;re not.</p>
<p>Well you could run an @Unique and a JavaScript sort once you&#8217;ve retrieved it. But part of the point of using Java is better performance, easier debugging and avoiding coding directly on your XPages. Remember that our getKeyEnts() method got values from a keyword. Consider if we&#8217;re using the same kind of code multiple places in our application and we refactory the getKeyEnts() method to call a static getKeyVals(String) method in a utilities Java class. We&#8217;d need to code our @Unique and JavaScript sort every single time, rather than putting it in that one static method.</p>
<p>(Just to deconstruct that for newer Java developers, this means a getKeyVals method that takes a String parameter and is stored in a utilities class. By making the method static, we can call it by just using <em>myClass.getKeyVals(keyStr)</em> instead of creating an instance of myClass first.Utilities classes tend to contain static methods.)</p>
<p>So we need to look for an equivalent to @Unique and sort in Java, don&#8217;t we. No, we don&#8217;t. Because I started the introduction by mentioning that cheat sheet of <a href="http://www.janeve.me/articles/which-java-collection-to-use">Java Collections</a>. I&#8217;ve put the link here again in case you didn&#8217;t download it yet. Go and do it. Note the columns Ordering and Allow Duplicates. And notice the row for TreeSet, especially the notes:</p>
<p><strong>A very nice alternative for ArrayList if<br />
**Do not want repetitions<br />
** Sorted order</strong></p>
<p>A Set, like a List, contains only values, no keys. So yes, this gives us exactly what we want, out of the box.</p>
<p>Almost.</p>
<p>Because you can&#8217;t put a TreeSet directly into a selectItems control. So we need to convert the TreeSet to something that can be put it in the control. And this is also where I come back to the mental block I was having that there is no Java class called java.util.Array. Time for more code:</p>
<p><code>public String[] getKeyObj() {<br />
Database currDb = ExtLibUtil.getCurrentDatabase();<br />
View vwUser = currDb.getView("Keywords");<br />
ViewEntry ent = vwUser.getEntryByKey("ACQUIRED SKILLS", true);<br />
Vector&lt;String&gt; users = (Vector&lt;String&gt;) ent.getColumnValues().get(1);<br />
TreeSet&lt;String&gt; test = new TreeSet(users);<br />
String[] retVal = new String[test.size()];<br />
retVal = test.toArray();<br />
return retVal;<br />
}</code></p>
<p>There is no Java class called java.util.Array because String[] is the notation for a String array. We create a new TreeSet passing the Vector into the constructor &#8211; the same syntax would be used for an ArrayList and we would use new ArrayList() to initialise it blank. The good news is that by passing the Vector into the TreeSet it automatically de-dupes and sorts. We then create a new String array sized to the number of entries in the TreeSet. Finally we pass into the array test.toArray(). Simple and extremely powerful.</p>
<p>This handles all the core controls. But what if we want to use a ValuePicker. That&#8217;s a bit more complicated, but I&#8217;ll leave that for next time.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.intec.co.uk/java-and-selections-part-three-core-controls-and-sorted-lists/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Java for Selections Part Two: Core Controls and Lists</title>
		<link>http://www.intec.co.uk/java-for-selections-part-two-core-controls-and-lists/</link>
		<comments>http://www.intec.co.uk/java-for-selections-part-two-core-controls-and-lists/#comments</comments>
		<pubDate>Fri, 03 May 2013 23:16:52 +0000</pubDate>
		<dc:creator>paulwithers</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[selections tutorial]]></category>
		<category><![CDATA[XPages]]></category>

		<guid isPermaLink="false">http://www.intec.co.uk/?p=3184</guid>
		<description><![CDATA[So enough of the introduction, onto passing some Java to selectors. There are two types of Collections you may have &#8211; Lists and Maps. Lists just have values. Maps have keys and values. So if you want the label and the value to be the same, use a List. If you want a different label [...]]]></description>
				<content:encoded><![CDATA[<p>So enough of the introduction, onto passing some Java to selectors.</p>
<p>There are two types of Collections you may have &#8211; Lists and Maps. Lists just have values. Maps have keys and values. So if you want the label and the value to be the same, use a List. If you want a different label and value, use a Map, with label in the key and value in the values.</p>
<p>I&#8217;m going to start simple with Lists and start at the basic level with core controls. This is also relevant to the Dojo controls like Dojo Filtering Select, Dojo Radio Button. That&#8217;s because all these controls take an xp:selectItems complex type as its value. If you&#8217;re like me, the most common use case is retrieving values from a field in a keyword document, either from the document itself or from column values &#8211; the equivalent of an @DbLookup(). The other most likely use case will be iterating through categories in  a view and outputting category titles &#8211; the equivalent of an @DbColumn().</p>
<p>As you&#8217;re probably aware, the output of both of the SSJS ways of doing this is an Array. The obvious route I took was looking for a Java class for that. But there is no java.util.Array and this threw me for quite a while when trying to reproduce one-to-one. The good news is you can just pass in an ArrayList&lt;String&gt; or a Vector&lt;String&gt;. For those just starting out on Java, this means an ArrayList or Vector which contains String values. Vector is the stock collection output of Domino objects, whereas ArrayList is the standard basic Java collection object that replaced Vector. You can even use Vector&lt;Object&gt;, although I suspect it will only work if each value is actually a String.</p>
<p>So time for some code:</p>
<p><code>public Vector&lt;Object&gt; getKeyEnts() {<br />
Database currDb = ExtLibUtil.getCurrentDatabase();<br />
View vwUser = currDb.getView("Keywords");<br />
ViewEntry ent = vwUser.getEntryByKey("ACQUIRED SKILLS", true);<br />
Vector&lt;Object&gt; users = (Vector&lt;Object&gt;) ent.getColumnValues().get(1);<br />
return users;<br />
}</code></p>
<p>So we&#8217;re going to the Keywords view in the current database, getting the entry with the key &#8220;ACQUIRED SKILLS&#8221; and returning column 2 (remember the index starts at 0). Then in the XPage, we call it like so:</p>
<p><code>&lt;xp:comboBox id="comboBox1"&gt;<br />
&lt;xp:selectItems&gt;<br />
&lt;xp:this.value&gt;&lt;![CDATA[${javascript:pageController.getKeyEnts()}]]&gt;&lt;/xp:this.value&gt;<br />
&lt;/xp:selectItems&gt;<br />
&lt;/xp:comboBox&gt;</code></p>
<p>So I&#8217;m calling via SSJS the getKeyEnts() method I showed above, which is in my pageController bean. I could streamline the code even further by use <code>${pagerController.keyEnts}</code> to call the method. The clever bit here is that there is no keyEnts property in my bean. Because value is a property of selectItems, it expects a valueBinding &#8211; that is a binding to a Java property rather than a methodBinding which is a binding from an event to a Java method. The valueBinding automatically looks for a method starting get and appending the property, replacing the lower-case first letter with an upper-case. So the getter for keyEnts property will be get + KeyEnts = getKeyEnts().</p>
<p>So Vectors and ArrayLists can automatically be thrown at any selectItems control, whether for a Combo Box, a Radio Button or even a Dojo FilteringSelect. They will give you a list of options in the order the list was populated, where the label and the value are the same.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.intec.co.uk/java-for-selections-part-two-core-controls-and-lists/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Java for Selections Part One: Introduction</title>
		<link>http://www.intec.co.uk/java-for-selections-part-one-introduction/</link>
		<comments>http://www.intec.co.uk/java-for-selections-part-one-introduction/#comments</comments>
		<pubDate>Fri, 03 May 2013 11:52:41 +0000</pubDate>
		<dc:creator>paulwithers</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[selections tutorial]]></category>
		<category><![CDATA[XPages]]></category>

		<guid isPermaLink="false">http://www.intec.co.uk/?p=3182</guid>
		<description><![CDATA[It&#8217;s no surprise that, despite coming from a background of minimal Java in the days before XPages, I now use Java as my main language in XPages back-end coding. There are a few areas where I&#8217;ve had to put my thinking cap on to work out how to use Java correctly when mapping between components [...]]]></description>
				<content:encoded><![CDATA[<p>It&#8217;s no surprise that, despite coming from a background of minimal Java in the days before XPages, I now use Java as my main language in XPages back-end coding. There are a few areas where I&#8217;ve had to put my thinking cap on to work out how to use Java correctly when mapping between components and Domino, not least in number handling and Collections. Some time ago I put out a <a href="http://www.intec.co.uk/mapping-java-collections/">blog post</a> of a useful <a href="http://www.janeve.me/articles/which-java-collection-to-use">cheat sheet</a> for the plethora of core Collections objects available.</p>
<p>Those Collections are very useful for managing content, but sometimes it&#8217;s not obvious how to provision those Collections for selection components such as Combo Box, Radio Button, Value Picker etc. In this series I plan on covering those, some of which are easier than others, and include a set of PickerData classes that can be used once in an app, dynamically mapping to a collection you pass in.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.intec.co.uk/java-for-selections-part-one-introduction/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Social Business Use Cases &#8211; Product Development</title>
		<link>http://www.intec.co.uk/social-business-cases-product-development/</link>
		<comments>http://www.intec.co.uk/social-business-cases-product-development/#comments</comments>
		<pubDate>Sun, 28 Apr 2013 18:37:29 +0000</pubDate>
		<dc:creator>intec</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[collaboration software]]></category>
		<category><![CDATA[Social Business]]></category>

		<guid isPermaLink="false">http://www.intec.co.uk/?p=3177</guid>
		<description><![CDATA[Business Use Cases – Product Development By removing barriers between people, a successful Social Business can quickly and cost-effectively bring new solutions to market and better meet customer needs. By using social platforms for co-creation, Social Businesses can engage a larger community beyond their own R&#038;D staff. This helps to resolve product development challenges that [...]]]></description>
				<content:encoded><![CDATA[<p><iframe width="420" height="315" src="http://www.youtube.com/embed/O6eB80jRlK4" frameborder="0" allowfullscreen></iframe></p>
<p>Business Use Cases – Product Development</p>
<p>By removing barriers between people, a successful Social Business can quickly and cost-effectively bring new solutions to market and better meet customer needs.</p>
<p>By using social platforms for co-creation, Social Businesses can engage a larger community beyond their own R&#038;D staff. This helps to resolve product development challenges that are too big for in-house resources to handle themselves. In ‘crowd-sourcing’ for example, a wide range of participants are asked to submit ideas, which are then evaluated, often by the crowd itself.</p>
<p>Social Business can help organisations to increase revenue by responding to markets faster and with more innovations. It provides an effective means to create and engage distributed product teams in an easily manageable way. These communities can work via a common dashboard with complete visibility across project details and people skills. This increased visibility across multiple work-streams eliminates silos, reduces project overlaps (which waste resources) and enables re-use of improved practices across communities.</p>
<p>Being a Social Business will also bring increased process innovation. For example CEMEX, a global cement supplier, created a social network to accelerate new product development through open collaboration among 20,000 employees. This resulted in a new global brand of cement mix being delivered in less than 4 months, compared to 12.</p>
<p><strong>This article was taken from Intec&#8217;s whitepaper &#8211; Social Business &#8211; Connect.Collaborate.Compete.</strong></p>
<p>For more information or to talk to Intec about Social Business Collaboration Software visit <a href="http://www.intec.co.uk/software-solutions/collaboration-solutions/ " title="Social Business Whitepaper link" target="_blank">http://www.intec.co.uk/software-solutions/collaboration-solutions/ </a> or call +44(0)1252 775400</p>
]]></content:encoded>
			<wfw:commentRss>http://www.intec.co.uk/social-business-cases-product-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IBM Collaboration Solutions Community Meeting</title>
		<link>http://www.intec.co.uk/ibm-collaboration-solutions-community-meeting/</link>
		<comments>http://www.intec.co.uk/ibm-collaboration-solutions-community-meeting/#comments</comments>
		<pubDate>Mon, 22 Apr 2013 21:14:52 +0000</pubDate>
		<dc:creator>paulwithers</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Domino]]></category>
		<category><![CDATA[org.openntf.domino]]></category>
		<category><![CDATA[XPages]]></category>

		<guid isPermaLink="false">http://www.intec.co.uk/?p=3170</guid>
		<description><![CDATA[Tomorrow (April 23rd) I will be speaking on the IBM Collaboration Solutions Community Meeting at 3pm BST (10am ET). The topic of this month&#8217;s meeting is XPages. The main part of the community meeting will see Abby Butts and Sam Bridegroom talking about how they have used XPages to develop applications to benefit a not-for-profit [...]]]></description>
				<content:encoded><![CDATA[<p>Tomorrow (April 23rd) I will be speaking on the <a href="https://www-304.ibm.com/connections/blogs/socialbusiness/entry/april_10_2013_8_28_pminvitation_ibm_collaboration_solutions_community_webcast_xpages_a_remedy_for_the_healthcare_industry?lang=en_us">IBM Collaboration Solutions Community Meeting</a> at 3pm BST (10am ET). The topic of this month&#8217;s meeting is XPages. The main part of the community meeting will see Abby Butts and Sam Bridegroom talking about how they have used XPages to develop applications to benefit a not-for-profit healthcare system. In the community member spotlight I&#8217;ll briefly talk about org.openntf.domino, a project that has got those of us involved in it enthused about the benefits and possibilities and has been well-received by a number of early adopters.</p>
<p>Since the release one of the significant enhancements is transactional processing by Nathan T Freeman. We&#8217;re also now a step forward in providing access from SSJS to all the new methods, though there is still quite a bit of work to do on that. Part of that work has also proven the method for accessing the code from XPages. As a result, work has begun on a demo database. With the help of various developers in our chat and some open source Java projects (one of the benefits of XPages being closely coupled to Java), I&#8217;ve included a couple of nice features:</p>
<ul>
<li>To display on an XPage a method&#8217;s code from a text-file copy of the relevant classes.</li>
<li>To compare the code using lotus.domino packages and org.openntf.domino packages, showing what code is no longer required and added.</li>
</ul>
<p>I&#8217;ve recorded a preview of the demo database. The aim is that, with the JavaDoc, this will highlight new or changed functionality, how to implement it, and why to use org.openntf.domino.</p>
<p><iframe src="http://www.youtube.com/embed/IH8T-RvyFz8" height="360" width="640" allowfullscreen="" frameborder="0"></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://www.intec.co.uk/ibm-collaboration-solutions-community-meeting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Notes 9 @Functions</title>
		<link>http://www.intec.co.uk/new-notes-9-functions/</link>
		<comments>http://www.intec.co.uk/new-notes-9-functions/#comments</comments>
		<pubDate>Sun, 21 Apr 2013 13:55:08 +0000</pubDate>
		<dc:creator>paulwithers</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Domino Designer]]></category>
		<category><![CDATA[XPages]]></category>

		<guid isPermaLink="false">http://www.intec.co.uk/?p=3168</guid>
		<description><![CDATA[With the inclusion of the Extension Library as core in Notes and Domino 9, there are eleven new @Functions provided for SSJS. They can be found in the Designer Help in IBM Domino Designer User Guide > Designing XPages Applications > Adding Controls from the XPages Extension Library > @Function (Extension Library). Note, you will [...]]]></description>
				<content:encoded><![CDATA[<p>With the inclusion of the Extension Library as core in Notes and Domino 9, there are eleven new @Functions provided for SSJS. They can be found in the Designer Help in IBM Domino Designer User Guide > Designing XPages Applications > Adding Controls from the XPages Extension Library > @Function (Extension Library). Note, you will not find these @Functions listed alongside the other XPages @Functions, so if you use search scopes in the Eclipse-based help, you&#8217;ll need to add this section.</p>
<p>And you&#8217;ll want to, because they are very useful if you use a lot of SSJS. Some of them fall into distinct groups.</p>
<p>The first I&#8217;ll cover are @Functions for posting to xp:message (Display Error) and xp:messages (Display Errors) controls. They are @InfoMessage, @WarningMessage and @ErrorMessage. They each add messages for the user, great for error or other message handling. For those starting out on using Java, they&#8217;re also very useful to review because you can download the Extension Library and see what is happening under the hood. As with the others, they&#8217;re in the NotesFunctionsEx class of the com.ibm.xsp.extlib.javascript package of the com.ibm.xsp.extlib.domino plugin project. They each call FacesContext.addMessage(), each adding a message with a different severity &#8211; SEVERITY_INFO, SEVERITY_WARN and SEVERITY_ERROR.</p>
<p>The second group of @Functions are for URL handling &#8211; @AbsoluteUrl, @EncodeUrl, @FullUrl and @IsAbsoluteUrl. @FullUrl provides the URL for the resource relative to the server, @AbsoluteUrl includes the server host name and protocol. For those getting started with XPages, @AbsoluteUrl, @EncodeUrl and @FullUrl call static methods in the NotesFunctionsEx method that can be called from Java &#8211; absoluteUrl(String), encodeUrl(String) and fullUrl(String). So you can call them from Java as well. The last one already exists in Java &#8211; com.ibm.xsp.util.FacesUtil.isAbsoluteUrl(String).</p>
<p>The remaining new @Functions are @NormalizeSubject, @TopParentID, @TopParentUNID and @ViewIconUrl. @NormalizeSubject is useful to return &#8220;Untitled&#8221; if the text passed in is blank or restrict it to a number of characters, by default 80. Again, there&#8217;s a Java method in the same class, normalizeSubject(String subject, int maxlength). @ViewIconUrl is useful for taking a view icon number and returning the URL for the relevant icon. That doesn&#8217;t have a specific static method, but there&#8217;s nothing stopping you using the code, if you want to use native Java.</p>
<p>The other point of this is to highlight the amount of code required to provide SSJS @Functions. For those 11 @Functions, the Java class is 599 lines long. We&#8217;re looking to provide the same functionality for the new methods in org.openntf.domino, and we currently have about 50 new methods. Needless to say, it takes quite a bit of work to extend them to SSJS. We&#8217;ve already added them for the DateTime class, but there are a number of others yet to do. But we want to get there.</p>
<p>So in the meantime enjoy the @Functions provided now out-of-the-box in Notes and Domino 9.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.intec.co.uk/new-notes-9-functions/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Will Social Business Be a Distraction?</title>
		<link>http://www.intec.co.uk/will-social-business-be-a-distraction/</link>
		<comments>http://www.intec.co.uk/will-social-business-be-a-distraction/#comments</comments>
		<pubDate>Sat, 20 Apr 2013 13:57:06 +0000</pubDate>
		<dc:creator>intec</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[collaboration software]]></category>
		<category><![CDATA[Social Business]]></category>

		<guid isPermaLink="false">http://www.intec.co.uk/?p=3166</guid>
		<description><![CDATA[Will Social Business be a distraction to my employees? Social Business provides a gateway for current and relevant information exchanges across geographies and organizational silos. Building trust and encouraging social interactions is key to driving social change in the workforce. A successful Social Business will not foster an environment whereby employees are constantly chatting to [...]]]></description>
				<content:encoded><![CDATA[<p>Will Social Business be a distraction to my employees?</p>
<p><iframe width="560" height="315" src="http://www.youtube.com/embed/D2MAUlW1no8" frameborder="0" allowfullscreen></iframe></p>
<p>Social Business provides a gateway for current and relevant information exchanges across geographies and organizational silos. Building trust and encouraging social interactions is key to driving social change in the workforce.</p>
<p>A successful Social Business will not foster an environment whereby employees are constantly chatting to their Facebook friends.</p>
<p>It is not about wasting time but about saving time and increasing efficiency, although trust is a key element for success. An organisation needs a certain level of trust to empower its employees to share their ideas and expertise, and it must demonstrate this trust by rewarding the behaviour.</p>
<p>This article was taken from Intec&#8217;s whitepaper &#8211; Social Business &#8211; Connect.Collaborate.Compete.</p>
<p>For more information or to talk to Intec about Social Business Collaboration Software visit <a href="http://www.intec.co.uk/software-solutions/collaboration-solutions/" title="Collaboration Solutions">www.intec.co.uk/software-solutions/collaboration-solutions/</a></p>
<p>or call +44(0)1252 775400</p>
]]></content:encoded>
			<wfw:commentRss>http://www.intec.co.uk/will-social-business-be-a-distraction/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
