Am I happy with where Notes is from a technical standpoint ? Yes more than ever

I have just recorded a podcast with Stuart McIntyre, Darren Duke, Sharon Bellamy, Matt White and Bruce Elgort and it got me thinking.

Although I have commented on some blogs over the last week I have not posted anything myself so here goes.

Am I happy with where Notes is from a technical standpoint – yes more than ever.

My company focuses on a “double niche” – organisations that are in the manufacturing sector and have a pre-existing Notes infrastructure. With XPages we can now think of it as less of a double niche because we can design once for the web and the Notes client at the same time. This is a huge advance and as someone pointed out on the podcast pretty unusual in terms of platforms. Notes has always been much more capable than the vast majority of its users know and now this is even more the case.

We are developing our first application which will run as an appliance at a customer site that is non notes. But it also runs as a local replica in the Notes client – how cool is that ? Think Google Gears but better ( and still supported ). I might regret this but here are the daily and weekly builds ( sorry Andrew ! ). Trust me it looks the same in the Notes Client.

I deliberately used the phrase “where Notes is technically” because I am not as happy around the non technical side. Its not that it has suddenly got worse rather that the gap between “what Notes can do” and what people “think Notes can do” has got much wider and so my frustration has got greater.

I will openly admit to having looked to see if we can offer solution on the MS platforms as well as Domino and I have always come away confident that for what we do Notes has very limited competition. So what are the issues ?

IBM has got to value retaining clients

Reps need to be incentivised for renewals – it will stop companies on < 8.x thinking the product is dated. Its a virtuous circle that will ensure that IBM customers get better value from Notes through applications, DAOS, servers running faster on existing hardware etc.  and IBM spends less time fighting a rear guard battle against a mail platform and a file server. People often talk about life cycles – what is IBM’s view on the lifecycle of a customer ?

IBM has got to be wholistic about Notes being a development platform

If I sell a 10K Xpage app to a company with <1000 employees the whole project is 12K ( 2k for the utility express server ). If I sell the same App to a company with 1001 employees the whole project costs maybe 25k. This means that I can't be competitive in large companies - that just seems daft. At the same time pricing by individual users is not the answer either – for example if I write an app that manages brochures or safety data sheets the client will absolutely not pay

SNTT : XPages onclick Ghosts in the machine

For some time I have been convinced that there is ghost code in my Xpages applications. Being new to Xpages I often rework my approach to things and it seems as though my old code was still running  even though it had definitely been changed !

Another part of this phenomenon is that I have been convinced that onclick events in links have been firing on page load. This usually happened in the early hours adding to my belief that it was a ghost !

Well Keth Strickland made a post a few days ago that made me think it might not be just me. He described how if you edit the onclick property of a link in the “All Properties” tab the code would fire on page load.

Investigating further I found that the problem was two fold. Keith is right, it does fire but it is also possible to end up with two sets of code for the on-click event as the screen cast below shows.

1) Add some code to the on-click of a link via the events tab
2) save the document
3) reopen the document and you see the same code in the all properties tab for the link
4) modify the code via the events tab ( in this case change “2” to “x” )
5) save and close the document
6) re-open the document and you have two different sets of code, one of which also happens to run on page load

I had to make a screen cast to prove I wasn’t mad.

Getting OneUi V2.01 to work with Internet Explorer 6

I have been struggling to get an XPage application to work well with Internet Explorer 6 using the OneUIV2 style sheet. There is some useful documentation from IBM which explains that the IE6 CSS hacks are done differently in this V2 of OneUI.

The answer is to add this code to your xpage. In my case I added it to a banner custom control using a computed field

<xp:text escape=”false” id=”CSS_Hack”><xp:this.value><![CDATA[${javascript:”<!–[if IE 6]><script type=”text/javascript”>document.getElementsByTagName(“html”)[0].className+=” lotusui_ie lotusui_ie6″;</script><![endif]–><!–[if IE 7]><script type=”text/javascript”>document.getElementsByTagName(“html”)[0].className+=” lotusui_ie lotusui_ie7″;</script><![endif]–><!– END exampleHead.htm –>” }]]></xp:this.value></xp:text>

Hope this helps someone else who has been pulling their hair out with ie6.

p.s. you can also use the following SSJS to detect ie6

if (context.getUserAgent().isIE(0,6)) {
// do something like suggest a better browser

SNTT: Examples of accessing data on Xpages

There are several ways of getting at the data on an Xpage. I wanted to understand this better so I have created this example which gives examples of

getComponent( “element name”).getValue();
getComp onent(“element name”).getSubmittedValue()
currentDocument.getItemValueString(“back end field name / data source name”)

The key learning for me has been that the getSubmittedValue method will only work if the “Do not validate or update data” property is set. If it is not set then the value returned is null even though the name would suggest that it returns the “submitted value”.

Image:SNTT: Examples of accessing data on Xpages

This means that in the case of a document which is not new you may need to test for both the existing value and the submitted value if you are using a two stage drop down as described by Tim Clark. The code I have used in a recent project is :

// the submitted value is not available
// until on onchange event has occurred
var keyvar : String;
var combo4SV = getComponent(“comboBox4”).getSubmittedValue();
var combo4 = getComponent(“comboBox4”).getValue();
if(combo4SV === null){keyvar = combo4} else {keyvar = combo4SV};
@DbLookup(@DbName(), “vpeepsbyorgname”, keyvar, 2)

There is also a similar example listed under “Combining getValue and getSubmittedValue” in the Redbooks Wiki: Building Domino Web Applications using Domino 8

I have also found the following links useful :

You at Notes Wiki
Embedding Contextual Data for Client-Side Logic in XPages
Paul Hannan


SNTT: Using OpenNTF Xpages Wiki with multiple domains

I have been working on a public facing OpenNtf Xpages Wiki for our Delivery Toolkit suite of products and wanted the Wiki to work with multiple domains e.g. if a user arrived via or then the wiki links would remain consistent.

The current wiki code ( 0.6 ) causes the internal wiki links to resolve to the domain which is configured as the host name on the server document.

Image:SNTT: Using OpenNTF Xpages Wiki with multiple domains
Looking at the code in the xpWikiStyle SSJS library the links are absolute. Changing the following line produces relative urls which will honour the domain



to url=””+facesContext.getExternalContext().getRequestContextPath();

so and both work.

Using facesContext.getExternalContext().getRequest().getHeader(“Host”) to get the domain should also work if a computed domain is required

The project entry is here

Update  11th March 2010
You need to make similar changes tot he edit button on the prtContent custom control i.e. the wiki page