A generic approach to display Notes data via a Bootstrap table

This week I became inspired by a question I noticed on Stackoverflow regarding collecting values from Java objects.

For a project we were discussing what to use for display “Notes View data”:

  • jQuery DataTables plugin and use a customRestService via a Java class as data provider for the JSON.
  • a Repeat control and display an Arraylist of Java objects.

Some of the participants liked the jQuery approach because it provides a lot of functionality out of the box (sorting, search, responsiveness,…) and their lack in knowledge regarding Java.

Others were questioning of the Repeat control approach would be flexible enough so we could display easy different sets of data with different number of columns.

So… to the drawing board.

Mostly in Notes views (e.g. via the View Panel control) one column serves as link (often the first) and all others just display data of all kind. In the DataTables plugin the display is flexible because you can define a custom render function for each column which is great. So you could display a button that will call a dialog to interact with the underlying document for example. However this custom render definition resides in a CSJS library so becomes part of the design.

I had already a custom control that could consume properties for the data and how to set a fixed set of columns. So the last part I needed to make flexible.

Because I have an arraylist of Java objects as source for my Repeat control I need to access the fields “on the fly” when rendering the column values. This turned out to be quiet simple because the fields are already in my Java object.

In my approach I provide the columns via a JSON object that could look as followed:

dyntable00

 

And for my columns I repeat it and collect the value from my underlying Java object:

dyntable01

Note: my code is not final, I would to define more types of data and the option to provide a custom render function for each column. So far I only have computation for string and date fields.

I also applied some basic functionality as Pager controls (top + bottom), a Page Sizer control, icon display and row numbering.

Here is what a result might look like:

dyntable001

Nothing special but now now I have just one custom control to display 80% of my tables/views.

Here are the GIST files for the custom control and its configuration xml file.

IBM Champion Nomination

Is this blog-article useful to you? Perhaps you can nominate me as IBM Champion.

Advertisements

Data Source Events

I am currently working on transforming an existing Domino app into an Xpages app. Therefor I took another close look on the Data Source Events as described in the Mastering XPages book. Here is a summary:

A data source on an XPage has many similar events as the traditional Domino document.

Event Trigger
computeDocument
  • Create new document
  • Submit document
  • Reloade XPage
  • Open document
queryNewDocument
  • Create document
  • Reload XPage
postNewDocument
  • Create document
  • Reload XPage
queryOpenDocument
  • Open document
postOpenDocument
  • Open document
querySaveDocument
  • Submit document
postSaveDocument
  • Submit document

The following table gives an overview which trigger executes which Event(s)  (in the order as listed):

Trigger Executed Events
Create document
  1. queryNewDocument
  2. postNewDocument
  3. computeDocument
Submit document
  1. querySaveDocument
  2. postSaveDocument
  3. computeDocument
Cancel document No Event(s)
Reload XPage
  1. queryNewDocument
  2. postNewDocument
  3. computeDocument
Open document
  1. queryOpenDocument
  2. postOpenDocument
  3. computeDocument
Switch document mode No Event(s)

An example you can find described on the Domino forum.

Section type in XPages

I noticed for a section you can specify the type. However when I select the different options in the browser I do not notice so many differences except some padding/margin differences.

However in Designer I notice that the section tries to take form the section types known in traditional Notes.

Is this a XPages in Notec Client only thing or is it just not supported in the web?

Section type = tab looks similar to a tabbed panel to me:

Funny I Love Lotus Notes post

Hello users…
Now look at Exchange, now look at Notes,
Now back at Exchange now back to me,
Sadly, Exchange isn’t Notes.
But if you stopped using inferior one-OS software
You could be as productive as a Notes user.
Look down, back up.
You’re at a conference that everyone wants to attend
What’s in your hand? back to me.
I have in my hand an oyster with a ticket to Lotusphere
The ticket is now diamonds.
Anything is possible when you use Lotus Notes,
I’ll see you in Florida.

IBM Lotus Knows how to screw up your day at the office – .provisioning_rc not found

Today I totally wasted my whole day trying to get Lotus Notes re-installed after it suddenly ‘died’ yesterday. The program did not want to start in standard mode, Designer and Adminstrator client ran OK.

During installation I receive the error message ‘.provisioning_rc not found… blabla’ and the installation quits. Cleaning any reference in the registry and files on the system just won’t help.

So a big ‘FU’ to IBM Lotus for destroying my day at the office. What a crappy software that does not allow to be re-installed! I wonder how many iPods Apple would still sell if you could not re-install iTunes.

IBM Lotus Knows how to screw up your day at the office.

Ps any help is welcome, allthough it will do little good right now due to travelling.

First project on OpenNTF – Bildr

There is a natural discussion going around about the OpenSource community for Lotus Notes Domino.

I have spreaded out my opinions about the state of OpenNTF (read: you could summarize it as: great job what the IBM-ers done so far, although I would have expected something more resources from their company) several times.

Nevertheless I am thankful to the people who have contributed code on OpenNTF and from I have learned quiet a lot.

I guess the best way to show my gratitude and my opinion or reaction on the discussion on OpenSource for Notes/Domino would be by uploading some of my past work as a project.  Dare to share.

Since this is my first release ever on OpenNTF I hope I have selected all the correct options etcetera. Just uploading the information I believe the tool to manage projects on OpenNTF can use a revision too. Especially more ‘collaborative’ applications are difficult to place under the correct category.

Anyway, my project is called Bildr, an application which allows an easy way to upload, resize multiple photos at once. The photos can be navigated via several options in the browser. Visitors can leave comments on photos.

The application is pretty much ‘domino development in the pre-xpages days’ spiced up with some MooTools and Lightbox stuff. I guess the next logical step for the application will be to XPage enable it.

Hopefully this action will lead to a continuous sharing of applications on OpenNTF. Have a nice weekend!

Reviews of web based applications

AppAppeal is a website where you can discover web applications by directory, compare them and read reviews. In other words a nice source of inspiration for defining your portfolio of Notes applications.

It makes you also wonder how up to date the categories for projects on OpenNTF are? I have no idea if their are any plans defined to uplift this project space so it gets a bit of mojo?

In case you know other similar sources as AppAppeal just drop them in the comments.