5 weeks of XPages

Counting the hours before vacation starts. Looking forward to reading some good summer reading…

51Kx3FxX2bL

Enjoy your summer!

Posted in Fun

New project on OpenNTF: DB Manager Notifier

Today I created a new project on OpenNTF called ‘DB Manager Notifier‘. The application is a tool that can send periodically notifications to persons who are listed as Manager in an Application document in the catalog.nsf on your IBM Domino server.

A typical use case is a Development or Sandbox environment where users are free to install new applications. In such loosely managed environments people tend to “forget” their applications and leave them installed on the server.

The application contains an agent which you can set to scheduled e.g. monthly. The memo contains a default message and an overview of the applications the recipient is listed as Manager, including a doc-link to the catalog document and a link to the application. From there the recipient can decide what to do with their application(s).

app014

The idea behind this app is not to increase the amount of mail people receive but receiving a summary of your applications with links can saves you time doing your application maintenance and may reduce the used amount of disc-space on the server.

Tagged with: , , , , ,
Posted in Applications, OpenNTF

Rooms & Connections now in Google Play

The Rooms & Connections app that I mentioned earlier is besides the iTunes store  now also available in Google Play. So get it there for 22 SEK, 2 1/2 Euro or 3.3 US Dollar and book a room directly from your smartphone / tablet.

Tagged with: , , , , ,
Posted in IBM Notes

Demo of the Single Page Application Wizard control

You can bring a IBM Notes application without much work to the web browser via the Notes Browser plugin. But since Mobile is the standard nowadays that plugin seems to be obsolete almost. So what other options do you have for your enterprise apps?

  • You can introduce a mobile application platform, if you have the time and the money.
  • You can migrate your whole collaboration platform in exchange for something less, similar or not similar at all. And prey for mobile tools on that platform.
  • You can rewrite your apps and deliver them with the help of frameworks as mobile web application or in between solution.

Or… you save yourself the time & bucks and install the Extension Library version that contains the Single Page Application wizard from OpenNTF.

I have made a video in which I demonstrate how to mobilize the fakenames application in a couple of minutes. First I will describe the wizard and how the process for mobilizing an app looks like. Then I demonstrate the actual development which will take about 8 1/2 minutes.

Update – watch on Vimeo

Video on Vimeo: http://vimeo.com/99537780 in case you experience the message ‘This video is not available in your country’.

Youtube

Enjoy the video!

In case you want to contact me on mobilizing your Notes app, just send me an email.

 

Tagged with: , , , , , ,
Posted in XPages

Adding search to an application with XPages interface (quickly)

For a project I was asked to deliver a new user interface for the web browser with the help of XPages. This included a search functionality.

First step: Look on OpenNTF

OpenNTF is a great resource to check if someone has done development before and has made the code available for public.

Here are some results that offer some form of search out of the box:

  • Advanced Search XPage Control (link)
  • Xpages Multi Database Search Custom Control (link)
  • Xpage Search And Tagcloud control (link)
  • XPages Basic Search (link)

I decided to go for the Advanced Search control. In case I have missed a great project on OpenNTF that provides a good search please drop a line in the comments.

Step 2: Modification

The Advanced Search control did not use any fancy from the extension library. So instead of the viewPanel control I decided to use the dataView control, plus the tooltip control to reduce the initial amount of text on the screen. Then I added some pagers from the extension library control again and voila here is the result:

Screenshot_4

So my search is ready in a couple of hours. Who says XPages is not rapid application development?

Thank you

A big thank you to all those who contributed their work to OpenNTF!

Tagged with: ,
Posted in Design, development

Tag cloud with data from another application

For a project I needed a tag cloud to provide some alternative navigation to a view. Easy I thought; such control is part of the XPages extension library. However it turns out that this control does not support to use a view from another application/database as the data-source.

Some examples I found (1), (2), (3) required some work anyway so I wrote a quick prototype based upon the tag cloud component described in the OneUI documentation. The tag cloud is really simple but for now it does the job (as it appears). Here is the code.

<?xml version=”1.0″ encoding=”UTF-8″?>
<xp:view xmlns:xp=”http://www.ibm.com/xsp/core”&gt;
<xp:panel tagName=”div” styleClass=”lotusTagCloud lotusChunk”
style=” overflow: hidden”>
<xp:text escape=”false” id=”txCloud”>
<xp:this.value><![CDATA[#{javascript:importPackage(java.util);

var viewPrefs: NotesView = database.getView("$v-preferences");
var docPrefs: NotesDocument = viewPrefs.getFirstDocument();
var serv = docPrefs.getItemValueString("tx_server");
var faqdb = docPrefs.getItemValueString("tx_loc_faq");

var db:NotesDatabase = session.getDatabase(serv,faqdb);
var vw:NotesView = db.getView(compositeData.vwSource);

var coll:NotesDocumentCollection = vw.getAllEntries();
var totalNum:Integer = coll.getCount();
var myNum:Integer;

var result:String = "";

var ref = compositeData.ref;

var nav:NotesViewNavigator = vw.createViewNav();
var ve:NotesViewEntry = nav.getFirst();

//some calculation first...
var high:Integer = 0;
var low:Integer = 1000;
var max:Integer = 5;
while (ve != null) {

if (ve.isCategory()){
if (ve.getChildCount() > high){
high = ve.getChildCount()
}
if (ve.getChildCount() < low){
low = ve.getChildCount();
}
}

// Get the next entry and recycle the current one
var tmpentry = nav.getNext();
ve.recycle();
ve = tmpentry;
}

var range:Integer = high-low;
var factor:Integer = max*low;
var ceil:Integer = max-1;

//create cloud...
var nav:NotesViewNavigator = vw.createViewNav();
var ve:NotesViewEntry = nav.getFirst();

while (ve != null) {

if (ve.isCategory()){
cat=ve.getColumnValues().elementAt(0);
myNum=ve.getChildCount();
var myScore = Math.round(((ceil / range) * myNum) + (high - factor) / range);
result+="<li><a class='lotusF" + myScore + "' href='" + ref + cat + "'>" + cat + "[" + myNum + "]</a></li>”
}

// Get the next entry and recycle the current one
var tmpentry = nav.getNext();
ve.recycle();
ve = tmpentry;
}

return “<ul>” + result + “</ul>”;}]]></xp:this.value>
<xp:this.attrs>
<xp:attr name=”role” value=”navigation”></xp:attr>
</xp:this.attrs>
</xp:text>
</xp:panel>
</xp:view>

Code walkthrough

The code resides in a custom control which uses 2 properties; one for the view to use as data-source and the link to use to redirect to. The links will direct to a page with a view that will be filtered by the ‘selected text’.

The code resides in an application that reads data from another NSF that does not contain any XPages code yet. In the project will deliver a new web interface for an existing Domino application and I wanted to avoid code collision. The ultimate goal would be to remove all the “old-spice” Domino code one day. So for now I have a preferences document where I store the location of the data-source application.

I go through the data-source view twice :-? since the application does not have so many documents this is (still) acceptable. The values for the tags are calculated and at the end we write the values back to the screen. The CSS in the OneUI does the nice styling job.

Screenshot_2

Tagged with:
Posted in XPages

New app in town: Rooms & Connections

This post is for all you IBM Notes users:

I assume you all have experienced the problem of finding an available room when you register a new entry in your calendar. Especially with spontaneous meetings it is frustrating not be able to find a room, and if you check at the physical location the room seems to be empty.

You have then the option to start/open your laptop, open one or more the resource reservation applications and find out who has booked the room, contact the person and ask if he/she really needs the room at the moment OR dive in the room and sit uncomfortable because people could appear later and you have to find another room and start the meeting from scratch.

Those days are over! 

The Rooms and Connections app is an indispensable tool to find room information via your smartphone or tablet or book a room.

 

 

 

Tagged with: , , , ,
Posted in Applications
Introduction
I am Patrick Kwinten. I am a IBM Notes Domino Product Specialist since 1996. With this blog I am trying to give my contribution to the community.
.
OpenNTF
Follow my projects on OpenNTF. Below are some examples:

Categories
RSS Feed
Follow

Get every new post delivered to your Inbox.

Join 201 other followers