Monthly Archives: December 2014

2014 a year of change

Looking back at 2014, I see the year that XPages really got accepted as the primary language for Domino.
IBM Bluemix got launched and the response was no XPage support in Bluemix, but in the last 2 months we saw that IBM had changed their minds and now there are talking of some kind of support for xPages apps in Bluemix. Great IBM that will get the community to start using the service even more if you can deploy your apps in a real scalable App Engine. The Domino OpenNTF API, evolved and have lot’s of great features like the graph database implementation.

My 2014 has been almost only XPages Development both internal with our application suite, custom applications for different companies and adding more customers to QNova:s application cloud  that has been a real success for the company I work for. My board work with OpenNTF has just started, lots of things to understand and I hope to be able to contribute even more in 2015.

Hope you all out there have a great holiday and come back in 2015 with new contribution power because we all can do more if we do it together.

 

Holiday Hack: Get some XPage power in old Notes apps

UPDATE: Post with fully working example with serverside redirects working

One of the great things with XPages is the partial refresh that help you to update information inside the page without a full reload of the page. Well that is not possible with older notes applications because it does a full roundtrip to the server each time we change something. But we can update the screen without the users notice it with ajax. What I did was create a copy of the main js function that Domino uses _doClick and replace that with my own copy of that function in onload.

function onloadAjax(){

  window._doClickNew=window._doClick

  window._doClick=window.newDoClick

}

I store the original function within _doClickNew that is the great thing in this case with javascript. Everything is an object including functions and I can place myself before the original function. My function will now be called when something happens on the Domino form. There is two types of events on a old school Domino form. There is a refresh post and a full post, the script detects if you are trying to do a refresh post and convert that into a ajax request. You can also add entries to an Javascript array PartialRefreshArray by pushing new entries PartialRefreshArray.push(“mybutton”) if you then add a button to the form with the id mybutton it will also be ajax refreshed.

But there are some down sides to this functionality, we can’t use server side redirects. When the form is posted the referer is used when returning data, and because we have ajax refreshed the form the url isn’t updated correctly if we have created the document using the following url

server/database/form?openform

What we need to do is to create the document before we open it the first time and load the document using

server/database/view/UNID?editDocument

If that is used the code can imitate partial refresh, but remember no server side redirects can be used, webquerysave agent runs but not the redirect, so if you want to move away from the form you need to use client side JS.

I’ve created a simple database to show the functionality that you can download here 

disk

Conclusion, the partial refresh behaviour can be added but then you need to hack any redirects done using agents and you need to pre create the document and have a scheduled agent to delete the forms not saved.

This is only an hack example not any production code, and may stop working if IBM changes anything.

 

Setting up a sFTP server to be used with an existing Domino SSL certificate

With the new way of creating SSL certs for Domino a new opportunity occurred to me and actually it worked great. Because we create the certificates using OpenSSL the generated Key and certificate can actually be used on the same server to setup a FTPS server. Saidly because the Domino FTP server on OpenNTF.org doesn’t support FTPS I had to use the FileZilla server the setup was super simple.

Run the setup

go into settings and enable FTP over SSL select your .Key file and your certificate file that you got back from your certifier. Also check the other option to force all connections to the server to be FTPS.

FileZilla Server Settings

And now you have a FTPS server that can deliver external content to you Domino server. The last thing you need to setup is the users and groups that should be able to connect to the server.

Update: Paul Farris commented that this is an SSL based FTP server not an SSH based so the real name should be FTPS not sFTP.