Tag Archives: XPages

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.

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

Standby Widget goes responsive

The standby widget snippet has need around for a while and doing it’s job in lots of my projects but now more and more of my projects is using bootstrap. So then there was time to also change the standby widget to support bootstrap. This is the first version that will give you a responsive standby “loading” indicator.

Download the updated version here

http://openntf.org/XSnippets.nsf/snippet.xsp?id=bootstrap-standby-dialog

IBM Connect and what I would like to be announced

I usually write a little post about what I would like to see an announcement about in January

  1. XPages for Bluemix leaves experimental hopefully goes Gold.
    So we can use it in production
  2. Lowering the price for data cache used when scaling XPages applications in Bluemix
    pricing today is a joke, data cache cost almost equal to a full instance. So if you want to scale into more instances you have to pay double the price of the instance.
  3. NSF database enhancements both functionality and speed
    Move indexes out of the database, joins, better and faster fulltext search
  4. Data service for IBM Cloudant directly in XPages
    Leverage the full potential of Bluemix directly inside XPages
  5. Database converter from NSF to Cloudant
    Cloudant is almost the same as an NSF database but with more speed and without the need to a Domino server
  6. IBM Verse replaces iNotes as webmail client
    The customers need something new and fresh
  7. Public release of Outlook as a mailclient thru traveler 
  8. Java 1.8 support for XPages 
  9. Javascript v8 support in SSJS 
  10. Domino Designer becomes a Eclipse plugin
    Yes please, let’s get rid of the old version of eclipse and give us access to everything new and the possibility to upgrade it. and have several versions on the same machine.

You can probably think of more things you would like feel free to make a comment

Wild click events on my XPage

Today I had a strange issue on an XPage application I was working on I it didn’t matter where I clicked
my button on the form got clicked. Very strange. First thing I started to look for was if I had some onClick event that was bind wrong. Nope that wasn’t the case.

Then I went over to the client side and thought I could find what event listener that was making the call but this doesn’t say anything to me.

screen690

Then I started to look at the XSP.Attachevents at the bottom of the xpage

But if you have a large xpage and 20 events attached to it, it’s hard to find what is what. The my suggestion is give you components real names. And it was then I found the problem.
Can you spot the difference
screen692

The working client side code
screen693
T
his this the XPage with the faulty code

 

screen695
D
on’t scroll more spoiler alert

 

 

 

 

 

 

 

 

 

Yes, the partial event listener is bound to an object that doesn’t exist view:_id1:_id5
why you might ask, I found that this happens if a button don’t have a name and is set to do a partial refresh.

screen694

Then you will get that you will click the button where every you click on the xpage. Hopefully fixed in a future release with an error or a correctly generated id.

First step how to interact with other Bluemix services

You Bluemix XPage server can interact with other services using the VCAP_SERVICES where all the credentials for contacting other services is stored. This JSON data can be retrieved using

var services = fromJson(bluemixContext.getVCAP_SERVICES());

This will give you a direct access to the connected services credentials and exposed information, the credentials is what I have found updated each time you deploy a new version of you code so you need to use this way to get the credentials.

If you login to your Bluemix dashboard and click on your XPage service icon, you’ll find environment variables in the left hand navigator. This will display the structure of the  VCAP_SERVICES JSON data check it out.

Most of the services has different methods of accessing them, I’m still investigating how to use different services and future posts will show how to use Bluemix services using XPages

 

Is it possible to kill a XPage for Bluemix instance if it’s gone none responsive

I have seen more than once both of own and other developer experience that a loop in XPages gone bad and you have to kill the server. How can this kind of behavior be fixed in XPages for Bluemix will the dashboard work to “kill” the server?

See the answer

Also see my XPages for Bluemix the questions post lot’s of questions is updated with answers

XPages for Bluemix – The questions

When I started to try out XPages for Bluemix I started to create a list of questions for the future because this is in Beta and between now and Gold release some of this questions would be good to have an answer on.

  • What release cycle could we expect to get for the XPages runtime, in relation of getting new versions of extension library and functionality – Answered a monthly release cycle or synced with openntf extension library upgrades
  • Is it possible to install your own OSGI plugins like Debug Toolbar or the OpenNTF Domino API Answer Yes probably already in the next release
  • How do we run scheduled code that we have runned in agents before – Not at this point but the possibility could be there in a future release Answer
  • How to handle Users/Groups/Roles partial answerGroups is not supported and you are limited to 6 web users in the experimental version of XPages for bluemix
  • How to register users thru code, integrate with LDAP, SAMLNot at this point  partial answer
  • How to control JVM Security
  • How to do an automated XPage build process – Could could add git to a Bluemix project and deploy your code the git See post perhaps we will see a ODP git push to Bluemix in the future that would be great. 
  • How to use other Bluemix Services with XPages Answer Answer2
  • How to package an XPage for Bluemix solution as a temple for multi service deployment
  • can a XPages application be run inside a Docker container
  • How does XPages in Bluemix scale – Answer and a very good one
  • Is the database

I will probably get more questions and will then update this post. I will also add any answers I get to this post. If you know any answer please comment.

XPages on Bluemix a first look deploying app

On friday the XPages runtime on Bluemix was released and also the new version of OpenNTF Extension library that enables to work with.

My first impression is that it works great I haven’t had time to do any deep diving into the new possibilities but I thought I should share as long as I have tried it.

To get it to work you need a bluemix account and install the latest extlib into you designer client when you done that you will get a new entry in your preference in the designer.

screen485

I have selected the US South (Don’t know if the XPage engine is deployed in the UK site) write your user name and password and Test Connection

if this is ok your designer is connected to Bluemix

Go to bluemix and setup an XPage Starter app when you have logged in to Bluemix you need to go to catalog and at the bottom click on Bluemix Labs Catalog

screen478

inside this beta catalog you will find the XPage Bluemix engine and also a web starter application click on this entry.

screen480

Fill out an name for you app at the lefthand side and press Create

screen481

Your started application is now being setuped and the next step is to download the webstarter app, I actually don’t know if you need the Bluemix commandline tool and I haven’t been able to download it and had it from before so I couldn’t test with out it, but try without it and let me know.

Snap12

When you have downloaded the starter code go to designer and in the tools menu

screen487

This will start a wizard when you need to specify a path to a bluemix staging area, this area should not be in the client data folder and connect to the bluemix app area.

To deploy your code to bluemix you need to right click on the database and select deploy application remember to sign your database before doing this if you have multiple signers in the application.

screen491

The deployment will take very long time and if you check the Bluemix the application will show as started but it’s not. This might hopefully be improved with better status updates in future releases.

This will add the design database if you want to connect to the data nsf you need to go into Bluemix and download a notes id and connect you will find this information below services in the Bluemix dashboard.

screen492

It seams like the backend data store for the Bluemix is a Linux Domino server because if you browse it you will find regular databases in the root of the server. It will be interesting to see any performance data from the Bluemix setup.

Also read my XPages for Bluemix the questions