|I have spent a large chunk of the weekend and tonight trying to make a suite of XPages applications work in both XPINC and the browser.
I’m still confused
How it works when everything is in the same database
If you want to open a document from a repeat when it is from the same database the recommended method is to use Open Page simple action using parameters and it works really well for both browser and XPiNC and is also helpful in that it is a put request rather than a GET request ( Mastering XPages page 658 ) – apologies to Tony McGuckin who I promised I would blog this 9 months ago.
The problem with data sources from other Notes databases
OK, so XPages is all about consolidating the presentation of multiple data sources in one place.
How then do you open a document from another database via a repeat ?
The crux here is that the dialogue above only presents “XPage” choices for the current database and there is no way of computing the other database – so you cannot use the simple action method.
Well for the browser you construct a URL, that is pretty straight forward. But what do you do for XPiNC ?
There are 3 methods which I believe should work although I have found that 2 are very flaky for me.
1) You can modify the underlying form associated with the XPage so that if the document is called then it will automatically be presented as the relevant XPage
To do this you would use a URL like this :
notes://server as common name/0/universalid
The downside to this is that where I work our “Best Practice” is to be able to open the back end forms as native Notes forms for administration and troubleshooting – it is a very powerful tool.
I also have some suspicions as to whether the specified server is honored in this scenario.
So all in all not a good option.
2) You could call the XPage using the following construct
notes://server as common name/dp replica id/xp_f_document.xsp?openXPage&action=readDocument&documentId=8E800DB89E9E144A80257968004CDEE4
This should work although case sensitivity may be at play on our linux server – its hard to tell sometimes as daft as that sounds.
This method only works on 2/3 of my documents. I have eliminated issues with the logic on the XPage being the cause by using a very simple XPage with no improvement
So all in all not a viable option.
3) You could use a non rendering XPage with a “before render” script to redirect to the correct document.
This would be in the target database but might be more than 2/3 reliable. This would be a pure frig but I am tempted.
Again, not a great choice.
I have been on a real high with XPages of late and we have been doing some great stuff which I hope to share soon. But this project is dual XPINC and Browser.
Just at the moment I am beat – this feels like the dark days of XPages 8.5.0 and 8.5.1 – spending hours and days getting nowhere and feeling like you are the first to try something and find it lacking.
If XPINC is to be a first class client and if IBM is to deliver the vision of code once deliver on many platforms ( which is so so close based on my recent experience ) then XPINC needs to get more exposure inside IBM.
It simply wasn’t usable in 8.5.2 but is much better in 8.5.3. Darren Duke once said that he would know XPages was here to stay when the mail client was in XPages – in my opinion that would make a big difference in flushing out the issues.
Come on IBM, drink your own XPages champagne.