Tag Archives: XPages - Page 4

Mastering XPages – a good addition to every XPagers bookshelf

As I promised in my previous article  about the book here is the review of Mastering XPages.

I did read the old Mastering XPages from cover to cover over a couple of days when that one came out. And have been using it as reference but not enough I understand now. While reading the second edition of Mastering XPages I had to go back into the first edition several times, was this really in the first edition? And yes it was, I hadn’t read the first edition enough it seams.

I rediscovered some forgotten knowledge about custom controls and communication between custom controls and setting properties on each other. This isn’t something new it was in the first edition, while rereading the updated parts it really updated and verified alot of knowledge for me. Adding some of the new stuff where you get a new angle to things as performance, extending the Notes client XPinc, Mobile and more. All this information together with real example databases where you can try the explained content for your self. I must really say that this is good starting point if you want to start learning XPages or extend you XPages knowledge but If you are a beginner I would still suggest viewing David Leedys Notesin9 JumpStart to XPages first (yes, I know this one is old but still good)

With the updated old content and the new this is really a gold mine and is an great additional resource to the ICS Community with videos and blog posts this really fills it place and the price is if you ask me a bargain for the amount of information you get. And if you use this code IBM3370 in the checkout on IBMPressBooks.Com you get a 35% discount, I also saw that you get the e-book for $10 extra during May 2014 so for a total of $58 you get the hardcopy and the ebook that you can use for search reference.

And to the Authors, great work. Looking for to the next one, because as I see it now we have Mastering XPages, XPages Extension library and the Portable Command Guide books. The missing one is

The Java Developers guide to XPages
with and without OpenNTF Java API

This could really be an interesting book, so who is interested to write it.

Calling web services from XPages the missing part

I had an XPage project where I needed to call some web services to get some information and after reading on different blogs my hopes of getting this to work was almost null. But sometimes knowing your history helps and I remembered how I started to create subforms using dxl for several years ago and that almost everything is stored with in the design note.

So I started to think, does the built in web service consumer create the code inside the design element and yes it did. Great!

Check out my Notes in 9 video here

or continue to read the post

Is there any common things between between this and XPages, Yes. Java! But there is a problem they work in different jvm:s. But when I looked closer to a web services consumer with generated java code, there where 3 jar files attached to the design note. One with the source, one with the precompiled java code and one with the configuration settings.

Let’s export the java code and try, but there isn’t any way to export it. So I created a Lotusscript agent that will export the consumer code, it can be found at xsnippet.openntf.org or here

Import that code into an agent and place the agent inside your database with the created java web service consumer. Run the agent, enter a valid path for the export.

There is only one thing that you need to check when the consumer is created. The consumer java code must be in a package, if not the XPage code will not work or at least I haven’t found a way.

Now Import the two jar files created, in the XPage jar section, or if you are using 8.5.x add the jar files using the package explorer.

Next step: Create a java file that will use the web service code.

And call the code from the XPage.

No modifying java.policy, No special java command line things the only thing is that you must be able to create the java web service consumer and some web services doesn’t work but that I can live with.

This is of course nothing supported by IBM but I will try to convince IBM to build in the export/import action so my agent is unnecessary.

The sample database can be found here

The databases is using free webservices from http://www.restfulwebservices.net/ where I use the soap version instead for the rest service that is not working with the webservice consumer in Domino.

i.e. the stock quote WDSL file can be found at http://www.restfulwebservices.net/rest/StockQuoteService.svc?wsdl and to be able to use this with Domino I change the url to

http://www.restfulwebservices.net/wcf/StockQuoteService.svc?wsdl to get the soap version of the webservice.

HCL Domino call webservice

If you have any questions feel free to send me a comment or use the contact link above

Application Scope lesson learned today

I got an email a few days ago regarding my Document Locker openntf project. The question was why it didn’t work. I tested my application and it worked as expected. But then I thought perhaps the developer is using the code from XPinc because I added a Xpinc page in the project and I must confess I didn’t test that before releasing the project as much as I usually do.

And this was the case, they where using an XPinc application. And the lesson in this was.

application scope is only applicationScope if you run the code from an web browser and not if the XPage is runned as an XPinc application or if you run it using the new Domino 9 XPinc run on server option. 

Application Scope is private in XPinc applications, it is not an application scope that is shared between users.

IBM Notes Domino 9.01 XPages Fixlist

If you look in the IBM Fixlist there are several interesting fixes in 9.01

One of them is that we can close an XPage thu code in the Notes client.

Not a big deal you might think but it is when adding xpage functionallity to “old” design notes applications.

If you have another fix that I’ve missed feel free to comment. Ofcourse all fixes might not end up in the release but we hope.

And also don’t miss the

Designer and XPages news in 9.01 webinar on the 6th of november

Check out the news for designer here Link

RGAU9AYMZHfixes a Domino 9.0 regression where users weren’t able to access the logging information from using the XPages application preloader…
SSCT988KPNfixes an issue where Ajax Type Ahead did not work on a DojoText Box when placed inside a container control set to Dojo dijit…
TAIA8U3HPTFixes an issue with the timestamp for “Created On” on the File Download control where the date/time for the creation date of the document got…
RPEA94WS4Jfixes an issue with the View Panel control where its facet with the value “North” closestag prematurely and so does not display items in that…
HOKA959EL9fixes an issue where the dojo.js file was not being cached by the browser for an XPages application
HOKA986CK8Fixes a Domino 9.0 regression with the handling of attachments where if the file names contain square brackets, e.g. [test].txt., three file…
PHAN984C5FFixes a Domino 9.0 regression affecting multi-threading in XPages where NotesContext was not initialized for the thread when running in the…
PHAN96VDHCfixes a Domino 9.0 regression where the onClientLoad event did not get fired when transitioning between application pages on XPages mobile Single…
PHAN96NEKWFixed a Domino 9.0 regression where the Dojo Time Text Box control (xe:djTimeTextBox) becomes disabled when a Dojo Date Time Constraint…
SODY993E7EFixes an issue with the Run On Server feature where applications, left open in the previous Notes session, will fail to be automatically reopened…
TMDS9ASL6JProvides a new notes.ini – XPagesXulAllowScriptsToCloseWindows=1 – that will cause dom.allow_scripts_to_close_windows to be set to true in XULRunner…
MNAA99XD8MAddresses a specific issue for uploading files which contain certain DBCS characters in their file names on the AIX platform. File names containing…
PEDS954UQUfixes a content disposition issue with Microsoft IE browsers when downloading attachments of the same name.
DEGN966F5Vreverts the behaviour implemented in Notes Domino 9.0 where the Date Time Picker field defaults to today’s date. The default is now blank, the same…
PHAN94NPVCfixes an issue where documents can not be saved the first time if that document includes an attachment that contains an extra Full Stop\Period in its…
KCAR89QNSEfixes a long standing issue where the document size continues to grow when multiple edits are performed
PHAN99PL7SFixes an issue where an InvocationTargetException appears in the console when XPagesPreload=1 is set on that server. This was a regression in Domino…
MDOY97XJ7Yreverts the performance improvements to the View Navigation behaviours in XPages which was implemented in Notes Domino 9.0. All of the known issues…
YSAI96UFNEFixes an issue where data is lost on submission of a XPage that contains a rich text field that is bound to a plain text data source. The fix now…
PCHE8XLHYLFixes an issue with grouped custom properties which have been marked as required in a custom control did not raise an error when added to an…

XSnippet Standby Dialog updated on openntf.org

My xSnippet component on openntf.org Standby Dialog Custom control is updated

After some reports about that the previous version of standby dialog didn’t work with older browsers like IE8

I had some time today and investigated and fixed the problem.

This release 3.2 is tested in IE8, IE10 with and without compability mode, Chrome 29, Chrome Canary 31, Firefox 22 and 23

So I hope this is the most tested and working version of the standby dialog control.

And with the fixes between version 3.1 and 3.2 with checks for previous inits for the hijack functionallity it will be more compatible with other customcontrols.

The new version is available thru xSnippets –> Link

Also available as an database download with a test page –> Link

Guide to IBM Notes and Domino 9.0 Development Certification

The development updates are out and it’s time after the summer to start thinging of dooing the update test. because everybody wants to be a Notes/Domino 9 certified developer right?

I have added resources as links to allmost all parts of the LOT-408 certification requirements list if you find more resources let me know and I will update/add more references to the list.

Let’s check what the requiements to do the test. (from the cert page)

What’s new in Notes Domino 9 resources (Entries above with no link can be found in the resources below)

Wiki Designer 9 News Video1 Video2 cheatsheet pdf from TLCC

view.postscript the connection between backend and frontend JS

Have you ever needed to call a client script after you run some some serverside code.

The answer is view.postScript=”your client side function” this function is available from 8.5.3

The code in view.postScript will be sent back to the browser and executed like onComplete but you can control it from SSJS. Great news or what do you think?

What can I use this for you might ask .

1. Change UI design when the partial refresh has brought up new data

2. If you have a multi window solution use the script to update parent window or close the current

3. Depending of the result do a secondary partial refresh on a case selected panel

If you already used view.postscript, please write a comment about your use case. 

Hide the XPage name in the url, get better web urls.

There is a simple way of hiding the XPage name. Autolaunch an XPage using the database properties.

Notes Autolaunch Tab

But there is a catch, it will only work for the first XPage so if you navigate way to another xpage the magic is gone. there is also another catch the relative path is broken so you need to add a trailing slash. Prev post about that

But that isn’t a problem when you are using XPages so If you build your main XPage and open it using auto launch options, and load the different sub pages / custom controls using partial refresh and the rendered property, the switch control or another control that can load content using a partial refresh.

Also you need to add a trailing slah at the end of the url otherwise you will get problem with dead images and resources not loading.

Your page should work as expected anyway, enjoy.

Tuesday is a buzy day 4 webinars

In my original post I had two webinars listed but Howard and Niklas did comments that there is actually two more webinars at the same day.

TLCC Dojo Grids

And also

How to use the social business toolkit

So four webinars with great content on the same day, hopefully they will be available for later viewing.

Two webinars you don’t want to miss next week

On Tuesday there are two interesting webinars the first one is June Collaboration Talk, IBM Forms is the talk of the day and also a short Intro by me and what I do.

Signup for Collaboration Talk

The second Gamification with XPages presented by Chris Toohey
Gamification webinar sign up here