|Latest 7 Posts
| Preventing pasting of remotely hosted images in CKEditor|
Mon, Nov 14th 2016 2
| Preventing Pasting of Images in CKEditor|
Mon, Nov 14th 2016 2
| Controlling the order of Script Resources (e.g. Jquery) with a Custom ViewRootRenderer|
Mon, Sep 19th 2016 2
| Review: JRebel with Domino OSGi development|
Mon, Sep 5th 2016 2
| Extended Messages Control available as an XspLibrary|
Tue, Jul 12th 2016 3
| Webmail UI – You must learn about MIME|
Wed, Apr 20th 2016 2
| Tips for Creating a Webmail UI with XPages|
Tue, Apr 19th 2016 3
| Uploading Plugins Headlessly to Open Eclipse Update Site|
Sat, Jul 18th 2015 4
| Select themeIds from plugins in Designer Xsp Properties Editor|
Mon, Sep 8th 2014 3
| Build System for XPages and OSGi plugins|
Fri, Aug 8th 2014 3
| Select Bootstrap Themes from Drop-down|
Fri, Jul 11th 2014 3
| XPages PhoneNumber Control - Part 1 Creating a Converter|
Wed, Feb 18th 2015 3
| Extending the Messages Control: Multiple Messages for a Single Component|
Fri, May 29th 2015 3
| Build Automation for XPages Presentation Slides - AUSLUG/Inform 2015 |
Thu, Jun 11th 2015 3
| Associating *.theme and *.xsp-config with Eclipse XML Editor|
Wed, Mar 9th 2016 3
| Inspect Component Properties using Component Binding|
Tue, Mar 8th 2016 3
| My Slides from AUSLUG 2016 Presentations|
Fri, Apr 15th 2016 3
||Uploading Plugins Headlessly to Open Eclipse Update Site
This is a very rough blog post! I am responding to a question on twitter about how to upload plugins to an Update Site NSF automatically (e.g. from a build server) So I thought I would put it in a blog post so it would be available for all.
Any questions / corrections please just comment, there will probably be a mistake or two
Domino comes with a standard 'Eclipse Update Site' NSF which you can load your plugins into, and then configure notes.ini so the server will load plugins from that NSF. It has the advantage that it will replicate to other servers and you don't need to touch the filesystem.
Using the standard update site, you can only upload manually, there are UI Dialog's involved etc.
IBM open sourced the template, and Karsten Lehmann made a modified version available on OpenNTF which is exactly the same but has an agent '(API)' that can be called 'headlessly' to upload plugins from a build server.
It also allows deleting Features one-by-one however it won't delete disabled features I have found.
I have made 3 minor modifications to it for our version
- I made the icons blue instead of purple so I can instantly tell if it is a modified template version
- I added a Form 'HeadlessImport'. When you run the agent, you pass it a document, I decided to allocate this document to a form so I could inspect it after it had run.
- I added a View 'HeadlessImports' to view the HeadlessImport documents.
Importing from Build Server On the build server, you can run a java program (using jars from jvm/lib/ext) to Create a notes session, get the updatesite database, and then call the (API) agent.
You pass a NotesDocument to the agent, and the notesdocument has necessary instructions to either delete all plugins or to import from the site.xml
I have a project on github which has some utilities related to building Xpages and plugins camac/BuildXPages
Within it I have some custom ant tasks, one of which (as of this week!) is the ImportPluginsTask which does all this for me
Now you don't need to be using ant, you can simply take the same algorithm from the source code (in the execute function) and put it in your own java program. Just make sure you have the Notes jars on your classpath. and maybe you need notes prog dir on your system PATH. I am running it on a server with an id that has no password, so you may need to modify it if your have a password on your id file
The task takes the parameters for server, database and location of site.xml file, creates the notesdocument, runs the agent and then checks the document afterwards to see if there was an error.
Note: when I run the agent I see 4 'Object Variable not set' in the output, I don't think this is impacting upon the success of the plugins, I am still to investigate the cause.
Generating a Site.xml
You need to have a site.xml file, I also have a task to generate one from a list of features and plugins.
Let me know any comments questions!
Jul 18, 2015
| Recent Blog Posts
Preventing pasting of remotely hosted images in CKEditor|
Mon, Nov 14th 2016 11:21p Cameron Gregor
In the previous post, I showed how to prevent a user from pasting Images from the Clipboard into CKEditor. This post is of a similar nature but is designed to ensure that users don’t paste images with URLs to external / internal applications.
This post is part of my XPages webmail tips series, and addresses a problem where, a user copies and pastes some HTML that includes images, from a webpage and pastes it into CKEditor for a message that is then sent via email. The recipient is then una
Preventing Pasting of Images in CKEditor|
Mon, Nov 14th 2016 12:43a Cameron Gregor
In the process of developing our XPages ‘Webmail’ interface, we discovered that many recipients were unable to view embedded images in the emails.
After investigating, it was caused by the images being embedded using Data URIs. Support for Data URI Images is not universal, and because it is supported in IBM Notes, everything looked like it was working ok, but a quick test viewing an email in Gmail confirmed a problem when images could not be seen.
What is a Data URI?
You are most lik
Controlling the order of Script Resources (e.g. Jquery) with a Custom ViewRootRenderer|
Mon, Sep 19th 2016 9:28a Cameron Gregor
For example jQuery and some of it’s plugins can have some issues if Dojo is encoded first.
By default in XPages you don’t have too much say in what is written out first, a nifty workaround for this has been shared by Sven Hasselbach (here and here) which utilises the lesser known tag. This workaround ensures t
Review: JRebel with Domino OSGi development|
Mon, Sep 5th 2016 11:53p Cameron Gregor
Last year I finally figured out how to use JRebel with Domino, and I posted a how-to video. I thought I would do a quick follow up to say how it’s going.
It is going great! I can’t imagine giving back my JRebel license. I have gone entire days without restarting my http server.
If you are only developing xpages from within an NSF, and don’t do any OSGi plugin development, then you really don’t have much need for JRebel. But if you are involved in any OSGi Library developm
Extended Messages Control available as an XspLibrary|
Tue, Jul 12th 2016 8:49a Cameron Gregor
A while ago I shared an Extended version of the messages control which allows for multiple messages to be displayed for a single control at the same time.
Originally this was just shared as a ‘control within an NSF’.
One of the problems with the control within an NSF approach is that you repeatedly get an ‘unknown tag’ compilation problem which eventually goes away after a ‘project clean’ but it is very annoying nonetheless.
I receiving a request to package
Webmail UI – You must learn about MIME|
Wed, Apr 20th 2016 10:14a Cameron Gregor
If you were like me, you spent many years developing classic Notes applications before making the switch to XPages. If this was the case, you were no doubt comfortable with the notion of a RichText field.
You probably even occasionally did some RichText manipulation in LotusScript, adding Paragraphs and formatting using RichTextStyles and RichTextNavigators, attaching Files using EmbeddedObjects.
And then XPages comes along, and says “If you want to edit any RichText through XPages, it i
Tips for Creating a Webmail UI with XPages|
Tue, Apr 19th 2016 8:38a Cameron Gregor
Over the past year my main project has been an XPages application for project-related Email correspondence, with formal document management thrown it as well and a bunch of Action Item / comment functionality surrounding it all.
Developing the application as it’s own email client presented a few different challenges that may not be encountered in normal xpages development. Along the way I have come across a few different gotchas that I thought I better make record of, both the the benefit
My Slides from AUSLUG 2016 Presentations|
Fri, Apr 15th 2016 2:45a Cameron Gregor
This year at AUSLUG I presented 2 sessions. ‘Anatomy of a UI Control’ and ‘Using Source Control for Domino Development’. I have just uploaded the slides to the AUSLUG community and thought I would also share to the wider world! Slides and description of sessions are below. If you have any questions please let me know! I hope to share more about extension library / control development soon.
Anatomy of a UI Control
This session was designed to just spark a bit of curiosity
Associating *.theme and *.xsp-config with Eclipse XML Editor|
Wed, Mar 9th 2016 2:47a Cameron Gregor
When you do XPages OSGi Library development in eclipse, you will often have to edit xml files (or xhtml) that have a different file extension than .xml
These are files such as XPages theme files with the .theme extension, and Xsp control configuration files with the .xsp-config extension.
Unfortunately these file extensions are not associated with the XML Editor by default and this causes undesirable behaviour when you double-click them to open them for editing.
When you attempt to open a .theme
Inspect Component Properties using Component Binding|
Tue, Mar 8th 2016 3:14a Cameron Gregor
Inspired by Paul Withers recent component binding post, I discovered another use for component binding whilst I was preparing for my upcoming presentation ‘Anatomy of a UI Control’ this Thursday at AUSLUG.
In my presentation I demonstrate how to determine a component’s Component Family and it’s Renderer Type which are both essential to determine which renderer is selected for the component by XPages.
It is extremely similar purpose to a technique that was previously dem