Lotus Domino XPages Praxis-Seminar (3 Tage) – Hannover

May 15, 2012 – 3:12 pm

2Consultants bietet wieder eines ihrer fundierten XPages Seminare an.

Das XPages Praxis Seminar findet statt in Hannover vom 22. bis 24. Juni mit neuem und eigenem Konzept inklusive deutschsprachiger Unterlagen (250 Seiten in Farbe).

Als einen weiteren Vorteil sehe ich die Durchführungsgarantie. Im Seminarpreis enthalten ist auch die Nutzung des “fliegenden Klassenzimmers”.

Wer sich also im Raum Hannover mit dem Gedanken trägt, sich nun endlich mit XPages zu beschäftigen, der sollte jetzt zugreifen und noch heute die Anmeldung ausfüllen.

 

 

 

SSJS Extension – New Function: @GetNextBusinessDayExt()

May 13, 2012 – 10:20 am

I have added a new @Function to my SSJS project on OpenNTF.

Syntax

@GetNextBusinessDayExt( [offset] ; [baseDate] ; [excludedDaysOfWeek] ; [excludedDates] )

Parameters

offset:
Number of non-excluded days from the baseDate that the result date will be

basedate:
Date to start counting offset from. If specify “null” defaults to today

excludedDaysOfWeek:
Numer or number list. Optional. Days of the week not counted as business days, where 1 is Sunday and 7 is Saturday.
DEFAULT: 1,7 ( Sunday, Saturday )

excludedDates:
String of date strings (formatted as <CODE>SimpleDateFormat.getDateInstance().format(</CODE>)) which represent specific dates which should be excluded from the counting of days, such as holidays

Return value:
The earliest date which is offset days after the baseDate. In  counting towards this result date, any excludedDaysOfWeek and any excludedDates are excluded from counting towards the offset

Joda to the rescue

May 9, 2012 – 4:00 pm

Today I had to compare to dates to find out, if the are on the same date. Both dates had a DateTime format. So my first thought was to just strip the date part. I looked at the java.util.Date class and found that most of the methods are deprecated.

Sure, you can pass the java.util.Date objects to a java.util.Calendar and sethours, minutes and seconds to zero.

But I was looking for a smarter way to accomplish the goal. Joda-Time provides a quality replacement for the Java date and time classes. Joda-Time has been created to radically change date and time handling in Java. The JDK classes Date and Calendar are very badly designed, have had numerous bugs and have odd performance effects.

Using Joda, comparison of dates is easy as pie. The toDateMidnight() method for example sets the time part to zero.

Now you can do the compare with a simple date1.compareTo(date2) .

 

Access UserBean from Java

May 8, 2012 – 4:25 pm

I use the userBean that comes with the extension Library in SSJS very often. It is a convenient way to access various properties of the current user.

Today I wanted to use the UserBean in Java. But I could not figure out, how to do. After some help from Stephan Wissel and a few minutes of try and error, I ended up with the following:

package de.eknori.jsf.core;
import com.ibm.xsp.extlib.beans.*;
 
public class User {
 
public static Object getUser() {
return UserBean.get().getField( "effectiveUserName" );
}
}

A UserBean.get(9 will return all fields as shown in the picture below

The getField(String) method lets you access a single value from the bean.

 

SSJS – @CancelPartialRefresh

May 7, 2012 – 5:14 pm

Inspired by the great work of Sven Hasselbach, who blogged about his XSnippet to cancel a partialrefresh, I took the JavaScript code and injected it into my SSJS Extension Project. At the moment, the code is undergoing some testing, but it seems that it is stable and ready for release.

Using a simple @CancelPartialRefresh() in your SSJS code, you can cancel the execution of code during a partial refresh at any point of your existing SSJS code.

[DanNotes] – Presentation SlideDeck

April 30, 2012 – 11:56 am

DanNotes is just around the corner. This is the second time for me to present at this conference.

Here is the slidedeck from my DanNotes presentation “XPages – beyond the Basics“. The session is an extended version of the content, I presented at BLUG 2012.

At DanNotes I have a 2h timeslot.This gives alot more room for demoes and even more topics that can be covered.

Looking forward to the conference and meeting with the other speakers and the attendees, of course.

Small Cause – Big Effect

April 20, 2012 – 2:01 pm

Got a new laptop this week and had to re-install some software. After installing BIRT and a local Domino, I configured BIRT to acces a database on the local server to test DomSQL.

I spent the whole evening yesterday and could not figure out, what was wrong with my configuration. The connection to the server could be established, but no table from the Notes application was accessible.

A few minutes ago, I opened the configuration again. How dumb ( blind ) am I ? The cause was a missing slash … *doh*

[XSnippet:] Refresh applicationScope variables with individual timeout

April 17, 2012 – 9:27 am

applicationScope is a great way to store data, that is available without constantly reading the values from views or config docs. But from time to time even config data changes and when the values are stored in applicationScope, the changes are not pushed to the application in a reasonable timeframe.
The code snippet lets you update applicationScope variables on an individual schedule.

The sample code update applicationScope.test every 60 seconds.

var test = new de.eknori.Tools();
if (test.refreshCache("test", 60)) {
var currentTime = @Now();
applicationScope.test = currentTime;
return "New value: " + currentTime ;
} else {
return "Cached value: " +applicationScope.test
}

The java code uses import static com.ibm.xsp.extlib.util.ExtLibUtil.getApplicationScope;
So you have to have the extension Library in place. Otherwise you have to write some lines of Java to access the applicationScope w/o the extension Library.

Set private boolean debugMode = false to switch off debugging.

My BLUG Presentation

March 24, 2012 – 1:54 pm

Here is the slide deck from my presentation “XPages – Beyond the Basics”

[Review] – IBM Lotus Notes and Domino 8.5.3 Upgrader’s Guide

March 16, 2012 – 4:33 pm

An new release, a new upgrader’s guide. Due to their work at IBM, the authors Tim Speed, Scott O’Keefe and Barry Rosen have a deep knowledge of Lotus Notes and Domino.

The IBM Lotus Notes and Domino 8.5.3 Upgrader’s Guide begins with an overview of the SOA characteristics of Lotus Notes and moves on to the features and changes in Lotus Notes Client 8.5.3, before providing an overview of Lotus Symphony productivity tools.

The book is written for Lotus Notes power users ( whatever this means. So far, I do not know anybody, I would call a power user ) administrators and developers.

I ( as a developer ) think that 60 pages, that cover the new and enhanced features in Domino Designer does not justify a recommendation to developers.
Experienced administrators will get no real information that goes beyond the information  contained in the release notes for a new release of Lotus Notes and Domino.

My favorite content is hidden in chapter 7 / page 207 ff. You will find a small script to export the reports from Domino Configuration Tuner.

I recommend this book to managers and/or decision makers.

It can be leveraged by these people to gain a high-level understanding of the new features and capabilities offered.

TabContainer and RichText Control interaction

March 9, 2012 – 11:27 am

During the last week we were bitten in the leg by an issue with xp:inputRichText in a xe:djTabPane. When opening a new tabPane, the RichText control was not rendered and displyed as a multiline input text control. In Firebug you could see the following output in the error panel.

At least, we were able to find out, what causes the issue, and we were able to reproduce the behaviour in sample application that comes with the extension Library.

Do the following steps to reproduce:

Open core_DynamicTabs (XPage)

Add a xp:inputRichText somewhere in the table that is contained in the xe:djTabPane section.

When you now open the page in the browser and click on a name in the view, you should something similar to this:

So everything is OK so far.

Now change/ add the partialRefresh property of the xe:djTabPane and give it a value of true.

When you now refresh your browser, you will see this

We found other controls that are alse affected. As a result, a complete actionbar in our project refused to function and worked again as expected as soon as we removed the partialRefresh=”true” from the xe:djTabPane.

Have not tested with oter versions of the extension Library, but we saw this behaviour with the latest release as well as with Upgrade Pack 1.

 

Using a RamDisk with Notes Client

March 4, 2012 – 9:45 am

From time to time I have some issues with my Notes Client. In almost every case these issues occur when the CACHE.NDK size is at 30MB.

Bringing the Notes Client down, deleting cache.ndk and let the client create a new file at startup solves the issues.

There is already an entry on IdeaJam to delete the cache.ndk on client startup. (http://ideajam.net/ideajam/p/ij.nsf/0/D599DAE62FA43BBB86257723005994BC). As there is no such option in the client by now, I tried to find a way other than deleting the file manually.

Putting a cmd file into the Windows Startup folder is one option. But I wanted to go one step further. Accessing the cache.ndk does also mean I/O operations on the physical harddrive. OK, I could use SSD, but I do not have an SSD drive in my current environment.

So I decided to give a RAMDISK a try. I found a good one at http://www.ltr-data.se/opencode.html/#ImDisk.

he installer installs he driver as a service, so it can be started at Windows startup. In addition to get the RAMDISK to work you have to create a disk and format it every time Windows starts.

I created a ramdisk.cmd file in my Windows directory and created a shortcut to this file in the Startup folder for all users.

Here is the content:

imdisk -a -t vm -s 300m -m n:
format n: /V:RAMDISK /FS:FAT /Q /Y

The first line creates the disk in RAM ( n:\)  and the second line formats the disk.

In addition, I changed my notes.ini file and added

CACHE=n:\cache.ndk

The next time you start your client, CACHE.NDK is created in the RAMDISK. When you shutdown your computer, the RAMDISK is removed and so a new file is created on every client start.

I will now play with some other notes.ini variables that normally perform disk operations to see, what the side effects are.

FollowUp: Paul Withers: Extending Themes – Custom Pager Labels

March 2, 2012 – 8:47 am

Yesterday, Paul Withers published an interisting article on how to customize pager labels using themes. Themes are indeed very powerful. I would like to show you a more advanced example to customize the pager labels according to the users language.

At is@web we are developing an application that is fully multi language enabled. This means, that all labels, messages and whatsoever comes from resource files. Using resource files, you can translate your application into any language.

All you have to do is to add the resource-bundle to your XPage

I use a static value for src= in this sample; our application calculates the src= value dynamically. The user can choose any available language at runtime.

We also have a managed bean that provides a method to access the resource bundle. I have blogged about this here.

In your theme, you can now calculate the value property of the control using this method.

I will show stuff like this in my #BLUG session: “XPages – Beyond The Basics”

[Guest Post] IBM Should Support IBM Connections, IBM Sametime and Lotus Notes Traveler on IBM i

February 25, 2012 – 8:15 am

Why Should these IBM Collaboration Solutions (ICS) products run on IBM i?

  • IBM i on Power Systems and it’s predecessors have literally hundreds of thousands of installations worldwide.
  • IBM i customers want to leverage existing investments in hardware, software, personnel and training.
  • Running ICS servers on other platforms complicates IBM i customer environments. Many customers have a single IBM i server running their entire business.
  • Better performance – All server to server communications is via the Power Systems high speed bus.
  • Better security – IBM i is impervious to viruses. Period.
  • Better uptime – IBM i has a higher uptime % than any other operating system
  • IBM i is IBM’s most widely deployed operating system, over AIX, Power Linux and zOS.
  • Fewer points of failure – One system to manage, administer, maintain, backup and recover.

200 IBM i customers and IBM Business Partners representing 520,000 potential licenses have already expressed interest in these products only if they were supported on IBM i

Go to this website and tell IBM that you want support for IBM Connections, IBM Sametime and Lotus Notes Traveler on IBM i.

This post was brought to you by my fellow yellowbleeder Steve Pitcher

My BLUG schedule

February 23, 2012 – 5:43 pm

The next BLUG conference is just around the corner. From March 22-23, 2012 the yellow bleeding community will gather together in Antwerp, Belgium.

I’m proud to be on the speaker list and I will present on “XPages – Beyond the Basics“. The session will cover themes, the eXtension Library, JAVA / JAR design elements and also access to relational databases using JAVA and a few lines of JavaScript.

I will arrive on wednesday together with my new team member Sarah Steffen and my good friend Werner Motzet. After a few minutes of discussion, Werner decided to fly in from Nürnberg to Düsseldorf and we then will drive to Antwerp by car.

On Friday we possibly have to leave before the CGS to get Werner back to Düsseldorf airport in time.

If you still not have registered for BLUG, do it now. It’s FREE!! Look at the agenda and see what you are missing …

By the way, here is my schedule for the conference.

 

Access Resource Bundle in XPages from JAVA

January 21, 2012 – 2:35 pm

Today, I tried to figure out how to access a resource bundle and return a value for a given key. I have the extensionLibrary installed and so I’m using some of the methods that are provided by the ExtLibUtils class.

To make the class available in your application, add the following line to your JAVA code.

import static com.ibm.xsp.extlib.util.ExtLibUtil.*;

The next lines of code gives you access to a global variable. When you make use of a resource bundle, a global variable is returned and you can access the bundle via this variable.

public Object getGlobalObject(String obj) throws Exception {
   return resolveVariable(FacesContext.getCurrentInstance(),obj);
}

And here is the funktion that extracts the value from the key/value pair in the resource:

public String getLangString(String bundle,String key) throws Exception {
  try{
     ResourceBundle rb = (ResourceBundle)this.getGlobalObject(bundle);
     return rb.getString(key);
  }catch (Exception e) {
     e.printStackTrace();
     return "##NOT FOUND##";
  }
}

You now can use the method to return a value for a given key from a specific resoure bundle

getLangString('myButtonLabels','CANCEL');

If there is an alternative way, pls. let me know. I’m sure there is. …

PACKT Publishing: IBM Sametime 8.5.2 Administration Guide

January 21, 2012 – 1:26 pm

It took me a while to go thru all of the content, but inally I made it and here is my review.
“IBM Sametime 8.5.2 Administration Guide” was written by Gabriella Davis, Marie L. Scott and Thomas “Duffbert” Duff.

I have attended sessions by Gabriella Davis and Thomas Duff at several conferences and while reading the book, I sometimes felt like sitting in the audience and hear Gabriella and Tom talking. I never had the chance to meet Marie L. Scott but I’m sure that she is as enthusiastic as the other authors.

All of them have a deep knowledge and so is the content of the book.
Every detail of the installation and administration is covered and one should be able to setup a Sametime environment following the description in the book step by step. If I only had this book a year ago, it would have saved me a lot of time then.
My first installation took me more than a week. One week with reading documentation, hanging around in forums and chatting with IBMer Frank Altenburg. And a lot of try and error.

Be asured that, following the book, you can do the installation in less time.
Also, if you are new to Websphere, this book is for you. IBM Sametime is not as easy to setup as double-click a setup.exe and wait. There are many places to look into and numerous properties that can be set or eaven been set wrong.

You can do it the hard way and find out on your own, or invest some money buying this book. There will be an immediate ROI.

The book may also help planning the resources by finding out, what exactly is needed, both hardware and soft skills.

I recommend “IBM Sametime 8.5.2 Administration Guide” to everyone who is new to Sametime, wants to upgrade from an older version and even to those, who already have a Sametime 8.5.x environment running. You will for sure find something in the book that is new to you.

 

I was at Lotusphere 2012 ( for a few seconds ) :)

January 16, 2012 – 5:08 pm

Welcome to DomSQL

January 4, 2012 – 5:11 pm

2012 starts with a big bang. DomSQL has just been released on OpenNTF.

The Domino JDBC Access (a.k.a. DomSQL) exposes Domino data as relational tables and
provides easy access to the tables using a JDBC driver.
JDBC stands for Java Database Connectivity. It is a set of technologies that are part of the
standard Java Runtime environment, used to connect to relational database.

Guess, it will become a long evening now …

 

HAPPY NEW YEAR 2012 !!

December 31, 2011 – 11:59 pm