Tag Archives: XPages Enhancements

Document Locking in XPages

People editing documents at the same time can be a big pain for the developer resulting in unwanted problems in an deployed application. To handle this problem I created a managed bean DocLock to handle the problem. The managed bean stores the username and an id each time the users edits a document. If another user tries to edit the document, you can block the user from entering edit mode. 

To implement the managed bean in your own database is very simple, Copy the java class and add the managed bean setup into faces-config.xml ( check the supplied readme file)

The project is released on Openntf –> Link


Enjoy getting less document conflicts.

Some minor updates to SmallTalk and TinyMce editor

I have today released some small updates to SmallTalk and the tinyMce editor custom control.

SmallTalk needed some polishing to the attachment upload working in the client.

And for the tinyMce control I did some changes in the init scripts because they gave some strange js
errors in older internet explorer browsers so now it should work in IE7 also.


Standby Custom control what does it do

I have added my first XSnippet today and it’s the Standby custom control.
If you add the code to a custom control and drag in into an XPage all events done in this XPage will be intercepted and if the event taks more than 200 milli seconds the dojo standby widget will show up and prevent the user from clicking.




Some of the code were originally created by two great XPage guys
Tommy Valand and Serdar Başeğmez 

Get a progressbar everytime a partialrefresh is fired

I was looking for some code today to get a wait sign when a partial refresh had fired. I found this great article at lotusnotus.com bu that wait sign had to be added to each event (Not my kind of thing 😉 ).

Then I remembered that I saw some code created by Tommy Valand to hijack all partial refresh events.

So I made a cut and paste coding and volia. Standby wait sign every time a partialrefresh fires.

I added code section one and two above and also this section into a scriptlibrary.

You could add this lib to a custom control and add the hijackAndPublishPartialRefresh() function in the onclientload client event. Also add dojox.widget.Standby as a dojo module resource.

When I started to use this I found that it was firing all the time, and I didn’t want that so I did some modifications

You’ll still need the hijack script and this last script.


Update, Latest version of this can be found here
using the designer import tool –> Link

Or XSnippet

My top 5 things that we need in XPages

1. Better Client and OS integration
You need to be able to do things in an XPage that you are used to in an ordinary client.

  • Copy and paste images into the rt field
  • Communicate with the eclipse client framework
  • Integration with other desktop applications
  • Finally get a full integration with symphony documents.
    (Open them directly from an XPage thru code, create from template, set content in Symphony)
2. Integrated Debugger and Memory profiler
Checkout the debugger in visualstudio this is how the debugger should work in my opinion. Start debugging in client code continue over in server side code and back again. NICE ;-). Memory profiler that is built in would also be great and not just for test environments (When do you really need them ? ).
3. More error handling in the designer
Today in the designer you can make errors easily that you will have a hard time finding.


4. WebServices
In all other modern development environments webservices is used alot. We need support for Webservices in XPages both in code and as a datasource.


5. Integrated Extension library
We need the extension library to be integrated into the server and client install.
If it’s installed. It’s also updated like you update Firefox or Chrome, automatically!


This is my top 5 things, no specific order. What are yours?