Quick-n-Dirty: How to use the NAPI in a Java Agent
The undocumented NAPI for direct API calls in Java can easily used in normal agents. You just need to add two jar files to your java agent: lwpd.commons.jar lwpd.domino.napi.jar These files can be...
View ArticleXPages: Modify the File Selection Button
With Dojo, you can easily customize the file upload button, f.e. to change the label, add additional style sheets or use HTML5 or Flash plugin for uploading. Here is basic example which adds a label...
View ArticleQuick-n-Dirty: Use “Old-School” Javacode in your XPages-Application
Because I often have read that it is not possible to access “Old School” Java elements in XPages, but never understood the reason why, I have written my own class loader for fun to demonstrate how to...
View ArticleQuick-n-Dirty: Disable Validation for FileDownload control (2)
Because my old snippet does not work anymore for ND9 (the IBM changed the internal methods / objects) I had to create a new way to disable the validation of the FileDownload control. Now I have...
View ArticleXPages: Events, ActionListeners & Parameters
To access the event parameters of an event within your actionListener, you have to access the source object of your actionEvent object: package ch.hasselba.xpages; import java.util.List; import...
View ArticleXPages: SSJS & How you can have fun at the office
This article is a demonstration of what harmful things you can do when using the SSJS & prototyping wrong (described here by the great Mark Roden). Don’t do that! Especially not on a productive...
View ArticleXPages: Optimized Partial Refreshs
Inspired by the last post of Mark, I have created a small CSJS snippet which allows to optimize the behaviour of a Partial Refresh. Normally, if you execute a Partial Refresh, all elements of a form...
View ArticleXPages: Optimized Partial Refreshs (2)
With the Optimized Partial Refresh you can do a lot of nice things: If only a part of the form is sent to the server, only this part of the components in the JSF component tree will be processed. This...
View ArticleXPages: Use a Method Binding as Converter
I accidentally found a way to add a method binding as a converter to a component, because I have added a managed bean as a converter directly in the source code. The DDE does not support this. If you...
View ArticleXPages: Add an attribute to the BODY-Element
Today I wanted to add an attribute to the <BODY> element of my XPage. My goal was to generate HTML code like this: <body role="document"> After some testing I found a solution by...
View ArticleXPages: Use async / defer option for external CSJS Script Libraries
When adding CSJS libraries to your XPage, try to use the defer or the async option for a better user experience. When not using this options, the Page might be blocked during page load. Have a look at...
View ArticleQuick-n-Dirty: A Hotfix for CKEditor 4
Russell Maher wrote a very interesting article about using CKEditor 4 in XPages, but the current solution requires to change to HTML files directly on the server. But with this little Hotfix you can...
View ArticleXPages: Set a Theme for a single XPage
… or how you can use your own FacesContext implementation. What we need first is our own FacesContext implementation with new methods to set the StlyeKitId (which is the name of the Theme) for...
View ArticleQuick-n-Dirty: Use “isDocEditable” in an old school Java Agent
If you want to check if a document is editable, you can do this in an old school Java agent with the NAPI function isDocEditable provided by the XSPNative class. First you have to add the required JARs...
View ArticleXPages: A Bootstrap Skin for CKEditor
I have found a very nice skin for CKEditor, the “BootstrapCK-Skin”. It gives a bootstrap look and feel to the Editor: The dialogs are also skinned: You can find and download the skin here...
View ArticleXPages: Bootstrap File Input
When using the default file upload control in a Bootstrap application, the default file upload button does not fit anymore to the design: To fix this issue, you can use a small jQuery plugin named...
View ArticleProblems with Handles: When the same document is not the same
Disclaimer: This will work in Java, SSJS and Lotus Script. When opening the same document from the same database in different instances, and then recycle one of them, the other documents will be...
View ArticleYou might not need jQuery
I have found a very interesting website: You might not need jQuery. It contains a lot of usefull solutions for the different IE versions.
View ArticleXPages: Create a Database without Template
On stackoverflow.com, an interessting topic was asked about how to create a notes database programmatically without using a template. The problem is, that it will not contain a Icon document. But in...
View ArticleXPages & Angular.js: Fileuploads
When using Angular.js you sooner or later want to upload a file to your Domino server. But to do this, you not only need some nice looking frontend, you also need some code in the backend. For the...
View Article