Lotusphere – Jumpstart day

Here is a summary of my experiences on Jumpstart day:

JMP301 Masterclass: Defence against the dark arts

Although an administrator session I thought it would be good to hear a bit more on Notes security. On the other hand the jumpstart sessions for application development sounded too simple to me.

The session was great (and fun listening) and it was good to hear about the measurements available Notes to secure the system.

What I took out of the session was more to create more security awareness among our developers. I guess this will result in some kind of workshop we have to setup.

Anyway, when I told my admin that I visited an admin session he was proud but I did not get a reply when I stated that he should now at least attend one developer’s session =)

Rated: 10


JMP 304 Masterclass Deep Dive into Calendaring and Scheduling

Again an admin session. The purpose of this attendance was to understand Calendaring and Scheduling and hear of opportunities how to embed calendaring and scheduling in other Notes applications.

To my opinion the session went much into problem tracking so that was a bit disappointed.

Anyway, again I made my admin proud but still no answer on my question which developer session he will attend.

Rated: 6


Lotus stuff store and Bookstore

‘Vikings’ never return home without treasures so I paid a visit to the stuff store/bookstore to check if there was something of my taste. Any way I succeeded. I also noticed that the ‘Mastering XPages’ book is amazingly thick and this will truly become the bible in the new age of Domino development.

Some great other titles in the bookstore but at my next visit I will bring my axe and slayer and go a little berserk on some free shopping 😉

Rated: 10



JMP303 Masterclass LeveragingJSON in both Client and Server Side JavaScript

The description sounded interesting ( I even skipped an admin session for this one!) but when they started with adding a Notes View on a Notes Page surrounding with brackets and adding an empty entry at the end I was thinking:

Does IBM allow the promotion of such approaches while XPages is the preferred technology to be used?

Anyway, in the second part the speakers came with some XPages examples but they never recovered from the weak start.

I believed the description also talked about JSON in the client but that turned out to be running XPages in the Notes client.

Rated: 5


Welcome reception

Free drinks & food, some entertainment on the background, a nice evening temperature and a lot of Notes geeks!

Rated: 10


Lotusphere sessions videos

In the LS goodies bags you can find an order form for LS sessions on DVD. While other events are available online for free (MIX, WWDC, I/O) Lotusphere is still available with restrictions for a considerable price.

Maybe a vote on Tommy’s idea is a clear signal at the right moment. Even when we enjoy the weather in Florida, the sessions and the social contacts, we want information about our technology to be available to everyone. And with saving our planet a bit by not having to buy plastics…



!NO! more struggle with XPages as RSS source and JWPlayer

I am working on embedding JWPlayer in a Domino app and I want to use an XPages to generate an RSS feed for a playlist. Via this way I can apply some ‘intelligence’ and direct which related items the playlist should contain. How the code should look like you can see here.

The problem I am facing at the moment is that JWPlayer has problems using a source that is based other that the xml extension.

Task Queue failed at step 5: Playlist could not be loaded: XML could not be parsed or playlist was empty

Whenever I save the .xsp results as an .xml file and add it to the application as a file resource and call it the player works fine.

In traditional Domino development it is possible to call an agent e.g. rss.xml but XPages does not allow it, it can only contain numbers, letters, underscore and hyphen.

  • Do you see any options using XPages or am i thrown back to writing an agent?

Update: problem solved as you can see in the image below.

Q2: Use an XPage as RSS source

Thanks for all the help I got on this post. However I have some remaining questions how to build an RSS feed based on an XPage.

Here is the code so far:

/******************** START SAMPLE CODE ********************/
var con:javax.faces.context.ExternalContext = facesContext.getExternalContext();
var response:com.ibm.xsp.webapp.XspHttpServletResponse = con.getResponse();
var writer = response.getWriter();

response.setHeader(“Cache-Control”, “no-cache”);

writer.write(“<?xml version=\”1.0\” encoding=\”utf-8\”?>”);

var domDoc:DOMDocument = DOMUtil.createDocument();

var rootNode:DOMElement = domDoc.createElement(“rss”);
rootNode.setAttribute(“version”, “2.0”);

var channelnode:DOMElement = domDoc.createElement(“channel”);

var itemnode:DOMElement = domDoc.createElement(“title”);

var itemnode:DOMElement = domDoc.createElement(“description”);
itemnode.setStringValue(“Broadcast your daily business”);

var itemnode:DOMElement = domDoc.createElement(“link”);
itemnode.setStringValue(“http://&#8221; + @Name(“[CN]”,session.getServerName()) + “.domain.com/” + @ReplaceSubstring(database.getFilePath(),”\\”,”/”));

var v:NotesView = database.getView(“$v-rss”);
var doc:NotesDocument = v.getFirstDocument();
var counter=0;

while ( doc != null && counter < 20){

var itemnode:DOMElement = domDoc.createElement(“item”);

var node:DOMElement = domDoc.createElement(“title”);

var node:DOMElement = domDoc.createElement(“pubDate”);
var dt:NotesDateTime = doc.getCreated();

var node:DOMElement = domDoc.createElement(“description”);
var descr = “File: “+ doc.getItemValueString(“Tx_DspMovie”) + “. Description: ” + doc.getItemValueString(“Tx_MovieDescription”);

var node:DOMElement = domDoc.createElement(“link”);
node.setStringValue(“./0/” + doc.getUniversalID() + “?OpenDocument”);

var node:DOMElement = domDoc.createElement(“author”);
var person = @Name(“[Abbreviate]”,doc.getItemValueString(“Na_MovieAuthor”));

var node:DOMElement = domDoc.createElement(“guid”);

var counter = counter + 1;
var tmpdoc = v.getNextDocument(doc);

doc = tmpdoc;


writer.write( domDoc.getXMLString() );
/******************** END SAMPLE CODE ********************/


Questions I have:

  • How to get the dates in RFC 822 format? Anyone know a variant for the following LotusScript:

‘Mike Golding’s code
Function RFC822DateFormat(aDate As NotesDateTime) As String
Dim vRFC822 As String
Dim vSign As String
Dim vZoneOffset As Integer
Dim vZoneOffsetH As String
Dim vZoneOffsetM As String
Dim bDate As New NotesDateTime(aDate.LSGMTTime)
vRFC822 = Format$(aDate.LSLocalTime, “ddd, dd mmm yyyy hh:nn:ss”)
vZoneOffset = bDate.TimeDifference(aDate)/3600
If vZoneOffset > 0 Then vSign = “-” Else vSign = “+”
vZoneOffsetH = Right(“0” + Cstr(Int(Abs(vZoneOffset))),2)
vZoneOffsetM = Right(“0″ + Cstr(Fraction(vZoneOffset)*60),2)
RFC822DateFormat = vRFC822 + ” ” + vSign + vZoneOffsetH + vZoneOffsetM
End Function

  • In case my RSS contains HTML how to include CDATA? The following code is valid but does not give the wanted result:

var node:DOMElement = domDoc.createElement(“description”);
var descr = “!&lt;[CDATA[File: ” + doc.getItemValueString(“Tx_DspMovie”) + “. Description: ” + doc.getItemValueString(“Tx_MovieDescription”) + “]]&gt;”;

JWPlayer – Anyone solved how to generate the player embed codes on a Domino server?

I have come quiet far with my XPagified version of OpenTV. I am using the JWPlayer which work excellent. Right now I am looking for a way to generate player embed codes so you can link from other websites to the application. This feature can be pretty vital for good re usage of the app.

However the integration example is based upon PHP.

So I am wondering if someone has already taken a look at this before and is willing to share a solution for the Domino server?

Some screens:

Spotlight on your startscreen: available @OpenNTF

I have embedded the code in AppDev Template project on OpenNTF. This application can be used as the default template for new development projects for the Lotus Notes client.

You can download version 2 of it here.

Notice that dates are displayed in a more human friendly format:

Class DateHelper
Private dt_then As NotesDateTime
Private dt_now As NotesDateTime
Private diff_in_seconds As Long
Private diff_in_minutes As Long

Sub New()
Set dt_now = New NotesDateTime(Now)
End Sub

Function TimeSince(datetime As Variant, includeseconds As Boolean)
Set dt_then = New NotesDateTime(Cstr(datetime))
Dim future As Boolean
Dim since As String
Dim whichway As String

diff_in_seconds = dt_now.TimeDifference(dt_then)

If Sgn(diff_in_seconds) = -1 Then ‘future
future = True
diff_in_seconds = Abs(diff_in_seconds)
whichway = ” away”
Else ‘past
future = False
whichway = ” ago”
End If

diff_in_minutes = Round(diff_in_seconds/60,0)

If diff_in_minutes >= 0 And diff_in_minutes <= 1 Then
If Not includeseconds Then
If diff_in_minutes = 0 Then
since = “less than a minute”
since = “1 minute”
End If
If diff_in_seconds >= 0 And diff_in_seconds <= 4 Then
Since = “less than 5 seconds”
Elseif diff_in_seconds >= 5 And diff_in_seconds <= 9  Then
Since = “less than 10 seconds”
Elseif diff_in_seconds >= 10 And diff_in_seconds <= 19 Then
Since = “less than 20 seconds”
Elseif diff_in_seconds >= 20 And diff_in_seconds <= 39 Then
Since = “half a minute”
Elseif diff_in_seconds >= 40 And diff_in_seconds <= 59 Then
Since = “less than a minute”
Since = “1 minute”
End If
End If
Elseif diff_in_minutes >= 2 And diff_in_minutes <= 44 Then
since =  Cstr(diff_in_minutes) + ” minutes”
Elseif diff_in_minutes >= 45 And diff_in_minutes <= 89 Then
since = “about 1 hour”
Elseif diff_in_minutes >= 90 And diff_in_minutes <= 1439 Then
since = “about ” + Cstr(Round(diff_in_minutes / 60, 0)) + ” hours”
Elseif diff_in_minutes >= 1440 And diff_in_minutes <= 2879 Then
since = “1 day”
Elseif diff_in_minutes >= 2880 And diff_in_minutes <= 43199 Then
since = “about ” + Cstr(Round(diff_in_minutes / 1440, 0)) + ” days”
Elseif diff_in_minutes >= 43200 And diff_in_minutes <= 86399 Then
since = “about 1 month”
Elseif diff_in_minutes >= 86400 And diff_in_minutes <= 525599 Then
Since = Cstr(Round(diff_in_minutes / 43200, 0)) +” months”
Elseif diff_in_minutes >= 525600 And diff_in_minutes <= 1051199 Then
Since = “about 1 year”
since = “over ” + Cstr(Round(diff_in_minutes / 525600, 0)) + ” years”
End If

TimeSince = since + whichway
End Function
End Class

Let’s try to set a new download record in 2011 =)

Computed for Display Fields located in the Form header no longer available in the body of the Form :-/

After a redesign of an application we were getting some incident reports. A quick scan pointed out that the problems where caused by a  relocation of the fields.

The Form was given a Form Header and the computed for display fields in it where no longer available to the rest of the form. Changing the fields into computed would made them back available to the whole form :-/

I have posted a suggestion on IdeaJam.

How to create a spotlight page for your Notes database

To maintain the development of a number of standardized applications I use a Notes database where developers/application owners can register ‘new ideas’ for applications, convert them into tasks and include them in planned releases.

One application for example allows the storage of all kinds of documents, define a review cycle, set access restriction et cetera. To offer a more attractive ‘startpage’ that will make it easier for users to scan new contributions or their own latests contributions the idea of a ‘spotlight‘ emerged:

Basically we created a form that will be opened within a classical frameset when launching the application.

Form requirements

SaveOptions field, set to “0” and hidden ofcourse.

Now for each ‘entry’ I have 7 hidden fields:

Tx_TitleSpotDoc1, text, editable

Na_AuthorSpotDoc1, names, editable

Td_ModifiedSpotDoc1, date/time, editable

Tx_ReadableDateSpotDoc1, text, editable

Tx_FileTypeSpotDoc1, text, editable

Tx_FileTypeIconSpotDoc1,text, editable

Tx_UNIDSpotDoc1, text, editable

(for the next entries the fields are called Tx_TitleSpotDoc2, Tx_TitleSpotDoc3 etcetera)

For the entries under the ‘My Latest Documents’ header the fields are named:

Tx_TitleMySpotDoc1, text, editable

Na_AuthorMySpotDoc1, names, editable

Td_ModifiedMySpotDoc1, date/time, editable

Tx_ReadableDateMySpotDoc1, text, editable

Tx_FileTypeMySpotDoc1, text, editable

Tx_FileTypeIconMySpotDoc1,text, editable

Tx_UNIDSpotMyDoc1, text, editable

In the part where I diplay the entries the markup looks like this:

Note that all fields are computed for display.  Here are their values:

Computed image: @Text(Tx_FileTypeIconSpotDoc1)

Title: Tx_TitleSpotDoc1

Author: @Name([CN]; Na_AuthorSpotDoc1)

Modified: Td_ModifiedSpotDoc2

Added: Tx_ReadableDateSpotDoc1

The computed image and the title field have an Action Hotspot, with the onclick value:

Sub Click(Source As Button)
Dim ws As New NotesUIWorkspace
Call OpenDocumentByUNID(ws.CurrentDocument.Document.Tx_UNIDSpotDoc1(0))
End Sub

They also use a Script Library (LotusScript):

Use “StartPageFunctions”

The form has also this library referenced under (Options).

Under the Postopen event we call the initiation function:

Sub Postopen(Source As Notesuidocument)
Call StartPageInit(Source)
End Sub

I will include the script as a file: startpagefunction.dxl

That’s about it! Now you have a much more interesting startpage for your Notes app!

Here are the icons used: