IE 6 refuses to load page if dojo is loaded in HEAD and a BASE tag exists before

I recently had to fight with some odd issue with xPages and Internet Explorer 6. Yes right IE6 !! In my brand new intranet application I use the BASE tag in HEAD  ( xpages property “pageBaseURL” ) to specifies a default address or a default target for all links on a page.

This worked properly in all browsers like IE7, IE8, Firefox 3.x, Safari etc. A few days ago a user called me and told me that he was not able to open the application in his Browser. I asked for the version and he replied IE6 !!

In this particular case, IE popups an alert saying: ” Internet Explorer cannot open the Internet site http://intranet.nsf. Operation aborted “.

I then began to investigate and after a lot of try and error I finally found the cause and after a few hours of further investigation and inspired by a blog post from Paul Withers I was able to implement a solution.

The problem is described in an old entry in the dojo toolkit bug tracking system .

There are also 2 solutions provided to work around this issue

  • Put the BASE tag after the SCRIPT that includes dojo, or
  • Revert hostenv_browser.js to rev.3024 which uses document.write for VML addition

I decided to choose the first option. But how to get the base tag into the HEAD after the dojo stuff? Paul posted some code to put js code into the HEAD. I tweaked it a bit and here is the result

<!-- IE6 Issue workaround START -->
<xp:headTag tagName="base">
<xp:this.attributes>
<xp:parameter name="href">
<xp:this.value>
<![CDATA[#{javascript:return applicationScope.AppBaseURL;}]]>
</xp:this.value>
</xp:parameter>
</xp:this.attributes>
</xp:headTag>
<!-- IE6 Issue workaround END -->
</xp:this.resources>

Now the BASE tag occurs after the dojo stuff and the page opens in all browsers from IE6 on. The BaseURL is stored in a config document and put into the applicationScope.AppBaseURL variable on application init.


xPages, dojo and Firefox

Played with xpages and the dojo toolkit today to create a simple line chart from a view. Everything worked fine in IE and Safari but not in Firefox ( 3.5 ). The same application opened in Firefox 3.6.12 displays the chart.

Anyone aware of incompatibilities between xpages and Firefox 3.5?


Call for entries: Teamstudio Spotlight Awards

With Lotusphere just around the corner, Teamstudio is calling for entries for the Spotlight Awards. This year, there’s a slight twist and there are two categories, one for the most impressive Notes app, and a second for the most impressive mobile Notes app.

Submit your entry before 31st December to stand a chance of winning. Click here for more information.


[XPages] – Issue with “Adding Controls Inside A Pager”

Tommy Valand recently demonstrated a technique how to add controls to a pager. I also had a request from a friend of mine on the same topic. So thank you for sharing, Tommy. Great timing.

My friend wanted to have controls in the pager to collapse and expand a categorized view. Following the article this was an easy one to do.

I have only one smallish problem. The controls begin to “jump” from left to right and back to the left, when you collapse or expand the view in the web. And … this happens only in Firefox and Safari but not in IE (!)

Here is a screenshot taken from my firefox ( Mozilla/5.0 (Windows; U; Windows NT 6.1; de; rv:1.9.1) Gecko/20090624 Firefox/3.5 )

And here is the same in IE ( 8.0 7600.16385 )

Anyone an idea, how to fix this ? I have attached the source code here


iPhone – Date/Time issues after upgrade

I recently upgraded my iPhone 3GS to the latest version of iOS ( 4.2.1 (BC148a)). After the upgrade I saw that the clock of the device displays the time in my timezone one hour behind the actual time.

I had set to automatically adjust the time and show a 24h clock as displayed in the screenshot.

After switching to manually setting the time, the device now shows the correct time.

I can reproduce the error.


ILUG ’10 – Live Blogging (Deutsch)

Ab Mittwoch morgen 8:30 werde ich mich an dieser Stelle live von der ILUG 2010 in Belfast melden.

Ich hoffe, daß das auch so funktioniert, wie ich mir das vorstelle. Aber man weiss ja nie, wie stabil das WLAN vor Ort ist. Lassen wir uns überraschen …


The plain simple guide to conferences

Anyone wanting to know more about IBM Lotus Notes / Domino, or is interested in learning about current or recent developments, can use conferences ( such as ILUG, BLUG, Lotusphere, AdminCamp, Entwicklercamp … ) to gain a lot of knowledge in a short amount of time.

In addition to the educational opportunities, conferences provide a great chance to do some in-depth networking.
Because most experts attend conferences, they’re great occasions to both meet and introduce yourself to the forerunners in the field. Although it’s smart to attend a conferences that are held in your area, for networking purposes you should also attend those that are offered out of town.
You’ll be able to spread the name of your business further and get to know experts and insiders that you might not ordinarily get to meet.

Conferences have become some of the best platforms to learn new and innovative techniques and discover what is happening worldwide in the world of Lotus Notes / Domino. As the goal of client satisfaction and meeting client deliverables in an efficient manner is paramount, being on the cutting edge of new techniques can only improve your business.

Attending a conference can be an overwhelming but exciting experience. So, before you go, take a moment to read these tips to make your conference experience even better.

Before the Conference

Before you go to a conference, it’s a great idea to set both general and specific goals for yourself, and come up with a plan on how to follow them while you’re there. Most goals fall into the following categories:

  • Finding better and newer ways to undergo specific tasks and determining the best ways to accomplish these new techniques.
  • Discovering the answers to certain problems or queries that you need to be solved.
  • Learning about topics that can help you perform better.
  • Uncovering the ways IBM Lotus Notes / Domino can help benefit you and your company.

After you’ve determined your goals, ascertain the sessions that are the most related to helping you accomplish them. Use the online agenda to plan your first and second choices for each available time slot. See if you can learn what the goals of each of the sessions are, (don’t forget to pay attention to whom the speaker is), and use that to help you make your decisions.

If you use advanced planning, you’ll be able to enter the conference less flustered and time-crunched, and thus have more time available for networking opportunities. And of course, don’t forget to bring your list of goals and your pre-determined agenda with you to the conference.

While at the Conference

The most important thing you can do at a conference is to make the most of all available opportunities.

  • Attend all of your conference sessions and make notes on the speakers’ presentations.
  • Go to all of the networking events available. These events are often filled with other marketers and have a tendency to be very lively, so they’re definitely worth your time.
  • Introduce yourself to co-attendees and share your experiences and knowledge with your co-attendees.

After the Conference

After the conference is over, there are a few things you should do before you move on with your everyday life.

  • Organize the notes you’ve taken, and extract any information that you deem to be important. Keep this knowledge handy so you don’t forget about it.
  • If you’ve made any contacts that you clicked with at the conference, be sure to follow up with them so you don’t lose any of the progress made with your networking goals.
  • Prioritize the information you’ve learned. It’s not always possible to implement all the new strategies you’ve learned immediately, so organize them according to your order of importance.
  • Utilize the information that you’ve learned.

See you in Belfast!!


Problem with hyperlinks in RT-Items in 8.5.2

I have recently built a new application for a corporate intranet using XPages. Everything works fine so far except one small thing .

The editors are using a standard Notes application to edit the content. From time to time we see some problems when we insert links to external sites into the body item of the content document.

The links look like this:

From the user perspective there is nothing special here. but when you open the document in the browser, some links are broken.

Notes sometimes seems to add extra (invisible) characters to the string when you save the document. It is an intermittent issue, but I am able to reproduce it. I have seen the same kind of error in therecently published article about Sametime in the IBM Lotus Sametime wiki. Go to the “Install the Meeting Server” section. Move the mouse over the C:\dnload link. There is an extra “close italic” tag in the link and I guess that this cannot be found in the document when opened in the client.

I did some investigation and looked at the cd-records of the body item. For all links that work without problems, there is a single cd-record

The broken links have multiple cd-records

I implemented a quick workaround by adding the following code to the custom control that displays the body item.

<xp:inputRichText id="entryBody" value="#{SingleEntry.body}"
readonly="true" style="min-height:400px;">
<!-- solves issue with pasted links 28.10.2010, Ulrich Krause -->
<xp:this.converter>
<xp:customConverter getAsObject="#{javascript:value;}">
<xp:this.getAsString>
<![CDATA[#{javascript:
var html=value.toString();
html=html.replace(/href=\"<\/font>/g,"href=\"");
return html; }]]>
</xp:this.getAsString>
</xp:customConverter>
</xp:this.converter>
<!-- end -->
</xp:inputRichText>

This piece of code adds a custom converter that strips out the extra font tags from the link.


BLUG – 26.10.2010

Attended yesterdays BLUG event at the IBM Forum, Bourgetlaan 42, Zaventem (Brussels). As always, the event was well attended. According to Theo Heselmans 80 of 100 registered persons showed up.

This is a real good result. Don’t forget it was an event with 2 sessions on a working day.

There was a half hour session run by RIM ( sorry, forgot the name of the speaker ). Blackberry Express for Domino was announced to be available on 02-Nov-2010.

Also RIM presented the brand new BLACKBERRY PLAYBOOK. This is another example where product names do not translate well into other languages. When I heard “playbook”, I immediately thought: “An enterprise-ready gamepad??” .

It’s s not a gamepad in the first place although I guess that it will not take long until the first games will be available for this nice tablet pc.

Next on the agenda was Nathan T Freeman. After he was introduced by Theo, someone in the audience asked what the T stands for. Nathan’s first (logical) answer was “THE”.

Nathan had 2 full hours to talk about the XPages Extension Library published on OpenNTF. I must admit that I already had downloaded the extension and also clicked thru the samples application that is available for download on the OpenNTF website, too.

Despite this, I was stunned when Nathan talked about all this cool stuff. Maybe this was the reason, why I completely forgot to spend some serious applause during the session. Everyone was very quiet indeed.

The (social) networking started right after the session. Not sure how long the bar was opened. I had to leave at about 6:30PM and drove the 250km home all the way thinking of which part of the extension I could usei in the intranet application I’m working on at the moment.


Book review: IBM Lotus Sametime 8 Essentials

IBM Lotus Sametime 8 Essentials was written by Marie Scott and Thomas Duff and first published in September 2010. Both authors are well known speakers at conferences including Lotusphere.
The book is only available in English, but this is not a showstopper for readers from other countries with an average knowledge of english language.

The writing style is clear and understandable. You can feel that the authors know what they are writing about and that they have great skills in presenting technical content to non-technical audience/readers.

IBM Lotus Sametime 8 Essentials was written for end-users. No matter if you are a Sametime “newbee” or you want to become a Sametime “power user”. On 270 pages it covers almost every aspect of IBM Lotus Sametime 8.x. Even as an administrator or a supporter in a servicedesk you should consider to order a copy of this book.

While reading, you will always find some things you didn’t know about IBM Lotus Sametime. For example, I didn’t know that you can add a user to the contacts list by simply right click the user in the Domino Directory and choose the “Add to Sametime contacts list” action. I have completely missed this feature in the past.

Chapter 8 shows how to install and use the Sametime mobile client on Blackberry, Windows Mobile, Nokia and Sony Ericsson. The iPhone is not covered in this chapter.

You will find the relevant information on page 241 in Appendix A. Could have been more verbose. I guess that this information has been added very close to  the deadline. I’m sure that we will read more in a 2nd edition.

Appendix C lists many valuable Sametime ressources including a link to the “Official” Sametime song.

In other reviews I always complained about the quality of screenshots. The images in IBM Lotus Sametime 8 Essentials are well choosen and show only the relevant information. Again this is an indicator for the author’s skill in presenting. Well done, Marie and Tom!

Fazit:
If you are using IBM Lotus Samtime in your organization and you want to learn in detail how to use each feature from start to finish, this book is for you.

If you not yet use IBM Lotus Samtime in your organization, buy a copy of this book for one of the decision makers. A great overview of all the things that can be done using Sametime to increase productivity. Way better than all the glossy broshures from IBM marketing.

You can order your copy here.

Add “IBM Lotus Sametime 8 Essentials” to the shopping cart at www.PacktPub.com and enter LN15BL in the “Promotional Code” box. When you hit the “Add Promotional Code” button, a 15% discount will be applied.


UNIX timestamp to Date function

For migration project I needed a function to convert a UNIX timestamp to Notes Date /Time. Here is the function I used

Function Timestamp2Date(timestamp As Double) As String

Dim dt As New NotesDateTime("01/01/1970 00:00:00")
Dim dd As Integer, hh As Integer, ss As Double

dd = Fix(timestamp / 86400)
ss = (timestamp Mod 86400) Mod 3600
hh = Fix(ss / 3600)
hh = hh + 1

Call dt.AdjustDay(dd)
Call dt.AdjustHour(hh)
Call dt.AdjustSecond(ss)

Timestamp2Date = Format(dt.LSLocalTime, "dd/mm/yyyy hh:mm:ss")
End Function
Sub Click(Source As Button)
Msgbox Timestamp2Date(1115986380)
End Sub

will convert the UNIX timestamp 1115986380 to “13.05.2005 02:13:00”


IBM Lotus Notes 8.5 User Guide in review

The “IBM Lotus Notes 8.5 User Guide” is a practical, hands-on user guide with time-saving tips and comprehensive instructions for using Lotus Notes effectively and effiently.

The author, Karen Hooper, has over 13 years of experience in Lotus Notes and Domino. She has a good writing style and you can feel that she knows how to teach.

The foreword is written by Ed Brill and going to the list of reviewers, youl’ll find well known names like Susan Bulloch, Mary Beth Raven, Karen Hobert and Kathy Staples.

As the title implies, the “IBM Lotus Notes 8.5 User Guide” is written for end-users and from their perspective, the contents covers all aspects of Lotus Notes in an detailed and comprehensive way without being too technical.

I even recommend this book to servicedesk staff. Reading the book will take you to the same level in communication your users are on. This can make communication with your servicedesk more effectively. As an example, take a look at the screenshot on page 7 which names all the relevant parts of the user interface. Knowing you vocabulary is very important in communication.

Another valuable information I found on page 12; shortcuts! Users love shortcuts. They can make their daily work easier. What I am missing here is a printed version of all the shortcuts that could be detached from the printed copy of the book.

The book contains tons of screenshots. IMHO some of the screenshots are a bit overloaded with information. The publisher should also think about the print quality. It is sometimes not easy to see the details. And very important; keep in mind that the screenshots are taken in color mode, but the book shows the pictures in grayscale mode.

Despite this, I recommend the book as a valuable resource for all users of Lotus Notes. If you are looking for a resource for teaching your users how to use Lotus Notes effectively and effiently, “IBM Lotus Notes 8.5 User Guide” is for you.

I hope that this book will also be available in other languages soon.


Get DAOS ObjectCount and Size with LotusScript

At AdminCamp last week, I talked about how to get the count of all files in the DAOS repository and it’s overall size using some batch programming in Windows and LINUX.

As an alternative I proposed to use the console command “show dir -xml” to return an xml representation of the properties of all applications in the Domino data directory.

I found some code by Julian Robichaux that does the parsing of the XML structure. I’ve stripped out the relevant code snippets and put together a script lib to get the DAOS Object count and the overall size of all DAOS Objects.

The code writes a summary of these values to a database. You can use this data to create nice looking charts and graphs.

Here is the code:

%REM
	Library DAOS.Objects
	Created Sep 27, 2010 by Ulrich Krause/singultus
	Description: Comments for Library
%END REM
Option Public
Option Declare

Class DbInfoHolder
	Public PropertyList List As String
	Private xh As XmlHelper
	Private tNode As NotesDOMNode

	Public Sub New ()
		Set xh = New XmlHelper()
	End Sub

	Public Sub GetDbInfo (node As NotesDOMNode)
		Erase PropertyList
		On Error Resume Next
		PropertyList("Title") = xh.getNodeText(xh.findFirstChildNode(node, "title"))
		Set tNode = xh.findFirstChildNode(node, "daos")
		PropertyList("DAOSEnabled") = xh.getAttributeText(tNode, "enabled")
		PropertyList("DAOSObjects") = xh.getAttributeText(tNode, "objects")
		PropertyList("DAOSBytes") = xh.getAttributeText(tNode, "bytes")
	End Sub

End Class

Class XmlHelper
	Function getNodeText (node As NotesDOMNode) As String
		'** get the text of the given node
		Dim child As NotesDOMNode
		Dim childText As String

		If (node Is Nothing) Then
			Exit Function
		Elseif (node.IsNull) Then
			Exit Function
		End If

		Set child = node.FirstChild
		Do Until (child.IsNull)
			If (child.NodeType = DOMNODETYPE_TEXT_NODE) Then
				childText = childText + child.NodeValue
			Elseif (child.NodeType = DOMNODETYPE_CDATASECTION_NODE) Then
				childText = childText + child.NodeValue
			End If
			Set child = child.NextSibling
		Loop

		getNodeText = childText
	End Function

	Function getAttributeText (node As NotesDOMNode, attrName As String) As String
		'** get the text of a given attribute
		Dim attrList As NotesDOMNamedNodeMap
		Dim attr As NotesDOMNode
		Dim attrValue As String
		Dim i As Integer

		If (node Is Nothing) Then
			Exit Function
		Elseif (node.IsNull) Then
			Exit Function
		End If

		Set attrList = node.Attributes

		For i = 1 To attrList.NumberOfEntries
			Set attr = attrList.GetItem(i)
			If (attr.NodeName = attrName) Then
				attrValue = attr.NodeValue
			End If
		Next

		getAttributeText = attrValue
	End Function

	Function findFirstChildNode (node As NotesDOMNode, childName As String) As NotesDOMNode
		'** get the first child node with the given name
		Set findFirstChildNode = findChildNode(node, childName, 1)
	End Function

	Function findChildNode (node As NotesDOMNode, childName As String, count As Integer) As NotesDOMNode
		'** get the child node with the given name at the given position
		Dim child As NotesDOMNode
		Dim i As Integer

		If (node Is Nothing) Then
			Exit Function
		Elseif (node.IsNull) Then
			Exit Function
		End If

		Set child = node.FirstChild
		Do Until (child.IsNull)
			If (child.NodeName = childName) Then
				i = i + 1
				If (i >= count) Then
					Exit Do
				End If
			End If
			Set child = child.NextSibling
		Loop

		Set findChildNode = child
	End Function

End Class

%REM
NOTE: You MUST have rights to run remote console commands
on the server you want to get a list of files from.

Parts of the code by Julian Robichaux
http://www.nsftools.com,14 Aug 2008
%END REM

Class DAOSObjects

	Public Sub New ()

	End Sub

	Public Sub ObjectCount

		Dim s As New NotesSession
		Dim db As NotesDatabase
		Dim doc As NotesDocument
		Set db = s.CurrentDatabase

		Dim session As New NotesSession
		Dim commandString As String
		Dim server As String
		Dim returnString As String
		Dim dbInfo As New DbInfoHolder
		server = session.UserName
		commandString = "!show dir -xml"
		returnString = s.SendConsoleCommand(server,commandstring)

		'** if we got some output, try to process it as XML
		Dim xHelper As New XmlHelper()
		Dim inputStream As NotesStream
		Dim outputStream As NotesStream
		Dim domParser As NotesDOMParser
		Dim docNode As NotesDOMDocumentNode
		Dim fileNode As NotesDOMNode
		Dim dbNode As NotesDOMNode

		'** load it up into a DOM parser
		Set inputStream = session.CreateStream
		Call inputStream.WriteText(returnString)
		inputStream.Position = 0
		Set outputStream = session.CreateStream
		Set domParser=session.CreateDOMParser(inputStream, outputStream)
		domParser.Process

		'** all of the tasks should be contained within a single
		'** node, as separate  entries.
		Set docNode = domParser.Document

		'** find the  node
		Set fileNode = xHelper.findFirstChildNode(docNode, "files")

		'** if we didn't find anything, exit
		If (fileNode.IsNull) Then
			Exit Sub
		End If

		Dim sumObj As Currency
		Dim sumSize As Currency
		sumObj = 0
		sumSize = 0

		Set dbNode = fileNode.FirstChild

		Do Until (dbNode.IsNull)
			If (dbNode.NodeType = DOMNODETYPE_ELEMENT_NODE) And _
			(dbNode.NodeName = "filedata") Then
				Call dbInfo.GetDbInfo(dbNode)
				If dbInfo.PropertyList("DAOSEnabled")= "readwrite" Then
					sumObj = sumObj + Ccur(dbInfo.PropertyList("DAOSObjects"))
					sumSize = sumSize + Ccur(dbInfo.PropertyList("DAOSBytes"))
				End If
			End If
			Set dbNode = dbNode.NextSibling
		Loop

		Set doc = db.CreateDocument
		doc.form = "DAOS.Objects"
		doc.servername = server
		doc.sumObjects = Cstr(sumObj)
		doc.sumSize = Cstr(sumSize)
		Call doc.save (False, False )
	End Sub

End Class

You can download the code as .lss file here.