Xpage in Client require extension library? - xpages

I use a link like notes://DOMINO/ELITE/contacts.nsf/persons.xsp?OpenXPage in Notes Client in classic Outline. It works on client that has extension library installed, but not on the client that it has not.
XPage is on server that has library installed and its working properly.
On the client without extension lib installed i get Error 404.

Resources need to be available within the XPages container, which is the Notes Client. So they need to be pushed round to all Notes Clients, either manually to the relevant folder or via a Widget Catalog and policy. For best practices, see XPages Extension Library book chapter 2, pages 40 onwards. It's also covered in a whitepaper I wrote, with a section specifically aimed at admins (the PDF is here).
XPage is on server
Unless the database has "Run server-based XPages apps directly on the server" ticked, remember that the database may be located on the server, but it's processed as if it were a local replica. Which is why #DbLookup with "" to look to current server is bad practice for XPiNC.

Related

Round-Trip Editing with WebDav for Domino

With the Round-trip Editing Library for Domino WebDAV for IBM Domino on openntf which should enable me to open an attachment, such as Microsoft Word, edit, and save it back to the server.
I have configure my server with the necessary information but find it difficult to run the WebDocOpenSetup and the WebDocOpen.exe file on my 64bit window system, any idea how i could go about this?
I wrote this piece of code, so let me explain a few of the challenges you will face:
Windows will open anything that starts with http(s) using a webbrowser and not an app. It happily ignores file extension. Thus a different protocol was needed. I opted for webdav:// (like you have skype://, notes://, sap:// )
the helper application (on Windows - or the script for OS/X Linux) simply reacts on that protocol. The installer simply creates the needed registry entries. You could do that by hand
When you start any office application with an URL as parameter e.g. winword.exe https://.....doc the webDAV mechanism kicks in as desired.
The only thing WebDocOpenSetup does is to set some registry keys and register the WebDocOpen.exe as handler for the webdav(s):// protocol. The source code is included, you might need to recompile it for 64Bit
the helper checks the app needed based on the extension and launches it with the url (webdav replaced with http) as parameter
You can save yourself quite some trouble using https with a proper certificate. Self signed won't cut it
There is an article on my blog explaining more of the background
The registry entries are explained here
You might test with a Mac or Linux first to ensure all is working ;-)
Even without the little helper application you can connect using Explorer webfolders (not Internet Explorer, Explorer)
Good luck!

How do you work around the issue of long load time for initial load of an application

When no users have the any pages in an application open, it will unload the application from the server after a while.
When a user loads a page in the app after it's been unloaded, it can take quite a while to load.
The simplest way to work around the issue is to have an agent that polls a page in the application each morning before any users are online. Is there a better way to do this?
Starting with Notes and Domino 8.5.3, you can use the following ini parameters:
XPagesPreload=1
Preloads XPages java code at server startup so that they are already in memory when a user access an xpages app for the first time.
XPagesPreloadDB=servername!!path/mydb.nsf/myxpage.xsp,servername!!path/anotherdb.nsf
Preloads XPages engine for a specific XPage in a specific database or for all XPages in a database.
Both parameters can be used on the Domino Server and on the Notes client.
As far as I know, the application will be kept in memory even if no user doe access it.

Force a web page to open up in the Lotus Notes client web browser regardless of user preference

We need to force a particular web application to launch in the Notes browser regardless of the browser option the user has chosen. This also ideally needs to be launched from some LotusScript code.
I haven't been able to find a way of doing it so any suggestions would be appreciated.
There's unfortunately no way to force the Notes browser via LotusScript. However, you could look into using policies to restrict the user's default browser: http://www-10.lotus.com/ldd/dominowiki.nsf/dx/03062008102616AMWEBL4Y.htm
If it is possible, I suggest taking a different approach. This likely can't be solved via a technical solution (i.e. the user could always find a way to open the URL in a non-Notes browser if they are motivated to do so). Therefore I would make the recommendation to the user that the application only works via the Notes browser, and leave it up to them to do the right thing. Do that either by training, or putting a message on the web application, etc.
Another idea, if you have control over the web application, is that you could check the browser's User Agent for the keyword "Lotus Notes", and disallow anyone non-Notes browsers from using the application.
Oddly enough I have the issue you want to emulate happening on a Mac. I am not sure at this time if this is expected behavior though (still investigating).
I have a database rendering an XPage on the client. The link is in a rich text field. When the link is clicked it opens in the same tab in the Notes client, instead of the system browser (which is set in the Notes client).
Using Call notesUIWorkspace.URLOpen( Url$, reload%, urlList%, charset$, webusername$, webpassword$, proxywebusername$, proxywebpassword$, notesRetriever )
specifying true for notesRetriever, will open the browser page IN notes (whatever user config).
Don't expect too much of this since this will require the retriever process to run on the Domino server.
I bet your application won't work using a reriever.

Ideas for launching an installed app from a webpage

I am thinking about having the following use-case:
User installs application on local machine.
User goes to our website, and are presented with many links (choices).
User clicks on a link.
Application starts, with some information contained within the link passed to the application.
Step 4 is obviously a security minefield. The end goal is that the user makes a choice, and if the application is installed, it starts with some information passed to it (ie command line parameters, or perhaps a temp file somewhere on the user's machine)
Can I/ Should I access the registry from javascript? Are there any ideas about how I might go about this? Do you have an alternative suggestion?
Assuming the applications the user installs are also developed by you.
Register a file extension for use by the specific application - then your web links can be links to a file that is downloaded and auto-run by your app. The file could contain details on the defaults for your app to use.
Sort of like how clicking on a .pdf file opens your pdf reader.
As an alternative to the file-extension solution you may want to know about Custom Application Protocol feature. Link is for Windows but there are nearly same techniques on other systems. I can't say if this approach works in every browser but you may want to try it out.
Accessing the registry from JavaScript inside a browser is nigh on impossible for the security implications. To access the registry from the web, I'd imagine you'd have to use a binary (C++ or others) program that can read the registry, but also has an HTTP module to communicate with your server.
Sounds like you might need the Click Once deployement feature for your app. I think once it's installed over http there should be a pretty easy way to launch an executable.
http://en.wikipedia.org/wiki/ClickOnce

Browser based WebDAV client?

Is there any good browser based WebDAV client? If not, is it possible to make one?
Look at the AjaxFileBrowser from ITHit. Pretty slick, and has FireFox & Chrome PUT support for uploading. IE, drag-and-drop from your desktop to the browser. They have a fully functional demo site up at http://www.ajaxbrowser.com.
There's a plugin for Firefox which handles WebDAV.
Webfolders is a firefox extension that gives you the ability to view the contents of WebDAV
servers in the browser and use the full functionality of the WebDAV protocol.
Depends on what you expect the client to do, and whether you're looking for a cross-browser "web application", or a browser extension.
The main issue with doing this in a "web application" (as opposed to a browser extension) is (1) the lack of binary data support in Javascript, and (2) the lack of access to the local file system (which of course is a security feature).
There is webdav-js which can be enabled as a bookmarklet or served by the WebDAV server itself as an HTML page.
It supports the regular listing of files and directories, file upload, directory creation, renaming, as well as in-page display of images and other media.
If by browser based you mean that it runs in html (ie you don't want your users to install a plugin) then the answer is partly yes and mostly no.
Partly yes, because I have built and used one. It uses the jquery jtree plugin to display folders, and selecting a folder node populates a file list in the right hand panel. Panels are done with another jquery plugin, and the file list is made dynamic with the jquery datatables plugin.
But I think for you the answer is probably "no". Thats because for the browser to use webdav is must user webdav "methods" like PROPFIND and MKCOL. These methods just arent supported in most browsers, so your javascript can't use them directly. I have a server-side mapping in my webdav server project which allows my javascript to use normal GET and POST methods, and these requests are transformed on the server to webdav methods.
I said "probably no" for you since this serve side mapping isnt standard, its a part of milton. But if you happen to use milton, or you can use milton, then its all good.
Try SMEStorage.com. They turn any WebDav back-end into a personal cloud file solution. As well as a rich browser desktop and mobile client, there are clients for Mac,Windows, Linux and Mobile clients for Android, iOS, Windows Phone, and BlackBerry.

Resources