Tag Archives: XPages

Update to infinite scrolling snippet

Ferry did write a great snippet to get infinite scrolling in views posted on openntf xsnippets but lately I found that this had stopped working on some server versions. So I did some changes to get this to work on all versions

<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core" xmlns:xe="http://www.ibm.com/xsp/coreex">
 
  <!-- make sure 'add rows' component is hidden -->
  <style>
    .infiniteScroll{display:none;}
  </style>
   
  <!-- add a class for the 'add rows component'  -->
  <xe:pagerAddRows id="pagerAddRows1"
    for="#{javascript:compositeData.repeatId}"
    styleClass="infiniteScroll">
  </xe:pagerAddRows>
 
   
  <!-- small script to check if we need to auto-click the 'add rows' button -->
  <xp:scriptBlock id="scriptBlock1">
    <xp:this.value><![CDATA[$(window).scroll(function(){
    if($(window).scrollTop() == $(document).height() - $(window).height()) {
      if($(".infiniteScroll ul li span").length!=0){
         $(".infiniteScroll ul li span")[0].click();
      }
      if($(".infiniteScroll ul li a").length!=0){
       $(".infiniteScroll ul li a")[0].click();
     }
   }
});]]></xp:this.value>
  </xp:scriptBlock>
</xp:view>

The changes is in the script block where I added a check if we find the span or the a tagg and if that we do a click on the first element found. This is because I didn’t get it to work using JQuerys ordinary click function.

a small list for the environment

Domino 2025 Jam is coming up tomorrow in Sweden and I will attend and see how this event will affect the future of the IBM Domino environment. I’ve created a list of things that I think would be good to have for the future. So here is the list in no specific order for now I will probably come back and update this post more.

  • Support for Cloud based Connections in onpremise Verse
  • Addon Store for Verse
  • More Actions based handling of emails that needs Actions
  • Save searches in Verse as as dynamic folders
  • HTTP/2 support
  • more SQL like syntax in views like Joins
  • Extended FT Search query commands
  • Websocket support
  • Scheduled XPage/Java code, might already be there with updated OSGI in FP10
  • Javascript update in XPages
  • Remove 64K limits in lookups
  • Check if field is to large
  • Add paging in Lookups
  • Support for CSS preprocessors
  • NodeJS in NSF support
  • Install/update Server modules like NPM (great idea Patrick Kwinten)
  • Virtual Server support for multiple HTTPS addresses on one IPAdress
  • Virtual Server Folder Access Control – What folders is accessible from one hostname
  • LTPA Token send as an Authorization header instead of a cookie for better rest support
  • Split upload handling (direct server support would be good instead of creating your own)
  • Attachment streaming for video
  • Round-trip Editing of attachments like we have in the Notes client
  • Support for more names in a single group and/or in names fields
  • Server side setup of Password Change requirements for web users
  • Server side setup of Password complexity for web users
  • 2-Factor login using i.e Google authenticator
  • Bulk import, faster ways to import large datasets from CSV or XML
  • Updated Notesid creation I believe that there is a limit to 1 each ms today
  • Database performance monitor
  • Speed, Speed and more Speed

Feel free to add your entries to the list, I have most certain missed lots of entries.

Making your Domino environment work for you

If you haven’t started using Rest api calls with your Domino environment, it’s time now. This will help you extennd and connect your domino environment to external services or connect external services to your Domino environment.

There is several ways to expose Rest api from the server

  • Domino Data Services
  • SmartNSF on OpenNTF
  • XPage with Json output
  • Domino View displayed as json
  • Lotusscript or Java agent

Here is some ideas what you could do

  • Sending / getting data from ERP system
  • Remote run print jobs
  • Compile Log events from servers or machines
  • Send control files to a cutting machine
  • Get information about how many people is walking thru a door
  • Getting sales numbers from cash registers into the Domino based extranet
  • Automatically get the exchange rate and update this into the system
  • Moving a support case forward in your external helpdesk
  • Connect IOT devices directly to a Domino or use IBM IOT in Bluemix as the collector point

If you have any great additions to the possibilities or need help implementing feel free to contact me or comment below.

Getting data from an HTTPS site in backend using XPages

If you want to connect to an SSL protected site and get information it could be an webpage or a webservice if you are using xpages and the certifier isn’t already in Domino you need to import the certificates.

Open up the Domino Name and adress book navigate to Security -> Certificates

When you are in this view the action menu will have a new option

Select these and import each of the certificates that you have.

When they are imported you need to create a Cross certificate.

Go in to each one of the newly imported certificates and in the actions meny you will have create cross certificate create a cross certificate against the server. Make sure to change from Local to the server in registration server. When you are done.

Restart task HTTP on the server console and you should be able to connect.

If it’s an old Java agent this doesn’t work then you need to import the certificate in the keystore in the jvm.
If you are doing this let me know and I assist you.

 

java.io.File doesn’t work as expected in Domino FP7 and newer versions

I found this error in a java agent first. If you detach a file from a Notes document using Domino Classes and try to get a handle on the file using java.io.File the file isn’t found until you do a new call against the server. I don’t know if this has to do with the change of Java version server side or not but the same code works in FP6.

Code Example

Body.extractFile(strFileName);
File objInFile = new File(strFileName);
if(objInFile.exists()){

But if you go and use java.io.File in an XPage it will not find a file until you reload the page completely, it seams to work fine in FP6 but not in newer versions.

I have tried this on Window 64bit version of Domino 9.01fp6, 9.01fp7 and 9.01fp9

Anybody else seeing the same problems please report against the problem
SPR # PALTAQQLXH / APAR LO92928

If you want to test it in a database let me know and I can supply a sample database

Have you experienced any other bugs related to the Java upgrade?

Bluemix the extension your need to expand your universe

We have everything on our own servers you might say and have no use for IBM Bluemix Cloud services you might say. Well, I think you are wrong, Bluemix will help you expand the reach of your applications beyond borders that you might have today.

  1. Lets say you have an internal audit application and you want some external users to answer on some audits. Bluemix will help you here without opening up or adding a new server
  2. Perhaps you want to get some users in another part of the world to get web access to you application. Great Bluemix will help you here
  3. You have a customer facing application site that you want to be able to scale up easy, no problem Bluemix will assist you.
  4. Your application will improve with input from some IOT devices that is on customer sites. Bluemix will definitely give your help here.

This is 4 examples where Bluemix will help you expand your applications in an easy and affordable way.

If you haven’t started using Bluemix or want to, feel free to contact me.

IBM Domino to be or not to be

screen00094

The last week after MWLUG there has been numerous blog posts about Domino. No roadmap IBM is killing Domino, there is no future for Domino, IBM haven’t released any new releases since 9.01. That is not true at all, if we look at what has been released since 9.0.1 came to market. IBM Domino customers have received 6 fixpacks but they are not only fixpacks they are feature packs. Why, well the Domino http engine has received TLS 1.0 and later TLS 1.2 with new encryption methods. That is a major improvement if you ask me.
And if you go beyond the server and include traveler that I use all the time and see all new functionality that has been released there, and lately the possibility to use the Mobile Verse Client and Outlook mail support.

XPages Extension library has received 17 improvement releases for app development. These improvements has been adding updated one ui theme, jquery and jquery themes. Mobile development components, new xpages components and lots more. Yes, some improvements are better than others.
And with the upcoming FP7 that I hope will include Java 8 support, external view indexes and hopefully more. 

For IBM or other vendors to be able to keep up with everything happening needs new ideas and if you look at the market in general the release of new versions is moving from yearly big releases to quarterly or monthly improvement releases. I would rather want more small releases than one big one with a new number on it.

That is the change I’ve seen with 9.01 from big releases to quarterly improvements both with fix packs but also thru the extension library releases. And after reading some comments on other blogs (Johnnys) from Ed Brill a commitment to deliver maintenance until 2021 that is great if you ask me that means at least security fixes, fixpacks and hopefully new functionality. When everything comes around IBM Domino is a great platform to develop applications, run applications on and administer applications on. Yes it has it’s downsides but doesn’t all platforms have that if you look closely. 

I remember last time when Domino was dead but it’s still here.

Long Live IBM Domino

Updates

We now know that we will get feature packs and Fickpacks that will include most of the features that where scheduled for 9.02. I really hope that we will get the index outside of the NSF update and Live view updates with a interface for administration of them.

Bill Malchisky has created a two part blog post with a Summary of his talk with Barry Rosen Part 1 Part 2

 

Adding OpenNTF extensions the simple way into your IBM Notes client

There is several ways how to add extensions into the IBM Notes client. But the best and simplest way that I have found is to do it this way.

Download the prefered Addon in my case I select the OpenNTF IBM XPages extension library, download the latest version to your computer. Unzip the file in your prefered location, Unzip the zipfile called updateSiteOpenNTF-designer.zip in a new folder.

In you Notes client create a new database in a folder on the server I call mine Client Updatessites and in the New database dialog select advanced templates and Eclipse Update site (9)

New database

Give the database a name of that you like.

Open the database and click on Import Local update site find the site.xml in the client update site folder. (important it has to be the client update site) follow the steps when importing.

import update site

You might say, wait this is like installing this on the server, yes it is but we are adding client code in this case.

When you are done, go to the action menu and select show url:s a dialog appears.

Select the second option nrpc:// press the copy button besides this row.

Second step, importing the site into the client

On the right and side in you client there is a my Widget section

My widget

Click on the three lines at the right side

install features

Now select Configure a widget from and then select Features and Plugins in a update site

screen00049

paste the copied Url press load and press next selecting what you want to install , give the widget a good explaining name and finish.

you will also after a while get the approve install dialogs where you approve the installation.

After this your extension is ready to be used after a restart of the client. But the best thing is that you will get an icon in the “my Widget” section and if your right click that icon you can remove it. Send it to a collegue and an email or publish it to a widget catalog.

Easy simple administration of OpenNTF and other addons in the IBM Notes client & designer

 

Xpage – Exception Notes error: You are not authorized to perform that operation

The first you think when you see this is that you don’t have access in the ACL or that the document has reader or author name fields that is blocking you from updating the document. But there is another option on the database that can give this problem.

Maximum internet name and password

On the advanced tab “Maximum Internet name and password” must be set to the level you want a user maximum to have. This will block any other user acess set in the ACL so if you set Reader here all XPage users will be readers even if you assign Editor, Designer, Manager in the ACL.

Took me awhile to remember this option when I got this error, then it’s time to write a post about it.

Remember that a change of this option takes awhile before it starts to work. Fastest way is to restart http.

Other scenario that also can come from this problem.

Changing to edit mode on a xpage document flashing and back to readmode

Setting editDoument on document action not working.

Do you have similar hard to find errors that you have solved for XPages, make a comment with a link to your blog or write directly in the comment.

Left, right, leftback, rightback and replacesubstring in java

I posted some common string functions that I’ve been using alot during the years in @formula, lotusscript (strleft, strright, strrightback, strleftback) and later in SSJS. So I thought that I need them in Java too. There might be some features like the one with dot in the replacesubstring function, feel free to comment so will I fix that 😉

Hope you find it useful.

OpenNTf.org Snippets