<?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, 03 May 2012 17:15:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>XPages Mobile Controls and Value Pickers Part Four: Server-Side Approach</title>
		<link>http://www.intec.co.uk/xpages-mobile-controls-and-value-pickers-part-three-server-side-approach/</link>
		<comments>http://www.intec.co.uk/xpages-mobile-controls-and-value-pickers-part-three-server-side-approach/#comments</comments>
		<pubDate>Thu, 03 May 2012 17:14:52 +0000</pubDate>
		<dc:creator>paulwithers</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Extension Library]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[XPages]]></category>

		<guid isPermaLink="false">http://www.intec.co.uk/?p=1980</guid>
		<description><![CDATA[I started off this tutorial series on mobile value picker with a discussion about some key differences between desktop browser development and mobile browser development. One of the key differentiators I discussed was connectivity. That was why this series has so far focussed on an approach that predominantly used Client-Side JavaScript and avoided interaction with [...]]]></description>
			<content:encoded><![CDATA[<p>I started off this tutorial series on mobile value picker with a discussion about some key differences between desktop browser development and mobile browser development. One of the key differentiators I discussed was connectivity. That was why this series has so far focussed on an approach that predominantly used Client-Side JavaScript and avoided interaction with the server as much as possible.</p>
<p>But when I first discussed the approach with David Leedy many weeks ago, his requirement was somewhat different. The users of his mobile application would always be connected; they would not be roaming; so connectivity was not an issue and avoiding server-side interaction was not a concern. I am sure his situation is not unique, so I have followed his advice and am going to cover a server-side approach.</p>
<p>The first thing worth noting is on the &#8220;user&#8221; mobile page itself. I&#8217;m going to jump to this because it will impact the changes for the rest of the XPage. Whereas for the client-side approach the default setting of <span style="color: #0000ff;">resetContent=&#8221;false&#8221;</span> was used, for the server-side approach the mobile page will take the setting <span style="color: #0000ff;">resetContent=&#8221;true&#8221;</span>. As a result, I also need to change the dominoDocument datasource settings. Because resetContent is true, I need to ensure the mobile page knows which document I&#8217;m dealing with when I switch to the value picker and come back. So the action property is <span style="color: #0000ff;">&#8220;editDocument&#8221;</span> instead of <span style="color: #0000ff;">&#8220;newDocument&#8221;</span> and the documentId is set to <span style="color: #0000ff;">&#8220;#{viewScope.documentId}&#8221;</span>.</p>
<p>As a result, there need to be two changes to the New User button and the links in the view of existing users. The first is that I&#8217;m not using the queryString and don&#8217;t have to forceFullRefresh. So the &#8220;Move To App Page&#8221; simple action just switches to the &#8220;user&#8221; mobile page. The second change is I need to set viewScope.documentId &#8211; to null on the New User button (code shown below) and to the current entry&#8217;s ID in the view.</p>
<p><a href="http://www.intec.co.uk/wp-content/uploads/2012/05/newUserAction.gif"><img class="alignnone size-full wp-image-1983" title="newUserAction" src="http://www.intec.co.uk/wp-content/uploads/2012/05/newUserAction.gif" alt="" width="770" height="139" /></a></p>
<p>On the Submit button on the user page, I then need to clear viewScope.documentId.</p>
<p>For the Select State button, previously I used Client-Side JavaScript to switch to the stateSelector mobile page. I&#8217;m assuming good connectivity, so I use a Server-Side event &#8211; again the &#8220;Move To App Page&#8221; simple action.</p>
<p>The final change is on the link for each state. Again, I&#8217;m assuming good connectivity, so using the &#8220;Move To App Page&#8221; simple action to switch back to the user page. I&#8217;m also executing Server-Side JavaScript to run <span style="color: #0000ff;">getComponent(&#8220;inputText3&#8243;).setValue(state.getColumnValue(&#8220;Key&#8221;))</span>. So I&#8217;m setting the value directly in the component before switching back to the mobile page. Because it&#8217;s in the same XPage, I can do that.</p>
<p>So the differences are very minor, but all highlighting the different approach &#8211; the first avoids server-side events as much as possible, the second embraces them. I&#8217;ve attached the code below, and if you want to compare them, I would strongly recommend that after you add the XPage to the sample application, you go to the Project Explorer view and navigate to the two XPages. Select them both (holding down Ctrl), right-click and select <strong>Compare With &#8211; Each Other&#8230;</strong>.</p>
<p><a href="http://www.intec.co.uk/wp-content/uploads/2012/05/Compare-With.gif"><img class="alignnone size-full wp-image-1984" title="Compare With" src="http://www.intec.co.uk/wp-content/uploads/2012/05/Compare-With.gif" alt="" width="594" height="119" /></a></p>
<p><a href="http://www.intec.co.uk/wp-content/uploads/2012/05/Mobile_ExistingUser_SSJS.txt">Mobile_ExistingUser_SSJS</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.intec.co.uk/xpages-mobile-controls-and-value-pickers-part-three-server-side-approach/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XPages Mobile Control and Value Pickers: NotesIn9 Edition</title>
		<link>http://www.intec.co.uk/xpages-mobile-control-and-value-pickers-notesin9-edition/</link>
		<comments>http://www.intec.co.uk/xpages-mobile-control-and-value-pickers-notesin9-edition/#comments</comments>
		<pubDate>Fri, 27 Apr 2012 09:18:50 +0000</pubDate>
		<dc:creator>paulwithers</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Extension Library]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[NotesIn9]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[XPages]]></category>

		<guid isPermaLink="false">http://www.intec.co.uk/?p=1977</guid>
		<description><![CDATA[To support the tutorial on Mobile Controls and client-side value pickers I created a video, which David Leedy has kindly published on NotesIn9. If you would like to see the full video, follow the link above.]]></description>
			<content:encoded><![CDATA[<p>To support the tutorial on Mobile Controls and client-side value pickers I created a video, which David Leedy has kindly published on <a href="http://NotesIn9.com/index.php/2012/04/24/notesin9-065-xpages-mobile-value-picker/">NotesIn9</a>.</p>
<p>If you would like to see the full video, follow the link above.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.intec.co.uk/xpages-mobile-control-and-value-pickers-notesin9-edition/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XPages Mobile Controls and Value Pickers Part Three: Client-Side Approach Extended</title>
		<link>http://www.intec.co.uk/xpages-mobile-controls-and-value-pickers-part-three-client-side-approach-extended/</link>
		<comments>http://www.intec.co.uk/xpages-mobile-controls-and-value-pickers-part-three-client-side-approach-extended/#comments</comments>
		<pubDate>Thu, 05 Apr 2012 21:11:05 +0000</pubDate>
		<dc:creator>paulwithers</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Extension Library]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[XPages]]></category>

		<guid isPermaLink="false">http://www.intec.co.uk/?p=1972</guid>
		<description><![CDATA[From some feedback to yesterday&#8217;s post, that code works fine if all you want to do is create a new document. So, I&#8217;ve gone away and come up with some amendments and improvements. First of all, I&#8217;ve moved the New User button into the Page Heading control&#8217;s action facet. Again I use the Move to [...]]]></description>
			<content:encoded><![CDATA[<p>From some feedback to yesterday&#8217;s post, that code works fine if all you want to do is create a new document. So, I&#8217;ve gone away and come up with some amendments and improvements.</p>
<p>First of all, I&#8217;ve moved the New User button into the Page Heading control&#8217;s action facet. Again I use the <strong>Move to Application Page</strong> simple action, setting targetPage to &#8220;user&#8221; and setting forceFullRefresh to &#8220;true&#8221;. It&#8217;s important to do this. Otherwise, the user will be editing the previous contact instead of creating a new one. The code for this button will look very familiar:</p>
<p><a href="http://www.intec.co.uk/wp-content/uploads/2012/04/New-User-Button.gif"><img class="alignnone size-full wp-image-1973" title="New User Button" src="http://www.intec.co.uk/wp-content/uploads/2012/04/New-User-Button.gif" alt="Mobile New User Button" width="601" height="236" /></a></p>
<p>Next I add a dataView control pointing to the AllContacts view. I&#8217;ve set to load 10 rows, but you&#8217;ll want to extend this to allow the user to add rows and save the state. If you&#8217;ve looked at the Discussion XL template, you&#8217;ll know exactly how to do that.</p>
<p>Instead of just adding a summaryColumn and setting the pageName property, I&#8217;ve added a panel to the detail facet. In that panel I&#8217;ve placed a Link control showing the contact&#8217;s name and email. I&#8217;ve added an onclick event to the Link setting forceFullRefresh to &#8220;true&#8221; and setting the targetPage to open the current document in edit mode, redirecting to the user page. If you&#8217;re relatively new to XPages, the Link text and targetPage may look strange, because I&#8217;m combining literal strings, Expression Language and Server-Side JavaScript. Read my blog post on <a href="http://www.intec.co.uk/breaking-the-language-barrier-the-rosetta-stone-of-xpages-languages/">combining languages</a> from a couple of years ago for more. So the code for the dataView is this:</p>
<p><a href="http://www.intec.co.uk/wp-content/uploads/2012/04/Mobile-DataView.gif"><img class="alignnone size-full wp-image-1974" title="Mobile DataView" src="http://www.intec.co.uk/wp-content/uploads/2012/04/Mobile-DataView.gif" alt="Mobile DataView" width="693" height="407" /></a></p>
<p>On the user page, resetContent is still set to &#8220;false&#8221;. The only difference here is a minor change on the State field. If the field is set with disabled as &#8220;true&#8221;, the value does not save into an existing field. If you wanted to prevent the user typing into the field, there are ways to do that, like adding code to the onfocus event of the field to move focus to the button.</p>
<p>The full new code is attached.</p>
<p><a href="http://www.intec.co.uk/wp-content/uploads/2012/04/Mobile_ExistingUser_CSJS.txt">Mobile Page for Editing and Creating Contact</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.intec.co.uk/xpages-mobile-controls-and-value-pickers-part-three-client-side-approach-extended/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XPages Mobile Controls and Value Pickers Part Two: Client-Side Approach</title>
		<link>http://www.intec.co.uk/xpages-mobile-controls-and-value-pickers-part-two-client-side-approach/</link>
		<comments>http://www.intec.co.uk/xpages-mobile-controls-and-value-pickers-part-two-client-side-approach/#comments</comments>
		<pubDate>Wed, 04 Apr 2012 22:20:50 +0000</pubDate>
		<dc:creator>paulwithers</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Extension Library]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[XPages]]></category>

		<guid isPermaLink="false">http://www.intec.co.uk/?p=1962</guid>
		<description><![CDATA[In Part One I talked in generic terms about the differing approaches when developing for mobile browsers compared to desktop browsers. Screen sizes make dialog boxes for pickers less desirable than in desktop browsers. Connectivity concerns mean typeahead and partial refresh functionality could perform worse on mobile devices and impact the user experience. Smaller resolutions [...]]]></description>
			<content:encoded><![CDATA[<p>In <a href="http://www.intec.co.uk/xpages-mobile-controls-and-value-pickers-part-one-mobile-development-approaches/">Part One</a> I talked in generic terms about the differing approaches when developing for mobile browsers compared to desktop browsers. Screen sizes make dialog boxes for pickers less desirable than in desktop browsers. Connectivity concerns mean typeahead and partial refresh functionality could perform worse on mobile devices and impact the user experience. Smaller resolutions can also make it harder to select from a standard Edit Box with typeahead enabled or ComboBox.</p>
<p>In this part I will demonstrate a predominantly client-side approach, picking options from a view. But the same technique could equally be used to select from a static list of options or options retrieved from a keyword document or Server-Side JavaScript / Java function. The database I&#8217;ll be using is the XPages Extension Library Demo database, creating a mobile interface to create a simple contact. The picker will select states.</p>
<p>The first step is to create an additional view in the database, because the AllStates view is not sorted. I&#8217;ve just created a copy of the view, switched the columns round, and sorted the Name column, as below:</p>
<p><a href="http://www.intec.co.uk/wp-content/uploads/2012/04/Copy-of-AllStates-View.gif"><img class="alignnone size-full wp-image-1964" title="Copy of AllStates View" src="http://www.intec.co.uk/wp-content/uploads/2012/04/Copy-of-AllStates-View.gif" alt="Copy of AllStates View" width="494" height="254" /></a></p>
<p>So now onto the Mobile Page. The code for the XPage is attached at the bottom of this post. A dominoDocument datasource is bound to the XPage and uses the Contact form, with action=&#8221;newDocument&#8221;.</p>
<p>The Single Page Application mobile control is added &#8211; the container for the mobile pages, with the selectedPageName set to &#8220;welcome&#8221;. The first Mobile Page control is added with the pageName &#8220;welcome&#8221;. This has a Page Heading control and a Static Line Item which will move to the &#8220;user&#8221; page. This will be the page for creating a new user. What we have so far is below:</p>
<p><a href="http://www.intec.co.uk/wp-content/uploads/2012/04/Mobile-Page-pt1.gif"><img class="alignnone size-full wp-image-1965" title="Mobile Page pt1" src="http://www.intec.co.uk/wp-content/uploads/2012/04/Mobile-Page-pt1.gif" alt="Mobile Page Part One" width="677" height="240" /></a></p>
<p>Another Single Page control is added. The key is ensuring resetContent is still set to &#8220;false&#8221; &#8211; we don&#8217;t want to reload the content every time we go to the page. Otherwise, we&#8217;ll lose all previously entered values. But this has other implications, as we will see later. Next a Single Page Heading and Form Table control are added. The details for most are not important. The focus at this point is on formRow4. The Edit Box with id inputText3 has disabled set to &#8220;true&#8221;, so the user cannot type into the field but a value can be written to it via Client-Side JavaScript and stored via the value binding to document1.State. This is standard functionality that might equally be seen in an XPage designed for desktop browsers.</p>
<p>Alongside the Edit Box, a Button is added. When designing for desktop browsers this would launch the Value Picker, but here it just runs Client-Side JavaScript to set <span style="color: #000080;">location.href=&#8221;#stateSelector&#8221;</span>. If you&#8217;ve used the Mobile Controls much (or the Dynamic Content controls &#8211; the concept is the same for both), you will have noticed that anchor tags (the #) are used to navigate between areas of the page. So setting <span style="color: #000080;">location.href=&#8221;#stateSelector&#8221;</span> is the same as setting moveTo on a Page Heading or Static Line Item control, and moves to the stateSelector Mobile Page. formRow4 looks like this:<a href="http://www.intec.co.uk/wp-content/uploads/2012/04/Mobile-Page-State-Row.gif"><img class="alignnone size-full wp-image-1966" title="Mobile Page State Row" src="http://www.intec.co.uk/wp-content/uploads/2012/04/Mobile-Page-State-Row.gif" alt="Mobile Page formRow4" width="677" height="171" /></a></p>
<p>For the moment, skip directly to the stateSelector Mobile Page, which is the interface to allow the user to select states. In normal XPages desktop browser interface, this is what would be the Value Picker. The Mobile Page contains a Page Heading, with the Back button given the label &#8220;Cancel&#8221; and moveTo value set to &#8220;user&#8221;. A Rounded List is then added, just to provide a nice mobile-styled container.</p>
<p>Typeahead filtering is provided via the search1 Edit Box. The value is bound to a viewScope variable called &#8220;search&#8221; and an onkeyup event applied to partially refresh the element &#8220;refreshPanel&#8221;. This typeahead filtering is only added because the user is selecting from a view with a large number of options. If the options are limited, this wouldn&#8217;t be required and should be avoided in order to further minimise calls to the server. This particular implementation adds no styling to the Edit Box. If you want to make it look nicer, look at the mobileSearch Custom Control in the Discussion XL template that comes with the Extension Library for 8.5.3.</p>
<p>Below the Edit Box the refreshPanel Panel control is added. A dominoView datasource is bound to this Panel, using the &#8220;Copy of AllStates&#8221; view. The keys property is set as &#8220;#{viewScope.search}&#8221;, to use what the user enters into the search1 Edit Box, and keysExactMatch is set to &#8220;false&#8221; so it only does a partial match. Again, if picking from a smaller list, this filtering will not be required. If picking from a Keyword document, ViewEntryCollection, Java bean or some other element, the filtering will need to be handled differently. That is generic XPages functionality and not mobile-specific, so out of the scope for this series.</p>
<p>The options for the user to select from are held in a Repeat Control bound to the dominoView datasource with the variable name &#8220;state&#8221;. In this example only 10 rows are shown, no pagers are provided, because the typeahead should be used to filter. Again, I&#8217;m not going to go into details on what to do if you need other functionality.</p>
<p>The contents of the Repeat Control are slightly unusual, so I will elaborate. What we want to do is capture the value of the row clicked, move pack to the user Mobile Page, and pass the value back to the inputText3 Edit Box that is bound to document1.State. If resetContent were set to &#8220;true&#8221; on that mobile page, we could pass the value into the query string and retrieve it. But if we were to set resetContent on the user Mobile Page to &#8220;true&#8221;, the page would get reloaded every time the user redirected to it, and so previously entered values would be lost. The initial thought may be to compute the resetContent property on the user page, for example, based also on a query string parameter. But like Server-Side JavaScript in a Client-Side JavaScript Script Block, the setting used when the page is shown is the result of the computation the <strong>previous</strong> time the page was rendered. So the query string parameter would not take effect when the user switches to the page, but instead, the <strong>next</strong> time the user switches to the page.</p>
<p>So we need to run code to switch the page and on the completion of that, set the field. We can do all that in Client-Side JavaScript. Within the Repeat Control there is a Div using the styleClass &#8220;mblListItem&#8221;. This simulates the Static Line Item control. Within the Div is a Label control whose value is &#8220;#{state.Name}&#8221; &#8211; the Name column from the view. The Label has an onclick eventHandler with submit=&#8221;false&#8221;. First, as with the Select State button, we set <span style="color: #000080;">location.href=&#8221;#user&#8221;</span> to move back to the user Mobile Page. Next we call <span style="color: #000080;">dojo.byId(&#8220;#{id:inputText3}&#8221;.value=&#8221;#{javascript:state.getColumnValue(&#8216;Key&#8217;)}&#8221;</span>. This gets the inputText3 Edit Box via Client-Side JavaScript and write to it the value from the Key column for the relevant row. Note that using Expression Language (&#8220;#{state.Key}&#8221;) in the eventHandler will cause the Mobile Page to fail. Adding the eventHandler to the div does not work here.</p>
<p><a href="http://www.intec.co.uk/wp-content/uploads/2012/04/Mobile-Page-Value-Picker.gif"><img class="alignnone size-full wp-image-1967" title="Mobile Page Value Picker" src="http://www.intec.co.uk/wp-content/uploads/2012/04/Mobile-Page-Value-Picker.gif" alt="Mobile Page Value Picker" width="716" height="432" /></a></p>
<p>Finally, back on the user Mobile Page there is the Save button. We need to save the document and return to the welcome Mobile Page, clearing the saved dominoDocument from memory. Fortunately there is a Server-Side JavaScript Simple Action to enable this: the <strong>Move To Application Page</strong> Simple Action. This has a number of parameters that can be set. Setting <strong>saveDocument</strong> to &#8220;true&#8221; easily allows us to save the main document datasource. Setting <strong>forceFullRefresh</strong> to &#8220;true&#8221; will allow us to do a full page refresh, clearing the saved dominoDocument from memory. The <strong>targetPage</strong> parameter is the page to move to and we set the <strong>transitionType</strong> to &#8220;slide&#8221;.</p>
<p><a href="http://www.intec.co.uk/wp-content/uploads/2012/04/Mobile-Page-Submit.gif"><img class="alignnone size-full wp-image-1968" title="Mobile Page Submit" src="http://www.intec.co.uk/wp-content/uploads/2012/04/Mobile-Page-Submit.gif" alt="Mobile Page Submit" width="662" height="174" /></a></p>
<p>We now have a home page, an editable form, and a page where the user can select the state. All of this has a look and feel that&#8217;s consistent with mobile, maximises the screen real estate, and does as much as possible client side. The full code for the XPage is below.</p>
<p>In part three, I&#8217;ll show similar functionality using more server-side functionality. Although not my preferred option, there may be information useful for some developers.</p>
<p><a href="http://www.intec.co.uk/wp-content/uploads/2012/04/Mobile_NewUser_CSJS.txt">Mobile New User CSJS XPage</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.intec.co.uk/xpages-mobile-controls-and-value-pickers-part-two-client-side-approach/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XPages Mobile Controls and Value Pickers Part One: Mobile Development Approaches</title>
		<link>http://www.intec.co.uk/xpages-mobile-controls-and-value-pickers-part-one-mobile-development-approaches/</link>
		<comments>http://www.intec.co.uk/xpages-mobile-controls-and-value-pickers-part-one-mobile-development-approaches/#comments</comments>
		<pubDate>Tue, 03 Apr 2012 22:40:06 +0000</pubDate>
		<dc:creator>paulwithers</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Extension Library]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[XPages]]></category>

		<guid isPermaLink="false">http://www.intec.co.uk/?p=1957</guid>
		<description><![CDATA[Over the last week I&#8217;ve come across a couple of requests for some sort of typeahead or Name Picker or Value Picker for mobile. There was a question on Stack Overflow and another query came from an alternate discussion. I will outline my preferred option in my next post, but first I want to add [...]]]></description>
			<content:encoded><![CDATA[<p>Over the last week I&#8217;ve come across a couple of requests for some sort of typeahead or Name Picker or Value Picker for mobile. There was a question on <a href="http://stackoverflow.com/questions/9975016/are-there-any-possible-ways-to-implement-typeahead-or-name-picker-capability-in">Stack Overflow</a> and another query came from an alternate discussion. I will outline my preferred option in my next post, but first I want to add some background on what I consider are the differences between browser and mobile browser development methodologies.</p>
<p>Pickers and typeahead functionality work well in a browser environment, which is heavily reliant on server-side functionality. Partial refreshes abound in XPages and one of its major strengths as a RAD tool is the ease with which AJAX functionality can be made available. Even in an environment with high latency, browser connectivity is relatively reliable. The issue is: &#8220;how can the <strong>size</strong> of traffic between server and client be minimised?&#8221; There are a number of options for this, as I discussed in my recent session at BLUG which I will be expanding on at DanNotes &#8211; using loaded instead of rendered, using execMode=&#8221;partial&#8221; with an execId, using partial instead of full page refresh, combining controls.</p>
<p>However, when it comes to mobile development, in many cases the issue is different. On a mobile browser I regularly come across issues where connectivity drops and I have to resubmit a request. Anyone who attended Lotusphere this year or various LUGs will have on some occasion found that wifi dropped. This is one of the reasons for developing offline mobile applications, whether using HTML5, something like Appcelerator, or a tool like Teamstudio Unplugged. But if you&#8217;re building for a mobile browser, the issue becomes &#8220;how can the <strong>frequency</strong> of traffic between server and client be minimised?&#8221;</p>
<p>A brief perusal of the XPages Mobile Controls provides subtle evidence of this, particularly if one uses the Discussion XL template as an example. The mobile interface is a single XPage, encapsulated by a &#8216;dynamic content&#8217; control that is the Single Page Application. Each &#8216;page&#8217; is a Mobile Page and navigation is done by switching between those pages.My use of terminology is deliberate here, because the intention is where possible to switch between pages on the mobile client, not retrieve a page from the server.</p>
<p>The Mobile Page control has a property <strong>resetContent</strong> which, by default, is set to false. This means that if the user returns to a &#8216;page&#8217; they have previously visited then, by default, the content is just redisplayed. There is no partial refresh to the server. It is a client-side event to effectively hide on area of the page and display another. There is another property <strong>preload</strong> which can be used to preload a Mobile Page so that a call to the server is not required. Adding content to a Mobile Page view is generally done with a client-side &#8220;Add rows to a data iterator&#8221; (xe:addRows) control which has a setting to save the state. This can be used to reduce the need to repeat the paging.</p>
<p>If you compare the mainTopic and the mobile_newTopic Custom Controls in the Discussion XL template, this desire to minimise calls to the server is evidenced still further. The browser version uses an inputText control <strong>with</strong> typeahead. The mobile version uses an inputText control <strong>without</strong> typeahead.</p>
<p>The whole approach of mobile browser development is to do as much as possible on the mobile client rather than run the gauntlet of connectivity to the server. This is also why defaults are to minimise the amount of content passed to the browser (so, for example, the tundra stylesheet is not passed to a mobile browser by default) and why defaults do not reload content from the server. This is also why one might choose mobile-specific design rather than using a cross-over pattern of development, using the same custom control for browser and web. More importantly, this is why mobile user interfaces may often provide a subset of browser functionality or different functionality.</p>
<p>And all this is without addressing the smaller screen real estate on a mobile phone (tablets have a bit more, but the XPages Mobile Controls do not yet cater specifically for tablets, so I&#8217;m excluding that from this article).</p>
<p>So, how do we provide typeahead or picker functionality on a mobile browser?</p>
<p>I&#8217;ll come onto one option in my next post.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.intec.co.uk/xpages-mobile-controls-and-value-pickers-part-one-mobile-development-approaches/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Quick Tip for iOS Browser Development</title>
		<link>http://www.intec.co.uk/quick-tip-for-ios-browser-development/</link>
		<comments>http://www.intec.co.uk/quick-tip-for-ios-browser-development/#comments</comments>
		<pubDate>Tue, 27 Mar 2012 21:02:40 +0000</pubDate>
		<dc:creator>paulwithers</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[XPages]]></category>

		<guid isPermaLink="false">http://www.intec.co.uk/?p=1952</guid>
		<description><![CDATA[Last week, when preparing for the XPages Mobile Controls session at BLUG, Eamon Muldoon introduced me to a useful tip when testing on iOS. The problem is that many browsers such as Firefox and Safari use, by default, webkit styling, so use Android stylesheets. But Safari has an option to change the user agent. The [...]]]></description>
			<content:encoded><![CDATA[<p>Last week, when preparing for the XPages Mobile Controls session at BLUG, Eamon Muldoon introduced me to a useful tip when testing on iOS. The problem is that many browsers such as Firefox and Safari use, by default, webkit styling, so use Android stylesheets.</p>
<p>But Safari has an option to change the user agent.</p>
<p>The first step is to enable the Develop menu. Go to <strong>Edit</strong> &#8211; <strong>Preferences</strong>. Then on the <strong>Advanced</strong> tab, check <strong>Show Develop menu in menu bar</strong>.</p>
<p>This will enable the Develop menu. From here you can go to the <strong>User Agent</strong> submenu and change the user agent to e.g. iPhone, iPad, or choose <strong>Other&#8230;</strong> to set up a custom user agent.</p>
<p><a href="http://www.intec.co.uk/wp-content/uploads/2012/03/useragent.tif"><img class="alignnone size-full wp-image-1953" title="useragent" src="http://www.intec.co.uk/wp-content/uploads/2012/03/useragent.tif" alt="User Agent menu" /></a></p>
<p>Now you can use the browser to see the iOS stylesheets and simulate functionalityfor a specific user agent.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.intec.co.uk/quick-tip-for-ios-browser-development/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>XPages Portable Command Guide Review</title>
		<link>http://www.intec.co.uk/xpages-portable-command-guide-review/</link>
		<comments>http://www.intec.co.uk/xpages-portable-command-guide-review/#comments</comments>
		<pubDate>Thu, 22 Mar 2012 08:31:31 +0000</pubDate>
		<dc:creator>paulwithers</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Book]]></category>
		<category><![CDATA[XPages]]></category>

		<guid isPermaLink="false">http://www.intec.co.uk/?p=1950</guid>
		<description><![CDATA[A couple of weeks ago I got a review copy of XPages Portable Command Guide. Being eager, I had already bought the electronic version. First, a couple of points about the differing media. The electronic version is great for bookmarking and searching. Plus, because I always have my iPad with me, I always have PCG [...]]]></description>
			<content:encoded><![CDATA[<p>A couple of weeks ago I got a review copy of XPages Portable Command Guide. Being eager, I had already bought the electronic version.</p>
<p>First, a couple of points about the differing media. The electronic version is great for bookmarking and searching. Plus, because I always have my iPad with me, I always have PCG with me. But one of the nice additions on the paper version is quick reference material on the inside covers. This allows you to quickly find where to go to in the book based on certain needs.</p>
<p>As for the book itself, it&#8217;s aimed specifically at those already developing XPages applications. So it&#8217;s not going to tell you how to build an application &#8211; for that, read the Mastering XPages book. It&#8217;s going to tell you how to optimise your server, your application, and your Client-Side JavaScript. It&#8217;s also aimed at <strong>all</strong> XPages developers. I&#8217;m willing to bet there are only a handful of people in the world who already know everything that&#8217;s in the book. Anyone else will definitely learn <em>something</em>. And I learnt lots.</p>
<p>There is a host of information on the xsp.properties, which is where to go to optimise your server and application. One of the properties I learnt more about here was xsp.application.forcefullrefresh to fully refresh the application after each save in Designer. Just as one would expect, the book describes exactly what it does, to help inform on when to use it.</p>
<p>Another example of this in action is the Java getComponentFor and SSJS getComponent and how they work. I firmly believe that if you understand what&#8217;s happening, it&#8217;s easier to use it properly &#8211; that&#8217;s one of the guiding principles behind my second session at BLUG tomorrow. The explanation of getClientId, when it will not work and why also highlights this.</p>
<p>The book also goes in depth on Client-Side JavaScript. With mobile controls and developers going beyond the basics for other XPages development, this is particularly timely. There are also elements useful if you are converting an existing web application to use XPages, such as The benefits of attachQuerySubmitListener to utilise existing CSJS validation. One aspect I also look forward to investigating is overriding XSP.alert, perhaps to create a nicer alert than the Web 1.0 look and feel of basic browser alert boxes.</p>
<p>But the book also covers intermediate / advanced topics, such as using XPath for data binding, a great description of managed beans using the discussion database, clear instructions in Java debugging, and an excellent description of the JSF lifecycle and how to read stack traces.</p>
<p>All in all, it is a must-have resource, not only for XPages developers but also Domino Administrators who are administering servers with XPages applications on them. Thanks to Martin, Tony, Dan and Maire for their efforts.</p>
<p>Tim, David and I spoke to the authors a couple of weeks ago, so look out for that episode of The XCast soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.intec.co.uk/xpages-portable-command-guide-review/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Updated WhitePaper: Maximising the Benefits of XPages in 8.5.3</title>
		<link>http://www.intec.co.uk/update-whitepaper-maximising-the-benefits-of-xpages-in-8-5-3/</link>
		<comments>http://www.intec.co.uk/update-whitepaper-maximising-the-benefits-of-xpages-in-8-5-3/#comments</comments>
		<pubDate>Fri, 16 Mar 2012 13:51:43 +0000</pubDate>
		<dc:creator>paulwithers</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://www.intec.co.uk/?p=1932</guid>
		<description><![CDATA[Some years ago I wrote a whitepaper on maximising the benefits of XPages in 8.5.x. About a year ago that was updated for 8.5.2. (I remember, because it was on the train to BLUG 2010!) I&#8217;ve now updated the whitepaper to bring it up to date with 8.5.3, just in time for the imminent release [...]]]></description>
			<content:encoded><![CDATA[<p>Some years ago I wrote a whitepaper on maximising the benefits of XPages in 8.5.x. About a year ago that was updated for 8.5.2. (I remember, because it was on the train to BLUG 2010!)</p>
<p>I&#8217;ve now updated the whitepaper to bring it up to date with 8.5.3, just in time for the imminent release of Fix Pack 1 later this month. The whitepaper draws on years of experience with XPages and an insight into the Extension Library controls delivered in Upgrade Pack 1.</p>
<p><a href="http://www.intec.co.uk/wp-content/uploads/2012/03/Maximising-The-Benefits-of-XPages-in-8.5.3.pdf">Maximising The Benefits of XPages in 8.5.3</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.intec.co.uk/update-whitepaper-maximising-the-benefits-of-xpages-in-8-5-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Catch Me at BLUG</title>
		<link>http://www.intec.co.uk/catch-me-at-blug/</link>
		<comments>http://www.intec.co.uk/catch-me-at-blug/#comments</comments>
		<pubDate>Wed, 14 Mar 2012 20:46:33 +0000</pubDate>
		<dc:creator>paulwithers</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[BLUG]]></category>
		<category><![CDATA[Conferences]]></category>
		<category><![CDATA[XPages]]></category>

		<guid isPermaLink="false">http://www.intec.co.uk/?p=1929</guid>
		<description><![CDATA[Next Thursday and Friday I will be speaking at BLUG 2012. This will be my third BLUG and it&#8217;s always a very enjoyable experience, with great speakers and content. I will be presenting two sessions: Ready, Set, Go! How IBM Lotus Domino XPages Became Mobile Eamon Muldoon and I will be presenting a session updated [...]]]></description>
			<content:encoded><![CDATA[<p>Next Thursday and Friday I will be speaking at BLUG 2012. This will be my third BLUG and it&#8217;s always a very enjoyable experience, with great speakers and content. I will be presenting two sessions:</p>
<p><strong>Ready, Set, Go! How IBM Lotus Domino XPages Became Mobile</strong></p>
<p>Eamon Muldoon and I will be presenting a session updated from Lotusphere covering all things mobile in the XPages Extension Library. There are some great controls available for providing users with a mobile browser experience that is automatically consistent with their device&#8217;s UX.</p>
<p><strong>The Eureka Moment: The JSF Knowledge You Need to Understand XPages</strong></p>
<p>There&#8217;s a really scary word in there &#8211; &#8220;JSF&#8221; &#8211; that may make you think this session isn&#8217;t for you. Many might think this is for expert developers. It&#8217;s not. If you&#8217;re a beginner or intermediate at XPages, there will be great content that will demystify some of the gotchas and help you code for optimisation and performance. As long as you have created an editable XPage and done a partial refresh, you&#8217;ll learn a great deal and not get lost. I originally intended to present this session with Tim Tripcony, unfortunately it wasn&#8217;t to be, but I&#8217;d like to give him my thanks for helping out with the session.</p>
<p>If you&#8217;re at BLUG by all means say hello.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.intec.co.uk/catch-me-at-blug/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Partial Execution Mode: Probably The Most Powerful XPages Feature You Don&#8217;t Use</title>
		<link>http://www.intec.co.uk/partial-execution-mode-probably-the-most-powerful-xpages-feature-you-dont-use/</link>
		<comments>http://www.intec.co.uk/partial-execution-mode-probably-the-most-powerful-xpages-feature-you-dont-use/#comments</comments>
		<pubDate>Sun, 04 Mar 2012 21:35:49 +0000</pubDate>
		<dc:creator>paulwithers</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[XPages]]></category>

		<guid isPermaLink="false">http://www.intec.co.uk/?p=1921</guid>
		<description><![CDATA[One of my sessions for BLUG, The Eureka Moment: The JSF Knowledge You Need To Understand XPages, has led me to investigate XPages optimisation and partial refresh processing to an extent I haven&#8217;t in the past. Much of the evidence gained has been illuminating for me too and has given me an understanding which will [...]]]></description>
			<content:encoded><![CDATA[<p>One of my sessions for BLUG, <strong>The Eureka Moment: The JSF Knowledge You Need To Understand XPages</strong>, has led me to investigate XPages optimisation and partial refresh processing to an extent I haven&#8217;t in the past. Much of the evidence gained has been illuminating for me too and has given me an understanding which will make me and my team think more when developing our XPages applications in the future. The JSF lifecycle and its quirks, seems to be a topic more developers have been delving into recently or hitting the impacts of:</p>
<ul>
<li>Tony McGuckin has posted an <a href="http://openntf.org/XSnippets.nsf/snippet.xsp?id=xpages-request-processing-lifecycle-explorer-code..." target="_blank">XSnippet</a> for tracking the XPages and JSF lifecycle.</li>
<li>Ulrich Krause has posted a <a href="http://www-10.lotus.com/ldd/xpagesforum.nsf/topicThread.xsp?action=openDocument&amp;documentId=56E9B8537DA50A90852579A6002EAC64" target="_blank">topic on the XPages Forum</a> about dataContext recalculating when outside of the refreshId area</li>
<li>Andrew Pollack posted a <a href="http://stackoverflow.com/questions/9537860/validators-bound-to-one-datasource-activating-when-changing-the-edit-mode-on-ano" target="_blank">question on Stack Overflow</a> because he had suffered major frustration when trying to edit a row in a repeat control, because validation on a new document was triggering.</li>
</ul>
<p>As part of my preparation for BLUG I investigated all the partial refresh options. One that I have never used but gave me a eureka moment, was <strong>Partial Execution Mode</strong>. It is the option that answered both questions, as I&#8217;ve been able to prove, thanks to both developers posting their code. (And, by the way, this is one of the wonderful benefits of XPages, that developers can post their code.)</p>
<h3> So What Happens During a Partial Refresh?</h3>
<p>Well, I can&#8217;t cover everything here. That&#8217;s a big chunk of my session at BLUG. And I&#8217;ll work from Ulrich&#8217;s code. There&#8217;s a screenshot below, but if you follow the link to his post above, you can download it.</p>
<h3><a href="http://www.intec.co.uk/wp-content/uploads/2012/03/partialRefresh-code.gif"><img class="alignnone size-full wp-image-1922" title="partialRefresh code" src="http://www.intec.co.uk/wp-content/uploads/2012/03/partialRefresh-code.gif" alt="XPage Code" width="682" height="476" /></a></h3>
<p>First of all, the whole XPage is posted back to the browser. This is the default action and will occur for most of you for most of your XPages, unless specifically coded differently. That&#8217;s outside the scope of this post and won&#8217;t affect the later processing.</p>
<p>Secondly, the server processing occurs. I&#8217;ll come back to that.</p>
<p>Finally, the area in the refreshId, highlighted in the screenshot, is passed back to the browser.</p>
<h3>RefreshId: WHICH Refresh?</h3>
<p>We&#8217;ve mentioned refreshId here. The key thing to remember here is that the refreshId defines the area that will be refreshed back to the browser. The refreshId has absolutely no effect on the server processing, and that is very important to remember. Regardless of what is put in refreshId, the whole XPage is recalculated by the server processing, during the relevant phases of the JSF lifecycle. This is evidenced when you use a phaseListener to show what is updated during each phase (see Tony&#8217;s XSnippet for how to do that).</p>
<p>The value property of the dataTable is calculated during the Apply Request Values phase as well as the Render Response phase (see below).</p>
<p><a href="http://www.intec.co.uk/wp-content/uploads/2012/03/JSF-lifecycle1.gif"><img class="alignnone size-full wp-image-1923" title="JSF lifecycle1" src="http://www.intec.co.uk/wp-content/uploads/2012/03/JSF-lifecycle1.gif" alt="JSF Lifecycle Part 1" width="637" height="242" /></a></p>
<p>Add a Computed Field with a value calculated in SSJS and you will see it is calculated during the same two phases. Add a rendered property calculated using SSJS to the Computed Field and you will see that the rendered property is recalculated during the Apply Request Values, Process Validation, Update Model Values and Render Response phases.</p>
<p>And by default, every control in the whole XPage is recalculated. The fact that this hasn&#8217;t been so widely noticed is a credit to the performance of XPages.</p>
<h3>ExecMode and ExecId To The Rescue</h3>
<p>On every event there is a little checkbox which a lot of developers &#8211; myself included &#8211; have always left as one of those pieces of advanced XPages functionality to look into at one point in the future. I reached that point recently.</p>
<p><a href="http://www.intec.co.uk/wp-content/uploads/2012/03/execMode.gif"><img class="alignnone size-full wp-image-1924" title="execMode" src="http://www.intec.co.uk/wp-content/uploads/2012/03/execMode.gif" alt="execMode" width="502" height="253" /></a></p>
<p>The setting is <strong>Set partial execution mode</strong>. In the source pane this converts to <strong>execMode=&#8221;partial&#8221;</strong> set on the eventHandler. This changes what is processed in the server side processing. Instead of processing the whole XPage, it processes a specific component.</p>
<p>By default the component processed is not the component set in the refreshId property, but the component surrounding the eventHandler. In this case, that is the button. Herein lies the danger, because in the vast majority of cases, that won&#8217;t be what you want to process. That is the importance of setting the <strong>execId</strong> property as well. Note that the execId property is not available via the Events panel. You need to select the eventHandler and find it in the All Properties panel (the same as the onStart, onError and onComplete events use to trigger Client-Side JavaScript during the partial refresh). Personally, I find it easier to just set them in the source pane.</p>
<h3>The Results</h3>
<p>Once <strong>execMode</strong> is set to <em>partial</em> and <strong>execId</strong> is set, the full JSF lifecycle only processes those components within the ID defined for execId. This will significantly cut down the number of calls to the server. The value property of Computed Field controls will not be calculated at all during the JSF lifecycle. Currently the rendered property of the Computed Field and the value property of the Data Table will still get calculated during the Render Response phase. The screenshot below shows the value property of the Data Table. But the properties are not recalculated during any other phase.</p>
<p><a href="http://www.intec.co.uk/wp-content/uploads/2012/03/JSF-lifecycle2.gif"><img class="alignnone size-full wp-image-1926" title="JSF lifecycle2" src="http://www.intec.co.uk/wp-content/uploads/2012/03/JSF-lifecycle2.gif" alt="JSF Lifecycle Part 2" width="629" height="223" /></a></p>
<p>It also means that if, like Andrew Pollack, you have a repeat control where you want to toggle edit mode and validation for one row while not triggering validation for a second datasource on the XPage, setting execMode and execId will do that for you.</p>
<h3>The Caveat</h3>
<p>However, bear in mind the impact of execMode and execId. Because the component tree is only updated for the components within the execId, that means other values entered by the user do not get applied during the Apply Request Values phase. That means all values entered by the user outside of the execId area revert back to what they were the last time a refresh occurred.</p>
<h3>The Conclusion</h3>
<p>So it has real benefits for performance, for logical processing, but the impacts must be understood. Hopefully this article has given you enough information to understand the impacts and, if not, enough information to work them out for yourself. It&#8217;s a piece of functionality I will certainly be using more often in the future.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.intec.co.uk/partial-execution-mode-probably-the-most-powerful-xpages-feature-you-dont-use/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Improving Notes Client Performance Whitepaper</title>
		<link>http://www.intec.co.uk/improving-notes-client-performance-whitepaper/</link>
		<comments>http://www.intec.co.uk/improving-notes-client-performance-whitepaper/#comments</comments>
		<pubDate>Fri, 02 Mar 2012 11:41:18 +0000</pubDate>
		<dc:creator>paulwithers</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Lotus Notes Clent]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[WhitePaper]]></category>
		<category><![CDATA[XPages]]></category>

		<guid isPermaLink="false">http://www.intec.co.uk/?p=1917</guid>
		<description><![CDATA[Earlier this week I picked up a tweet from Alan Hamilton about an IBM whitepaper about how to optimise performance of the Notes Client. Not surprisingly, the operating system has a big impact on the speed of Lotus Notes opening, but also hanging of the Notes Client (and presumably Domino Designer client). The whitepaper is [...]]]></description>
			<content:encoded><![CDATA[<p>Earlier this week I picked up a tweet from Alan Hamilton about an <a href="http://t.co/Om7jDvCU" target="_blank">IBM whitepaper</a> about how to optimise performance of the Notes Client.</p>
<p><a href="http://www.intec.co.uk/wp-content/uploads/2012/03/whitepapertweet.gif"><img class="alignnone size-full wp-image-1918" title="whitepapertweet" src="http://www.intec.co.uk/wp-content/uploads/2012/03/whitepapertweet.gif" alt="" width="452" height="62" /></a></p>
<p>Not surprisingly, the operating system has a big impact on the speed of Lotus Notes opening, but also hanging of the Notes Client (and presumably Domino Designer client). The whitepaper is well worth reading, particularly for support teams. Good management of the PC can avoid some of frustrations of users that are wrongly laid at the feet of Lotus Notes.</p>
<p>Any developer providing an application on the Lotus Notes Client may also want to leave a copy strategically on the desks of their colleagues!</p>
<p>Not mentioned in the whitepaper, but covered in the new <a href="http://www.amazon.com/XPages-Portable-Command-Guide-Application/dp/0132943050/ref=sr_1_1?ie=UTF8&amp;qid=1329262890&amp;sr=8-1" target="_blank">XPages Portable Command Guide</a> book, are the notes.ini variable settings to optimise Lotus Notes Client memory usage &#8211; vmarg.Xmx and vmarg.Xms. When amended relative to the PC&#8217;s system memory, this too can improve Notes Client performance.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.intec.co.uk/improving-notes-client-performance-whitepaper/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Social Enterprise Debate</title>
		<link>http://www.intec.co.uk/social-enterprise-debate/</link>
		<comments>http://www.intec.co.uk/social-enterprise-debate/#comments</comments>
		<pubDate>Wed, 29 Feb 2012 19:08:40 +0000</pubDate>
		<dc:creator>paulwithers</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Editorial]]></category>
		<category><![CDATA[Social]]></category>

		<guid isPermaLink="false">http://www.intec.co.uk/?p=1912</guid>
		<description><![CDATA[Over on ZDNet site there is a debate going on at the moment about whether the social enterprise is fact or fiction. This is particularly apposite, at a time when social media is becoming more prevalent in business for some people whereas many people are still sceptical. My own views are no secret, based on [...]]]></description>
			<content:encoded><![CDATA[<p>Over on ZDNet site there is a debate going on at the moment about <a href="http://www.zdnet.com/debate/social-enterprise-real-or-fiction/6346201">whether the social enterprise is fact or fiction</a>. This is particularly apposite, at a time when social media is becoming more prevalent in business for some people whereas many people are still sceptical. My own views are no secret, based on previous blogs I&#8217;ve written on the benefits I&#8217;ve seen in my own business life from being social. Businesses who at least allow and at best encourage their employees to be social will reap the rewards. Employees who are social will also reap rewards, increasing their business knowledge and their business networks.</p>
<p>I and other IBM Champions have joined the debate. Too read both sides of the discussion and all the comments, head across to <a href="http://www.zdnet.com/debate/social-enterprise-real-or-fiction/6346201">ZDNet</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.intec.co.uk/social-enterprise-debate/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quick Setup / Restore of Domino Designer</title>
		<link>http://www.intec.co.uk/quick-setup-restore-of-domino-designer/</link>
		<comments>http://www.intec.co.uk/quick-setup-restore-of-domino-designer/#comments</comments>
		<pubDate>Mon, 13 Feb 2012 14:09:36 +0000</pubDate>
		<dc:creator>paulwithers</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Domino Designer]]></category>
		<category><![CDATA[Productivity]]></category>

		<guid isPermaLink="false">http://www.intec.co.uk/?p=1907</guid>
		<description><![CDATA[David Leedy recently posted a video on Domino Designer Tips and Tweaks, which is great. But sooner or later, you&#8217;ll move to a new PC or (god forbid!) have a serious problem with Domino Designer / Notes and really want to reinstall, to clean everything up. &#160; Then you&#8217;ve got to remember what settings you [...]]]></description>
			<content:encoded><![CDATA[<p>David Leedy recently posted a video on <a href="http://notesin9.com/index.php/2012/02/12/notesin9-043-domino-designer-tips-and-tweaks/" target="_blank">Domino Designer Tips and Tweaks</a>, which is great. But sooner or later, you&#8217;ll move to a new PC or (god forbid!) have a serious problem with Domino Designer / Notes and really want to reinstall, to clean everything up.</p>
<p>&nbsp;</p>
<p>Then you&#8217;ve got to remember what settings you changed and where to find them.</p>
<p>&nbsp;</p>
<p>Except you don&#8217;t. Because Domino Designer is on Eclipse. Out of the box, Eclipse gives you the functionality to export your preferences, as Dan O&#8217;Connor mentioned in a comment on one of my previous blog posts. But like the Package Explorer in 8.5.2, it&#8217;s a bit hidden away.</p>
<p>&nbsp;</p>
<p>The first step is to go to a non-Domino Designer perspective. I use the Java perspective. When you then open the File menu, you&#8217;ll see some additional options for <strong>Import&#8230;</strong> and <strong>Export&#8230;</strong>. Export is the one we want.</p>
<p>&nbsp;</p>
<p>This brings up a dialog box. Under <strong>General</strong>, you want to select <strong>Preferences</strong>.</p>
<p><a href="http://www.intec.co.uk/wp-content/uploads/2012/02/export-prefs-1.gif"><img class="alignnone size-full wp-image-1908" title="export prefs 1" src="http://www.intec.co.uk/wp-content/uploads/2012/02/export-prefs-1.gif" alt="File - Export..., select General - Preferences" width="519" height="303" /></a></p>
<p>You can then select all or selected types of preferences, and choose a file location to export them to.</p>
<p><a href="http://www.intec.co.uk/wp-content/uploads/2012/02/export-prefs-2.gif"><img class="alignnone size-full wp-image-1909" title="export prefs 2" src="http://www.intec.co.uk/wp-content/uploads/2012/02/export-prefs-2.gif" alt="Export all preferences and choose file location" width="461" height="357" /></a></p>
<p>&nbsp;</p>
<p>Then on your new install of Lotus Notes / Domino Designer you can again switch to the Java perspective or another standard Eclipse perspective and choose <strong>File</strong> &#8211; <strong>Import&#8230;</strong>. Point to the location and you can import your preferences.</p>
<p>&nbsp;</p>
<p>Within a few minutes, all my preferences, all widgets in the relevant categories of my Widget Catalog, all Sametime communities and groups (once I had added a default community) were installed. Some settings for some widgets were downloaded, but not all. Nonetheless, it was a significant time-saver when setting up my new laptop.</p>
<p>&nbsp;</p>
<p>It&#8217;s a shame the functionality is hidden and presumably not available for a Notes Client only install. It could save a lot of time and ensure your users love Lotus Notes.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.intec.co.uk/quick-setup-restore-of-domino-designer/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Combining $ and #: An Alternative Approach</title>
		<link>http://www.intec.co.uk/combining-and-an-alternative-approach/</link>
		<comments>http://www.intec.co.uk/combining-and-an-alternative-approach/#comments</comments>
		<pubDate>Sat, 11 Feb 2012 14:07:23 +0000</pubDate>
		<dc:creator>paulwithers</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Compute Dynamically]]></category>
		<category><![CDATA[Compute on Page Load]]></category>
		<category><![CDATA[SSJS]]></category>
		<category><![CDATA[XPages]]></category>

		<guid isPermaLink="false">http://www.intec.co.uk/?p=1903</guid>
		<description><![CDATA[Over the last couple of days there have been a few discussions about combining Compute on Page Load and Compute Dynamically. The full trails are below: Sven Hasselbach&#8217;s initial post My explanation of what&#8217;s happening in the source code and Java Sven Hasselbach&#8217;s response A possible alternative from Mark Roden Both make good points and [...]]]></description>
			<content:encoded><![CDATA[<p>Over the last couple of days there have been a few discussions about combining <strong>Compute on Page Load</strong> and <strong>Compute Dynamically</strong>. The full trails are below:</p>
<ul>
<li><a title="Sven Hasselbach's initial post" href="http://hasselba.ch/blog/?p=524" target="_blank">Sven Hasselbach&#8217;s initial post</a></li>
<li><a title="My explanation of what's happening in the source code and Java" href="http://www.intec.co.uk/xpages-bindings-when-runs-at-page-load/" target="_blank">My explanation of what&#8217;s happening in the source code and Java</a></li>
<li><a title="Sven's response" href="http://hasselba.ch/blog/?p=532" target="_blank">Sven Hasselbach&#8217;s response</a></li>
<li><a href="http://xomino.com/2012/02/10/xpages-using-and-at-the-same-time/" target="_blank">A possible alternative from Mark Roden</a></li>
</ul>
<p>Both make good points and I have to say I&#8217;m glad I don&#8217;t have to make a decision on what changes, if any, should be made to Domino Designer as a result! Whether it&#8217;s a bug or a feature, I don&#8217;t have an opinion either way to be totally honest. If it&#8217;s allowed in the future, I&#8217;ll use it. At the moment, it&#8217;s something I&#8217;m happy to be aware of and work around.</p>
<p>&nbsp;</p>
<p>And on that topic &#8211; working around it &#8211; I had another thought late last night (technically this morning!). As ever, it came from thinking about the problem from a different direction. It comes from an element of XPages probably under-used but extremelt powerful &#8211; dataContexts.</p>
<p>&nbsp;</p>
<p>If you don&#8217;t know about dataContexts, read the part of the Mastering XPages book on them. They&#8217;re basically global variables that can be scoped to an XPage, a Custom Control or a Panel. Just the same as dominoDocument or dominoView datasources. This makes them very powerful, especially for values you plan on using multiple times on the page. Instead of the value being computed multiple times, it&#8217;s computed once and referenced via EL.</p>
<p>&nbsp;</p>
<p>The code is pretty similar (again, I&#8217;m using a screenshot for ease because it&#8217;s SO simple:</p>
<p><a href="http://www.intec.co.uk/wp-content/uploads/2012/02/new-binding-code.gif"><img class="alignnone size-full wp-image-1904" title="new binding code" src="http://www.intec.co.uk/wp-content/uploads/2012/02/new-binding-code.gif" alt="New Binding Code" width="555" height="341" /></a></p>
<p>As with any other data elements, we have a var, which is how we reference it, and a value. Again, it&#8217;s computed on page load. But for computedField2 we can then use normal EL, so it&#8217;s #{username} and we don&#8217;t have to combine ${&#8230;} and #{&#8230;}.</p>
<p>&nbsp;</p>
<p>The output now works.</p>
<p><a href="http://www.intec.co.uk/wp-content/uploads/2012/02/new-binding-code-output.gif"><img class="alignnone size-full wp-image-1905" title="new binding code output" src="http://www.intec.co.uk/wp-content/uploads/2012/02/new-binding-code-output.gif" alt="New Binding Code Output" width="594" height="62" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.intec.co.uk/combining-and-an-alternative-approach/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>XPages Bindings: When # Runs at Page Load</title>
		<link>http://www.intec.co.uk/xpages-bindings-when-runs-at-page-load/</link>
		<comments>http://www.intec.co.uk/xpages-bindings-when-runs-at-page-load/#comments</comments>
		<pubDate>Thu, 09 Feb 2012 13:52:56 +0000</pubDate>
		<dc:creator>paulwithers</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Compute Dynamically]]></category>
		<category><![CDATA[Compute on Page Load]]></category>
		<category><![CDATA[SSJS]]></category>
		<category><![CDATA[XPages]]></category>

		<guid isPermaLink="false">http://www.intec.co.uk/?p=1884</guid>
		<description><![CDATA[As developers get more comfortable with XPages, one of the steps is to start to using the Compute on Page Load option instead of the Compute Dynamically option for Server-Side JavaScript. But there are times when that can&#8217;t be done. I encountered this last week and it took a chat with Jeremy Hodge for me [...]]]></description>
			<content:encoded><![CDATA[<p>As developers get more comfortable with XPages, one of the steps is to start to using the <strong>Compute on Page Load</strong> option instead of the <strong>Compute Dynamically</strong> option for Server-Side JavaScript. But there are times when that can&#8217;t be done. I encountered this last week and it took a chat with Jeremy Hodge for me to understand my problem. One of my colleagues had the same problem yesterday. And <a title="Sven Hasselbach" href="http://hasselba.ch/blog/?p=524" target="_blank">Sven Hasselbach</a> has blogged about the same issue today. Unfortunately, it&#8217;s not a bug. It&#8217;s a fact of life and one also found in JSF.</p>
<p>&nbsp;</p>
<p>Sven encountered the issue, as did I, in an Output Script control. Basically, if your Output Script code combine ${&#8230;} code and #{&#8230;} code, for example #{id:myField1}, the #{&#8230;} code is always evaluated at page load. This means, in the case of #{id:myField1} that it returns a blank ID. This isn&#8217;t limited to Output Script controls. It&#8217;s the same for any control, even a Computed Field.</p>
<p>&nbsp;</p>
<p>One of the nice things about XPages, once you&#8217;ve mastered the basics, is the Custom language. This allows you to combine textual and computed elements in a single Value Binding, as I blogged about <a title="last July" href="http://www.intec.co.uk/breaking-the-language-barrier-the-rosetta-stone-of-xpages-languages/" target="_blank">last July</a>. But even in a Computed Field, you can&#8217;t combine ${&#8230;} and #{&#8230;}. Let&#8217;s put this in context.</p>
<p>&nbsp;</p>
<p>Look at this code. It&#8217;s fairly basic. We&#8217;re outputting a username and control IDs.</p>
<p><a href="http://www.intec.co.uk/wp-content/uploads/2012/02/binding-code1.gif"><img class="alignnone size-full wp-image-1886" title="binding code" src="http://www.intec.co.uk/wp-content/uploads/2012/02/binding-code1.gif" alt="Binding Code" width="561" height="232" /></a></p>
<p>But look at the output. For the first control, we get the ID. For the second, we get the username, but not the ID.</p>
<p><a href="http://www.intec.co.uk/wp-content/uploads/2012/02/binding-output.gif"><img class="alignnone size-full wp-image-1887" title="binding output" src="http://www.intec.co.uk/wp-content/uploads/2012/02/binding-output.gif" alt="Binding Output" width="421" height="50" /></a></p>
<p>That&#8217;s because the ID for computedField1 has been generated at runtime, but the binding for computedField2 has been generated at page load. Basically, because we have <em>something</em> that needs generating at page load, everything needs running at page load.</p>
<p>&nbsp;</p>
<p>This may seem strange. But if we understand what&#8217;s happening behind the scenes, it&#8217;s understandable. Any non-literal string is stored as a String and passed to a Java function. So whereas a developer might consider &#8220;${javascript:@UserName()}&#8221; as a distinct element, the XSP Command Manager just interprets the whole value property as something that needs passing to a Java method. Let&#8217;s look at the Java code outputted, and the difference becomes apparent.</p>
<p>&nbsp;</p>
<p>The first control has the following Java code:</p>
<p><a href="http://www.intec.co.uk/wp-content/uploads/2012/02/binding-Java-1.gif"><img class="alignnone size-full wp-image-1888" title="binding Java 1" src="http://www.intec.co.uk/wp-content/uploads/2012/02/binding-Java-1.gif" alt="Java for computedField1" width="624" height="126" /></a></p>
<p>The whole value property, including the #{id:&#8230;} element is stored into a String , which is passed as a parameter to <strong>evaluator.createValueBinding()</strong> &#8211; not all parameters passed to the method are shown.</p>
<p>&nbsp;</p>
<p>But compare computedField2&#8242;s Java code.</p>
<p><a href="http://www.intec.co.uk/wp-content/uploads/2012/02/binding-Java-2.gif"><img class="alignnone size-full wp-image-1889" title="binding Java 2" src="http://www.intec.co.uk/wp-content/uploads/2012/02/binding-Java-2.gif" alt="Java for computedField2" width="675" height="120" /></a></p>
<p>Here, again, the whole value property including the @UserName element is passed into a String. But notice it is passed in as #{&#8230;}. The ${&#8230;} serves only to tell Designer that it needs to call <strong>evaluator.getBindingValue()</strong> instead of <strong>evaluator.createValueBinding()</strong>. Because the value property is passed as a String parameter of a method, <em>everything</em> must use createValueBinding() or <em>everything</em> must use getBindingValue(). You cannot combine both, nor do I expect that you ever will.</p>
<p>&nbsp;</p>
<p>Someone more knowledgeable in the intricacies of JSF can probably explain this  better than me. But the key to remember is to use #{&#8230;} or ${&#8230;}, but not both.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.intec.co.uk/xpages-bindings-when-runs-at-page-load/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
	</channel>
</rss>

