Dec's Dom Blog

Setting Up A RedMine Server On Ubuntu For Source Control
Tuesday, January 3, 2012 3:36 PM

One of the topics I'll be covering in AD102 : Source Control For The IBM Lotus Domino Developer will be using a bug tracking system that is integrated into your Source Control solution.

The actual setup of such a system is way beyond the scope of the presentation as it is a bit tedious and would be impossible to cover in the allotted timeframe so to make things easier I've written up an installation guide and shared it on EverNote. This setup makes use of a third party plugin that assists in the creation of your Source Control repository and provides options for automatic GIT, Mercurial and SVN repository creation

You can access the installation instructions here. Also included are sample configuration files that you can copy and paste from to make your setup faster.

AD102 will be on MONDAY 16th at 1pm in Swan - Toucan 1 & 2. I can't remember if that is a big room or not so get there early if your planning on attending this session. Even if your a lone developer in your company source control is important and will make your development tasks a lot easier.

Signature Capture Control Now On OpenNTF
Friday, December 30, 2011 11:55 AM

The signature capture control is now available on OpenNTF licensed under the APL V2 license.

Using a HTML5 Canvas to capture a signature on the iPad from XPages
Wednesday, December 28, 2011 5:30 PM

One of the nice things about the ipad is being able to use your finger or a stylus to 'draw' your signature in an app and then have it captured. There are some easy to use frameworks to do this in native apps but if you are building XPage application then you can't use those frameworks unless you plan to create hybrid apps using PhoneGap or Titanium.

However the iPad and other touchscreen devices all use HTML5 compliant browsers and with HTML5 there is a new canvas tag that sets up a drawing area. Using the touch events you can figure out where the persons finger is and then draw on the canvas as they move it around. As the signature is being drawn you can also capture the X Y coordinates used by the canvas and store them in an input field so when the form is submitted you have all the information required to regenerate the signature.

Using these concepts I've build an XPages custom control that you can test out here. Once I've tidied it up a bit and tested it some more I'll release it on OpenNTF. This control works on both touchscreen devies and on your desktop machine using your mouse to draw the signature. The large blocks of data you see in the view in the test application is the jsonified array of coordinates used to save the signature.

Enjoy!

Source Control for the Domino Developer at Lotusphere 2012
Tuesday, December 6, 2011 9:01 AM

The Lotusphere abstract notifications were yesterday and I'm pleased to announce that the abstract that I submitted was accepted. It is a great topic that I hope attendees will be interested in.

 

Source Control For the Domino Developer
Application Development Track

 

This is a beginners introduction to source control using both client/server and distributed source control systems like SVN, Mercurial and GIT. I'll be talking about things like branching, merging, changesets and other aspects for how source control can make your development life easier.

 

Then I'll be showing them in action in the Domino Designer and finally showing off an open source system called RedMine which is a source control integrated defect/feature tracking system.

 

Using source control does not mean you need to work in a team of developers, for the lone developer out there source control is just as important and in some cases can make your development practices even easier to manage.

 

Hope to see you there and thank you to the Lotusphere content management team and track managers for selecting this abstract.

 

 

A new version of fileSendr has been released.
Sunday, July 17, 2011 2:23 PM

A new version of fileSendr has been released on OpenNTF. It features a new multi-file upload control based on jQuery Uploadify that should resolve a lot of the issues people have had with fileSendr in Internet Explorer in the previous versions.

I've also reworked the custom messages that can be sent as part of the notification to the recipients so that they are now using the richtext CKEditor field and if your running the beta of Domino 8.5.3 then you can also use the new oneUI V2.1 styles right from the application configuration.

There have also been lots of bug fixes and tweaks that will make the application more user friendly and additional security checking to hide uploaded files away from people who don't have the correct urls to the files.

One thing to note is that due to the new upload system the Amazon S3 support has been disabled in this version for the time being.

Access the OpenNTF project here :  http://www.openntf.org/internal/home.nsf/project.xsp?action=openDocument&name=fileSendr.

Single Copy XPages Design
Wednesday, June 22, 2011 5:38 PM

Introduced in 8.5.2 there is a feature called Single Copy XPages Design ( or SCXD ) that hasn't really had a lot of press. Not to be confused with Single Copy Template ( SCT ) this is a feature that can save you a lot of disk space and increase XPages performance if you have a lot of XPages application that all use the exact same template.

To get SCXD working correctly you need two versions of your application template. Lets call them SCXD Master Template and SCXD Servent Template. The SCXD Master Template will contain all the Xpages design elements, forms, views, resources, themes, css files etc. The SCXD Servent Template will just contain the forms and views and a single blank XPage so that you can point the database launch properties to something.

The next stage is quite simple. Create a database from the SCXD Master Template. Then in the SCXD Servent Template set the Application XPages properties to enable the SCXD system and point it to the SCXD Master Database that you just created.

Now for each of your XPage application that use the common template you can replace the design with the SCXD Servent Template.

Once you have finished replacing the design of the databases you need to issue a 'Restart Task HTTP' so that the XPages processor can start using the new SCXD database.

If you have lots of databases using this single template you get lots of benefits. The first being disk space saving, you don't have to have all those xpages design elements and resources in multiple databases. Secondly is the XPage renderer only needs to load these design elements and java classes into memory once so you get rid of that small delay that sometimes happens when opening a XPage app for the first time ( this can be made even faster with the XPagesPreLoad option coming in 8.5.3 being pointed to the SCXD Master Database).

I started looking at SCXD because we're developing a system where there will be a couple of thousand ( about 35,000 ) NSFs all using the same design. By being able to remove the XPage design elements we see an instant disk-space saving of over 90Gb and I'm sure the users won't be complaining about the performance increase also.

There are more details about SCXD on the Domino Dev Wiki @ http://www-10.lotus.com/ldd/ddwiki.nsf/dx/Single_Copy_XPage_Design

If you have a large number of XPage apps using the same template it's well worth checking out.

Easier deployment of ExtLib ( and other OSGI plugins ) in Domino 8.5.3
Wednesday, June 15, 2011 6:02 PM

 

Disclaimer :

"This is beta software from IBM and does not represent a commitment, promise or legal obligation by IBM to deliver, in a future release of Notes/Domino or Lotus Notes Traveler, any material, code or functionality described/shown in this presentation."

-------------------------

 

I should repeat the disclaimer on this one as it's not in the release notes yet so there is no guarantee this will make it into the final released version of Domino 8.5.3 but from what I've been told the feature has tested very well.

 

To make the deployment of OSGi plugins like the Extension Library from OpenNTF easier a couple of updates have been made to the UpdateSite template and a new notes.ini variable has been added to Domino 8.5.3.

Firstly the UpdateSite has a new 'Sign' button that will allow you to sign all the documents in the UpdateSite. So if your going to be deploying ExtLib using this method you would create a new UpdateSite database based on the template and then import the UpdateSite from the ExtLib and then sign it. Only updates that have been signed can be deployed using this new method. Lets say we created our updateSite to be called Admin\ExtLib.nsf

Next you need to add in a new notes.ini variable on the Domino server called OSGI_HTTP_DYNAMIC_BUNDLES and point it to the UpdateSite database. In this case our new notes.ini variable would read OSGI_HTTP_DYNAMIC_BUNDLES=admin/extlib.nsf

Once this is done all you will need to do is issue a 'Restart Task HTTP' and when the HTTP task restarts it will tell the OSGI loader to read in the plugins from the database.

if your UpdateSite database isn't at the correct version then you'll see an error message during http startup stating that the view $vwOSGiLoader is missing.

If everything has gone successfully then you will see a message saying 'NSF Based Plugins are being installed in the OSGI runtime'.

One of the nice things about this is that when newer versions of the plugin become available all you need to do is import them into your UpdateSite NSF and then restart the HTTP task.

Another thing that you will notice is that the plugins stay in the NSF and don't get extracted out to the workspace\applications\plugins folder so if you have deployed older versions of ExtLib you can now get rid of all those old files and have a cleaner deployment.

And this isn't just for ExtLib. You'll be able to deploy any OSGi plugins to your Domino server this way. if you have heard of GBS Transformer then you may know that they have their own set of XPages Extensions that are deployed via OSGi plugins so they could be deployed using this method.

Fingers crossed that this feature does make it into the Domino 8.5.3 final code. It's going to be great for admin and developers alike.

Red and Yellow and Pink and Blue
Tuesday, June 14, 2011 2:28 PM

 

Disclaimer :

"This is beta software from IBM and does not represent a commitment, promise or legal obligation by IBM to deliver, in a future release of Notes/Domino or Lotus Notes Traveler, any material, code or functionality described/shown in this presentation."

-------------------------

Maybe not all the colors of the rainbow but oneUI has been updated in Domino 8.5.3 to version 2.1 which includes a couple of new colors, yes, including pink.

 

The new oneUI V2.1 colors are : Blue, Gold, Green, Onyx, Orange, Pink, Purple, Red and Silver

 

You can use all of these themes in your own applications by pointing the theme name to oneuiv2.1_xxx where xxx is one of the colors above or you can extend your own themes using the same theme name. There is also a oneuiv2.1 theme with no specific colors and a oneuiv2.1_gen1 which I still need to look into.

All of these themes still use Dojo's Tundra CSS for the Dojo elements and not the newer Claro theme however it probably wouldn't be too much work to copy the supplied theme files and replace all references of Tundra with Claro if you prefer that look and feel for your dojo widgets.

 

ALSO...

 

The Domino 8.5.3 installer code no longer removes any theme files that you may have created yourself in the domino\xsp\nsf\themes folder. In the past if you created a theme file here and then upgraded your Domino server your theme files would be removed. This fix allows you to create your own company standard theme file that you can then just reference from your XPages applications or you may have some special themes for mobile devices that you can use with the ExtLib Mobile Controls in this folder.

Baked in Source Control Enabler in IBM Domino Designer 8.5.3
Monday, June 13, 2011 4:05 PM

 

Disclaimer :

"This is beta software from IBM and does not represent a commitment, promise or legal obligation by IBM to deliver, in a future release of Notes/Domino or Lotus Notes Traveler, any material, code or functionality described/shown in this presentation."

-------------------------

Last year IBM released a 'Technology Preview' on OpenNTF for Source Control enablement of Domino Designer. This plugin worked on Domino Designer 8.5.2 and the good news is that the current beta of 8.5.3 has the plugin baked right into the code.

Source control is a very hot topic when it comes to Domino Designer. It was shown off at Lotusphere to great applause.

The plugin itself does not do the source control. All it does is help you create a flat-file / on-disk version of an NSF and keep it in sync. when you change a design element in Domino Designer it is synced out to the on-disk version and if a change is made to the on-disk version it is synced into the NSF.

You then need to install a source control plugin into your Domino Designer, this can be a simpler client-server style source control system like SVN or a distributed style one like Mercurial or GIT. They all have advantages and disadvantages. Personally I've been using Mercurial and I'm also running a RedMine server for issue tracking that works great against my Mercurial repositories.

A little bird whispered in my ear that there MAY be a NoteIn9 video about source control, mercurial and RedMine coming out soon...

XPages and HTML5 gets easier in IBM Notes/Domino 8.5.3
Monday, June 13, 2011 2:02 PM

Disclaimer :

"This is beta software from IBM and does not represent a commitment, promise or legal obligation by IBM to deliver, in a future release of Notes/Domino or Lotus Notes Traveler, any material, code or functionality described/shown in this presentation."

----------------------

The embargo on talking about the upcoming IBM Notes/Domino 8.5.3 release has been lifted and a couple of others have already blogged about some of the new features like the JS/CSS Aggregator or the new Java design Element but I wanted to mention a small feature that's going to make life easier for anybody working on HTML 5

First of all the application properties page now has an option to allow you to select the HTML DocType for all the pages generated by your application. One of the options listed here is HTML 5.

Next there is a new property type that has been added to a number of controls called 'Attribs'. Currently you can find them in the all properties section of the control. The idea behind this is to allow you to add additional attributes that will be rendered to the browser which will allow you to add html 5 attributes to your controls. So if you want to add the 'Placeholder' you can add the following to your inputText control :

<xp:this.attrs>
<xp:attr name="placeholder" value="This is the placeholder text"></xp:attr>
</xp:this.attrs>

These two new features alone will make working with HTML5 in XPages much easier.

Setting Up A Source Control Server with Domino LDAP : Part 7
Sunday, February 20, 2011 11:11 AM

By now you have your Mercurial Source Control server up and running, If you go to http://yourserver/admin and log in you should be able to create a new repository. Go ahead and create a test repository and then load up Domino Designer.

Before you can use Source Control in Domino Designer you will need to make sure that you have installed the Source Control Enablement Plugin for Domino Designer V8.5.2. ( if you are on the 8.5.3 Managed Beta this plugin is already installed for you however as it is a beta this capability may not be present in the final 8.5.3 release. The Source Control abilities in 8.5.3 were announced at Lotusphere 2011 with the same disclaimer.). Download the plugin and install it as per the instructions on the OpenNTF website.

The Source Control Enablement Plugin is only half of the solution, all it does is convert the .NSF file into an on-disk project that can be seen by your Eclipse source control system. Once you have installed this plugin you still need to install your Source Control plugin. As we are running a Mercurial Source Control server we'll need a Mercurial Source Control plugin. Here I recommend MercurialEclipse which is easy to install. Just click on the File - Application - Install menu option in Domino Designer and select the option to search for new features to install. Then in the next dialog box create a new Update Site that points to http://cbes.javaforge.com/update and then click next. Select the new features and install them and restart Domino Designer when prompted. You now have Domino Designer setup for Source Control, in the next section I'll show you how to link an NSF to your Mercurial server.

As a side note, you can install multiple Source Control solutions in your Domino Designer client, so if you need Mercurial Source Control for one project but need SVN Source Control for another project then this is no problem, you just need to install both Eclipse plugins.

Setting Up A Source Control Server with Domino LDAP : Part 6
Sunday, February 20, 2011 10:45 AM

So now we need to configure phphgadmin so it will work with our Mercurial server. lets start by editing the configuration file.

sudo vi /var/www/admin/application/config/phphgadmin.php

There are quite a few edits that we need to do to this file to get everything working. First we need to set the base URL so find the line starting $config['base_url'] and set the value to something like

$config['base_url'] = "http://yourserver/admin/"

When you create a new repository your can have a number of default values preset by changing the following lines. I suggest setting allowpull to 'true' to allow people to clone the repositories and push_ssl to false to allow contributors to push changes to the repository over http. the allow_read should be set to * to allow anybody, including anonymous, to clone the repository and the allow_push can either be * to allow all authenticated users push changes back up to the repository or you can put in usernames to restrict it to specific people.

$config['default_hgrc']['general']['paths']['default'] = '%1$s%2$s';
$config['default_hgrc']['general']['web']['allow_archive'] = '';
$config['default_hgrc']['general']['web']['allow_push'] = '*';
$config['default_hgrc']['general']['web']['allowpull'] = 'true';
$config['default_hgrc']['general']['web']['allow_read'] = '*';
$config['default_hgrc']['general']['web']['contact'] = 'your@email.address';
$config['default_hgrc']['general']['web']['description'] = '';
$config['default_hgrc']['general']['web']['name'] = '%2$s';
$config['default_hgrc']['general']['web']['push_ssl'] = 'false';
$config['default_hgrc']['general']['web']['style'] = 'monoblue';
 
Next scroll down through the file till you find the lines starting with $config['profile']['default'] and edit the lines to read as follows, making sure to change the url to your servers url.
$config['profile']['default']['ini'] = '/var/hg/hgweb.config';
$config['profile']['default']['default_repo_dir'] = '/var/hg/repos/';
$config['profile']['default']['hgserve_url'] = 'http://yourserver/hg/';
$config['profile']['default']['default_hgrc'] = $config['default_hgrc']['general'];

You should also delete the 4 lines that start with $config['profile']['test'] as we don't need them.

Save the file and then perform the following commands to enable the Apache Rewrite module and restart the apache server. You also need to give special permissions to a lock directory for phphgadmin.

sudo chown www-data:www-data /var/www/admin/lock
sudo a2enmod rewrite
sudo /etc/init.d/apache2 restart

You should now be able to go to http://yourserver/admin and be able to create new Mercurial repositories.

Setting Up A Source Control Server with Domino LDAP : Part 5
Sunday, February 20, 2011 10:37 AM

At this stage we now have a fully functioning Mercurial server but we have not created any repositories yet. A repository is where you sync your source code to, you need one for each application/NSF that you'll be building. We could create them manually using the 'hg init' command but if you have a lot of projects then this can become a tedious process of having to log into the server every time somebody needs a new repository. Instead I'm going to install phpHGAdmin. It's a PHP based management system for Mercurial. This step in the process is a little complex but once it's complete you'll find managing the system will be a lot easier.

First off we need to download the phpHGAdmin software. The command below will download the version current at the time of writing this entry but if it dosen't work then you can find the latest version on https://bitbucket.org/joshjcarrier/phphgadmin/downloads and substitute the newer url in the command.

wget https://bitbucket.org/joshjcarrier/phphgadmin/downloads/phphgadmin-1.1.20100623.zip

Once it has downloaded we can unzip it using the unzip command. The unzip command if not installed by default on Ubuntu Server so before we can unzip the software we'll need to install unzip.

sudo unzip phphgadmin-1.1.20100623.zip -d /var/www

The files have been unzipped into the /var/www folder and now we need to make Apache aware of the new folder and setup a couple of special Apache settings. Lets edit the /etc/apache2/sites-available/default file again and add in some special directives for phphgadmin.

sudo vi /etc/apache2/sites-available/default

and add the following lines below the <Directory /var/www/> section just above the ScriptAlias line, replace the 'username' in the 'require user username' line with the username of the person you want to have administrative rights to the system.

<Directory /var/www/admin/>
AllowOverride All
order deny,allow
allow from all


AuthBasicProvider ldap
AuthType Basic
AuthzLDAPAuthoritative off
AuthName "Mercurial Server"
require user username
AuthLDAPURL "ldap://yourserver.com:389/O=YourOrg?CN?sub?(objectClass=*)" NONE

</Directory>

Save the file once you are done. Before we restart Apache we need to enable the rewrite module. Here's the command to turn that module on and then restart Apache.

sudo a2enmod rewrite
sudo /etc/init.d/apache2 restart

At this stage Apache knows about the PHGHGAdmin application but if you go to http://yourserver/admin you will get an error message as we still have to configure the application. I'll show you how to do this in the next part.

Setting Up A Source Control Server with Domino LDAP : Part 4
Saturday, January 22, 2011 1:13 PM

Now that we have our Apache server with Mercurial up and running its time to secure it. We are going to do this using LDAP pointing to our Domino server so make sure your running LDAP on your Domino server before going any further. Once you know your LDAP server is working fine go back to your Ubuntu server and edit the Apache default site with the following command ( again you can use pico in place of vi if you wish )

sudo vi /etc/apache2/sites-available/default

Find the group of lines that start with <Directory /> and add these lines into that group

AuthBasicProvider ldap
AuthType Basic
AuthzLDAPAuthoritative off
AuthName "Mercurial Server"
require valid-user
AuthLDAPURL "ldap://yourserver.com:389/O=YourOrg?CN?sub?(objectClass=*)" NONE

In the AuthLDAPURL line make sure you change it to use your LDAP server and root org. This particular LDAP setup uses the Common Name for the login user name. If you want to change it to shortname or email address you can adjust the CN part of the LDAP setup. Once you have made the changes go ahead and save the file.

We now need to enable the LDAP module in Apache and then restart the Apache server.

sudo a2enmod ldap
sudo a2enmod authnz_ldap
sudo /etc/init.d/apache2 restart

Now if you try to hit your Apache/Mercurial server using your web browser you should get prompted for a username and password. Try entering something that is not in your Domino Directory and the login should fail. Then try entering in something that is in your Domino Directory and you should be able to hit the Mercurial repositories list. If you have used CN for the login name as in the example above then dont forget you need to use the full common name like 'Declan Sciolla-Lynch' as the user name or the login will fail.

If everything is working then congratulations. You now have a Source Control Management server using Mercurial that is setup to use Domino LDAP as your authentication point...

But we are not finished yet. In the next few parts we will install a handy tool called phpHGAdmin which will make creating new Mercurial repositories on your server easier then having to learn Hg commands and having to edit the hgweb.config file manually all the time.

Setting Up A Source Control Server with Domino LDAP : Part 3
Friday, January 21, 2011 7:54 PM

The next stage in the process is to let the Apache web server know about our new Mercurial scripts and folders. We'll start by creating a brand new Apache configuration file for Mercurial and then add that into the default site for Apache. Again you can use pico in place of vi for any of the commands below. First we'll create a folder to store the configuration file.

sudo mkdir /etc/apache2/hg

Then create the configuration file

sudo vi /etc/apache2/hg/hg.conf

and add the following lines to it...

WSGIScriptAliasMatch /hg /var/hg/hgweb.wsgi
<Directory /var/hg/>
order deny,all
allow from all
</Directory>

Now to add this to the current Apache configuration. I'm going to add it into the default Apache website that was created when Apache was installed. Lets open up the default site configuration file

sudo vi /etc/apache2/sites-available/default

and add the following line to the very end of the document after the </VirtualHost> line.

Include /etc/apache2/hg/hg.conf

Save the file. We can now test to see if everything is working correctly so far by restarting Apache and trying to hit the Mercurial server's directory. here's how you restart the Apache server

sudo /etc/init.d/apache2 restart

Then open up a web browser and try to hit http://server.ip.address/hg If you don;t know the server's IP address then you can type ip addr and it will show it to you on the eth0 line of the results.

In the next stage we will link Apache to our Domino LDAP server.

Setting Up A Source Control Server with Domino LDAP : Part 2
Friday, January 21, 2011 8:38 AM

It's time to start up your Ubuntu server again and log in using the credentials that you were using in the last part of the series. Once your up and running we are going to setup the Mercurial WSGI script so that Apache will be able to use it later. We'll start by copying the basic script file to the right location.

sudo cp hg-stable/contrib/hgweb.wsgi /var/hg

Next we will edit that file to tell it where to find it's configuration files. I like to use vi as a text editor on linux but it is not the easiest to use. If you prefer you can use pico instead by typing 'pico' in place of 'vi' in all the commands from this point forward.

sudo vi /var/hg/hgweb.wsgi

In this file look fo the line that starts with 'config =' and change it as follows.

config = "/var/hg/hgweb.config"

Once you have made the changes and saved the file we need to tell Linux that this is an executable script using the command

sudo chmod u+x /var/hg/hgweb.wsgi

That's the script ready to go but it's currently pointing to a file that doesn't exist so lets create it now using

vi hgweb.config

and add these lines to the file...

[paths]

[web]
baseurl = /hg

[hooks]
changegroup =
changegroup.mod_wsgi = touch /var/hg/hgweb.wsgi

Save the file and exit your text editor. We created the file in our working directory so now we need to move it to the /var/hg directory so that the script can find it. We will use a small variation n the sudo command so that it is created with the correct rights for Apache to be able to access it.

sudo -u www-data cp hgweb.config /var/hg

In the next step we will point Apache to these new files and get our Mercurial server up and running with no authentication. In the mean time...

sudo shutdown -h now

Setting Up A Source Control Server with Domino LDAP : Part 1
Thursday, January 20, 2011 9:29 AM

The first thing that you will need to do is download Ubuntu Server. For my testing I have been using Ubuntu 10.10 but this should all work perfectly with Ubuntu 10.04 LTS if your corporate policy dictates you only use LTS releases. You will then need to install Ubuntu Server onto a machine of your choice. I won't go into the actual installation here but a basic installation should do the trick. For my testing I was installing it into a virtual Machine on my Mac using Parallels with just 512Mb ram. If your setting up a system for a lot of developers then you may need a better machine then that.

Once Ubuntu is installed it will start up with a nice simple text login screen. Ubuntu Server does not have a graphical User Interface but if you need to use one a quick google will tell you how to use apt-get to install one. I prefer not having a GUI on a linux server as it just takes up too many system resources.

Log into your new server with the username and password that you specified during the install and you will be placed in your home directory. All the commands that are used in the setup procedure have been keyed around this directory so there is no need to change directory. This is going to be our working directory.

Lets start by making sure Ubuntu is up to date with all updates and security patches. Type the following commands and follow the prompts to update your system.

sudo apt-get update
sudo apt-get dist-upgrade

Once both these commands have completed it is time to start installing the software that we need to get our server fully up and running. This following command will use apt-get to install Apache, Mercurial, the Apache WSGI module, PHP and unzip. PHP and unzip are used in a later part of the series but there is no harm in installing them now.

sudo apt-get install apache2 libapache2-mod-wsgi php5 mercurial unzip

Once this command is complete all the software that we require has been downloaded and installed. We also need to grab a file from the Mercurial source so lets get that downloaded now. This is downloaded by using Mercurial using the 'hg clone' command.

hg clone http://selenic.com/repo/hg-stable

The Mercurial source has now been downloaded and put into a folder called hg-stable that has been created in our working directory.

Next we are going to create the folder structure that our Mercurial server will use to store its configuration and repositories and then change the ownership of the folder structure to www-data. This will allow the Apache web server to use the folder later when we tell it where the folder is.

sudo mkdir -p /var/hg/repos
sudo chown -R www-data:www-data /var/hg

In the next part I will show you how to set up the Mercurial WSGI script and configuration and I'll link it to the Apache server so that you will be able to see the repositories in a web browser. Till then you can shut down your Ubuntu server using the command

sudo shutdown -h now

Setting Up A Source Control Server with Domino LDAP : Introduction
Thursday, January 20, 2011 12:50 AM

Like many developers out there I was quite excited when I heard that IBM had released a plugin for Domino Designer that would allow it to interact with Source Control Management servers like SubVersion, GIT and Mercurial to name but a few. It works by creating a on-disk version of the NFS and then you can link that on-disk version to your SCM server using one of the many SCM plugins available for Eclipse.

I tried it out and created my on-disk projects but I didn't have an SCM server to link it to. OpenNTF has a subVersion server but getting login details for it hit a brick wall because I'd have to request that somebody create a username password for me. I did manage to create a Google Code project and got Mercurial talking to that where I could upload my source code but that is a public server and probably not advisable to use it in a corporate environment where your source code needs to be kept private.

So I decided I'd look into running my own private SCM server, something that I'd be able to use in my corporate environment and give access to the other developers on the team ( that is the real reason behind SCM servers, team based development )  and at the same time see if I could get it working with our Domino Directory for authentication.

I started out looking at Mercurial on Windows, trying to set it up as a CGI application being served by Domino but I kept hitting brick walls left and right.  The Domino implementation of CGI applications is documented with about 3 lines of text in the help files and for the life of me I just couldn't get it running. I think the CGI implementation is Domino is just not configurable enough for what I needed.

I then decided to look into running Mercurial on a Linux box using Apache as the web server. Lots of research and google searches later I have managed to get a Mercurial server up and running on Ubuntu running Apache and I have linked the Apache authentication to my Domino LDAP server.

Over the next few blog posts I'll details all the steps that I took to get this system up and running, make it easy to manage and also show you how to actually use it from the Domino Designer client. It's not for the faint of heart, there are a lot of command lines you need to type in as I decided to use Ubuntu Server which doesn't have a GUI. So start brushing up on vi, you're going to need it...

Enabling Large File Uploads On Your Domino Server for XPages
Tuesday, January 11, 2011 2:12 PM

By now you have probably noticed that fileSendr V1.1.0 is now available on OpenNTF. This is the version that allows you to authorize external people to send files into you. It's a really handy XPages based utility for any organization that needs to send large files to and from customers.

To allow fileSendr to accept large files you do need to make a few configuration changes on your Domino server, the instructiosn are in the fileSendr download on OpenNTF but I thought I'd blog about it here so it can be found by search engines for anybody else needing to figure it out.

First off you'll need to work out how large a file you want to allow to be uploaded and then convert that into Kb. If you want to allow 2GB files then that will be 2097152Kb. You can also allow unlimited uploads by use 0Kb in the fields below.

First we need to tell the Domino server the maximum size of any HTTP request. This is done in the Server document in the Internet Protocols/HTTP tab. Look to the bottom of the page on the right and you'll see the 'Protocol Limits' section.

The next change you make is to the Domino Web Engine to tell it to allow POST data of a certain size. If your not using Internet Sites then this is in the Domino server document under 'Internet Protocols/Domino Web Engine'. If you are using Internet Sites then this is in the internet site document under 'Domino Web Engine'. In either case you are looking for the Maximum POST data field. This should be set to the same value as the Maximum Request field.

Lastly your XPage application needs to be told that it can accept uploads up to a certain size. This is done in the xsp.properties file. This file can exist in one of two places, either in the domino\data\properties directory on your server or directly in the NSF of the application. If you set the value in the server version of the file then it will affect ALL XPages applications on your server. If you just set it in the NSF then it just affects that single application. For security I recommend that you only set it at the application level. fileSendr has this set at the application level for 2Gb but you can change it as you require using the steps below...

Open your application in Domino Designer and double-click on the 'Application Properties' page.

Then switch to the 'XPages' tab and set your selected value in the 'File Upload Options' section.

Then make sure you save your Application properties.

Your Domino server and your XPages application are now setup to allow large uploads.

the fileSendr Project on OpenNTF
Saturday, January 8, 2011 1:33 AM

Since figuring out how to get XPages to talk to Amazon S3 I decided to look into an old project I had on OpenNTF called fileSendr and add the functionality to it. fileSendr V1.0.2 is now available on OpenNTF and not only does it have the Amazon S3 support but I also added a few other features worth checking out, even if only for the code examples...

  • dojox.form.fileUploader : Multi File Upload with an XPages processor for the backend.
  • Extension Library Functions
    • Page Navigator for the sidebar menus.
    • Form Layout control for the onscreen forms
    • JSON RPC Services control to call SSJS from client side javascript ( this is really cool )
  • Amazon S3 support using the Amazon AWS SDK for Java

Of course the project doesn't stop with this release. One of the feature requests on OpenNTF was to allow external people send files into fileSendr for retrieval by internal users, making it into more of a fileReceivr then a fileSendr. The good news is that progress on this feature has already started and should be available soon...

To stop the receiving feature from being abused I decided to code it so that the internal user of the application needs to generate an authorization key that is sent to the external person. The external person then clicks the link in the email that they received and they are brought to a screen in the application where they can upload the document anonymously and then the system will send an email to the original internal user that their file is waiting to be retrieved. The authorization key is only allowed to be used once.

Talking to Amazon S3 from XPages
Wednesday, December 29, 2010 9:55 AM

After playing around with the iTextPDF library a few weeks ago I was wondering how easy it would be to use a few other java libraries with XPages and in particular I was interested in looking at the Amazon S3 service to store files for my fileSendr project on OpenNTF.

To get started you'll need to sign up for the Amazon AWS service. There is a free developer usage tier which gives you 5Gb of storage and15Gb of data transfer a month for a year. You'll then need to download the Amazon AWS Java SDK libraries and add the aws-java-sdk.jar, commons-httpclient.jar and commons-codec.jar files to your XPages project and add then to the build path.

Once you have done that you can now use the libraries from your SSJS code. Here is some sample code that will print out a list of the buckets that you currently have in your S3 account. Note this demo code doesn't do any error checking or cleanup after itself and would not be recommended for production use.

// Load The Java Packages
importPackage(com.amazonaws);

// Setup the AWS S3 Credentials
var myAWSAccessKey:String = "YOUR_AWS_ACCESS_KEY";
var myAWSSecretKey:String = "YOUR_AWS_SECRET_KEY";
var myAWSCredentials:com.amazonaws.auth.AWSCredentials = new com.amazonaws.auth.BasicAWSCredentials(myAWSAccessKey, myAWSSecretKey);

// Open a session to Amazon S3
var myS3Service:com.amazonaws.services.s3.AmazonS3 = new com.amazonaws.services.s3.AmazonS3Client(myAWSCredentials);

// List Buckets
print("XPages To Amazon S3 Demo : List Existing Buckets");
var myBuckets:com.amazonaws.services.s3.model.Bucket = myS3Service.listBuckets();
for (eachBucket in myBuckets) {
print("XPages To Amazon S3 Demo : Bucket : " + eachBucket.getName());
}

If you read the documentation for the AWS Java Library you'll see that you can easily translate all of the methods available to you giving you the ability to create buckets, upload files and generate time sensitive urls to files for downloading.

Now that it has been discovered that you can process files uploaded to an XPage I'm going to look into adding Amazon S3 service to fileSendr on OpenNTF as a storage option for the uploaded files.

So what other libraries are out there that might be interesting to get working with XPages...
 

OpenNTF : Don't mix your licenses
Wednesday, December 22, 2010 2:57 PM

Earlier today, Julian Buss released a new project on OpenNTF called YouAtNotes xCharting under the GPL license. I have absolutely no problem with his license choice, I fought hard to have the GPL license be a valid license type on OpenNTF so that some people, like Julian, can select it for their projects.

But it is important to know WHY your selecting the GPL license and what it means, basically the GPL license allows you to use the code in any of your own applications, however as soon as the GPL code goes into your application you application must then be licensed as GPL and the source code needs to be made available on request or be freely available online.

You might argue that your only going to use it in an internal application for your company, but the license still applies, your internal application and all the code it contains must now be licensed with the GPL license. If somebody, anybody, asks for the source then it must be supplied or your breaking the law. In 2006 D-Link were successfully sued because they used GPL code in their routers without releasing the source code and that is just one of many cases. If YouAtNotes use the xCharting code from OpenNTF in their commercial products then their commercial products are now GPL and anybody can request the source code for the ENTIRE product.

Even worse is mixing your licenses, and I'll take an OpenNTF project as an example. The Bildr project by Patrick Kwintensson in it's current V3.0 release is licensed as APLv2 however it contains a file upload control call PLUpload that is licensed as GPLv2. What this means is that Bildr is incorrectly licensed, it is not possible for it to be licensed as APL because of the GPL code in it. The OpenNTF IP Manager is aware of this and the project is in danger of being shut down if the license is not corrected soon. Of course the Bildr project also contains other code from other sources so simply changing Bildr to GPL won't be sufficient.

The point that i'm trying to make is that you DO need to be careful about the licenses that you use for your open source projects and you also need to make sure that all code that you source from other places has a correct license. I looked at Bildr because of the file upload control, i was thinking it would fit in very well for another application that I'm writing and seeing the APL license on Bildr I would have thought I was in the clear, it wasn't till I went to the PLUpload website that I found it was actually GPL.

So if your going to release stuff as GPL be aware that it is a restrictive license, while it does encourage sharing it can also stop people from using the code and in some cases, from even being allowed to look at the code.

Merging Two Domino Databases With Folders
Tuesday, December 14, 2010 10:27 AM

I've had a few cases recently where some users ended up with multiple archives because they moved from having a local archive to a server based archive for their email. When this happens the user eventually asks if there is any way to merge the two archives so that just have a single place to look for their archived email.

The BOFH Admins will gladly help the user out by telling them that they can copy/paste the emails from one archive to the other. This takes forever and the user normally gives up or ends up with duplicate emails. Sometimes it's fun being a BOFH Admin Laughing

But there is a way to easily merge two archives ( or any two Lotus Domino databases for that fact ) using LotusScript. You can even take into account all the folders in both databases and copy over the folders ( including their design ) for folders in the source database that don't already exist in the destination database. All you need is the following agent. It's not 100% perfect, it relies on the fact that every document is in a folder so it won;t work for databases that use 100% views but it could easily be modified for that if you need it.

I hope it helps somebody out there. It just saved me a load of time...

%REM
Agent Merge Archives
Created Dec 14, 2010 by Declan Lynch/CZARNOWSKI
Description: Copies all documents from a source database to a destination database including folders and folder designs
%END REM
Option Public
Option Declare

Sub Initialize

Dim s As New NotesSession
Dim w As New NotesUIWorkspace
Dim sourceDB As NotesDatabase
Dim sourceView As NotesView

Dim sourceViewColl As NotesViewEntryCollection
Dim sourceViewEntry As NotesViewEntry
Dim sourceFolders() As String

Dim destDB As NotesDatabase
Dim destView As NotesView
Dim destViewColumn As NotesViewColumn
Dim destDoc As NotesDocument

Dim colCount As Integer

' Ask for the Source DB and See If It Exists
Dim selectedSourceDB
MessageBox "Please Select the Source Database",64,"Lotus Notes Database Merger"
selectedSourceDB = w.Prompt( 13, "Choose the source database to copy the folders from","Lotus Notes Database Merger" )
If IsEmpty( selectedSourceDB ) Then
MessageBox "Source database not selected", , "Lotus Notes Database Merger"
Exit Sub
End If
Set sourceDB = s.GetDatabase( selectedSourceDB(0), selectedSourceDB(1), False )
If sourceDB is Nothing Then
MessageBox "Error Opening The Source Database", , "Lotus Notes Database Merger"
Exit Sub
End If

' Ask for the Destination DB and See If It Exists
MessageBox "Please Select the Destination Database",64,"Lotus Notes Database Merger"
Dim selectedDestDB
selectedDestDB = w.Prompt( 13, "Choose the destination database to copy the folder to","Lotus Notes Database Merger" )
If IsEmpty( selectedDestDB ) Then
MessageBox "Destination database selected.", , "Lotus Notes Database Merger"
Exit Sub
End If
Set destDB = s.GetDatabase( selectedDestDB(0), selectedDestDB(1), False )
If destDB is Nothing Then
MessageBox "Error Opening The Destination Database", , "Lotus Notes Database Merger"
Exit Sub
End If

' Get All The Folders In The Source DB
ForAll v In sourceDB.Views
If v.IsFolder Then
Print "Processing Folder : " + v.Name
Set sourceView = sourceDB.getView(v.Name)
Set sourceViewColl = sourceView.Allentries

Set destView = destDB.getView(v.Name)
If destView is Nothing Then
' No existing Destination folder. Create A New Folder
Call destDB.EnableFolder(v.Name)
Set destView = destDB.getView(v.Name)
' Copy the Source Folder Design
' Remove all The view columns From the folder
While destView.ColumnCount > 0
Call destView.RemoveColumn(destView.ColumnCount)
Wend
' Copy All the ViewColumns from the source Folder
For colCount = 0 To sourceView.ColumnCount-1
Set destViewColumn = destView.CopyColumn(sourceView.Columns(colCount), colCount+1)
Next
End If

' Copy All The Documents In The Folder To The Destination Database
Set sourceViewEntry = sourceViewColl.GetFirstEntry
Do Until sourceViewEntry Is Nothing
Set destDoc = sourceViewEntry.Document.CopyToDatabase(destDB)
Call destDoc.PutInFolder(v.Name)
Set sourceViewEntry = sourceViewColl.GetNextEntry(sourceViewEntry)
Loop

End If
End ForAll

MessageBox "Processing Complete",64,"Lotus Notes Database Merger"

End Sub

Dynamic PDF creation using XPages and the iTextPDF Java Libary
Wednesday, December 1, 2010 1:19 PM

Recently I was tasked with adding an 'Export To PDF' function to one of our internal applications so I had a quick look around at possible solutions and I found that some others in the Lotus community had been successful in using the iTextPDF library with their applications but only with client based apps and classic Domino web apps. I couldn't find any information of using iTextPDF with XPages so I set about seeing if I could get it to work.

The first thing you will need to do is download the iTextPDF JAR file and add it into your NSF. I won't explain how to do that here as a quick google search shows that a number of people have blogged about how to do that already.

Once you have the JAR file in your NSF you can now generate your PDF files using SSJS. For my purposes I added a 'link' control to a page and then in the server side onClick even I used the following code...

---------------------------------------------------------------------

// Load the java packages
importPackage(com.itextpdf);

//Initialization
var con = facesContext.getExternalContext();
var response:com.ibm.xsp.webapp.XspHttpServletResponse = con.getResponse();

//setting response headers for browser to recognize data
response.setContentType("application/pdf");
response.setHeader("Cache-Control", "no-cache");
response.setDateHeader("Expires", -1);
response.setHeader( "Content-Disposition", "attachment; filename=\"export.pdf\"" );

// Setup the PDF Output Stream
var newPDF:com.itextpdf.text.Document = new com.itextpdf.text.Document();
var writer = com.itextpdf.text.pdf.PdfWriter.getInstance(newPDF,response.getOutputStream());

// Open the PDF and write the PDF header info
newPDF.open();
newPDF.addAuthor("Declan Lynch");
newPDF.addCreationDate();
newPDF.addCreator("IBM Lotus Domino V8.5.2 : XPages iText Library");
newPDF.addTitle("PDF Export Demo");  

// Write The Contents To the PDF
newPDF.add(new com.itextpdf.text.Paragraph("Hello world"));

// Finish
newPDF.close();
writer.close();
facesContext.responseComplete();

---------------------------------------------------------------------

This simple bit of code should get you started. You'll need to look at the iTextPDF documentation to learn how to build a more complex PDF file.

I hope this helps anybody else out there get started with PDF generation from XPages applications. Just be aware that the iTextPDF library is licensed under GPL which means that the source code of your application must also be available under the GPL license unless you purchase the commercial iTextLib license.

Steeler Monkey
Friday, October 15, 2010 5:45 PM

Things I Hope Not To See At Lotusphere 2011
Friday, October 15, 2010 10:50 AM

It's that time of year again, Lotusphere registration is open, abstracts are being written and submitted ( I'm not submitting any abstracts myself ), and in a few weeks we'll see loads of blog posts from people saying that they will be speaking at Lotusphere and probably one or two comments complaining that they aren't speaking at Lotusphere and how life is unfair.

With all that in mind I'd like to present for your comments my list of things that I HOPE I don't see at Lotusphere 2011...

  • The fold-out sessions schedule. Please bring back the booklet, it was easier to manage.

That's my list. Comment below if you have anything to add, maybe the Lotusphere gods and goddesses will take a look in and take a look at the list.

New Release of xtalk on OpenNTF
Thursday, October 14, 2010 9:07 PM

I've just uploaded a new release of xTalk to OpenNTF. This new version is a complete overhaul of the original version of xTalk and now uses the OpenNTF XPages Extension Library to create a much easier interface for the forum owner for creating and managing the system.

 

The OpenNTF Extension Library also means that I can make use of the really cool NamePicker component. In the previous version of xTalk the name picker would have problems with large directories due to the 64K DBLookup limits, now with the NamePicker this issue is gone.

 

From a developer point of view there are a few neat tricks that you may be interested in checking out in the code. The first is the 'Register' and 'Forgot Password' actions. These two actions use a dojo dialog box for the UI and the 8.5.2 feature sessionAsSigner to do the actual work. Using sessionAsSigner means that I no longer have to call out to a LotusScript agent in the database but can do the work there and then and return a result to the end user within the same dojo dialog box.

 

I have also used the sessionAsSigner in the main SSJS script that runs during the applicationScope initialization. When the database is opened for the first time it needs to create a configuration document, if the database is opened as 'anonymous' with only reader access rights then by using sessionAsSigner I can ensure that the configuration document will be created. This gives a much better user experience when the database is opened for the first time.

 

Download xtalk from OpenNTF..

 

Want to see it in action? Click here.

Tags :  XTalk    
XPages And Sequential Numbers
Wednesday, October 6, 2010 8:57 PM

Sequential numbers, talk to any Domino developer and they will shudder when you bring up the subject. They are one of the hardest things to implement in a Domino application. There are many suggestions on how to do sequential numbers in domino apps and they all have advantages and disadvantages.

One of the most common ways is to use an agent which allows for documents to replicate to a central location before assigning them their number. The main problem with this approach is that the numbers don't get assigned till a later time and the users of the application will more then likely need the number immediately.

Another method involves using profile documents but this can fail because profile documents are cached on each users computer and it is even worse for web based applications because each HTTP thread has its own cache so even users on the same server generating sequential numbers could end up with a duplicate number.

With XPages, however, they way be a solution but before I go into details I'll stress that this is not a perfect solution because it is designed for a single application running on a single server and not for a replicated application.

In SSJS in XPages there is a feature called 'synchronized'. Any code inside a synchronized code block will only execute once at a time. If two people in two different sessions click on a button that runs the SSJS at the same time then whichever thread hits the SSJS code first will start running the synchronized block first while the other persons thread will wait till the first persons thread has finished and then once the first persons thread has finished the second persons thread will run the synchronized block of SSJS. Think of it as a car wash, it's only possible to wash one car at a time while all the other cars that need to use the car wash will queue up outside waiting for the car in front of them to be finished.

Here is a simple version of the code that I built, In my final version I broke out the initial loading and saving of the number store document into separate functions so that I didn't have to repeat the code multiple times. The code below is simplified for demo reasons.

function simplegetSequentialNumber(){
    synchronized(applicationScope){
        if (applicationScope.containsKey("seqNumber")){
            var seqNNNN = @Right("0000" + @Text(applicationScope.get("seqNumber")),4);
            applicationScope.put("seqNumber",applicationScope.get("seqNumber") + 1);
            var seqView:NotesView = database.getView("vw_SequentialNumberStore");
            var seqNumberDoc:NotesDocument = seqView.getFirstDocument();
            seqNumberDoc.replaceItemValue("seqNumber",applicationScope.get("seqNumber"));
            seqNumberDoc.replaceItemValue("seqYear",applicationScope.get("seqYear"));
            seqNumberDoc.save(true,true);
        } else {
            var seqView:NotesView = database.getView("vw_SequentialNumberStore");
            try {
                var seqNumberDoc:NotesDocument = seqView.getFirstDocument();
                applicationScope.put("seqNumber",seqNumberDoc.getItemValueInteger("seqNumber"));
                var seqNNNN = @Right("0000" + @Text(applicationScope.get("seqNumber")),4);
                applicationScope.put("seqNumber",applicationScope.get("seqNumber") + 1);
                seqNumberDoc.replaceItemValue("seqNumber",applicationScope.get("seqNumber"));
                seqNumberDoc.replaceItemValue("seqYear",applicationScope.get("seqYear"));
                seqNumberDoc.save(true,true);
            } catch(e) {
                var seqNumberDoc:NotesDocument = database.createDocument();
                seqNumberDoc.replaceItemValue("form","fm_SequentialNumberStore");
                seqNumberDoc.replaceItemValue("seqNumber",1);
                var seqNNNN = @Right("0000" + @Text(applicationScope.get("seqNumber")),4);
                applicationScope.put("seqNumber",applicationScope.get("seqNumber") + 1);
                seqNumberDoc.replaceItemValue("seqNumber",applicationScope.get("seqNumber"));
                seqNumberDoc.replaceItemValue("seqYear",applicationScope.get("seqYear"));
                seqNumberDoc.save(true,true);
            }
        }
    }
    return seqNNNN;
}

The first thing it does is check to see if the applicationScope contains the sequential number counter. if it does then it gets the number and then adds 1 to the applicationScope. it then finds the number store document and updates the value in it.

If the sequential number is not in the applicationScope it will open the view where the number store document and tried to get the first ( and only ) document in that view. If it finds the document it gets the value, puts it into the applicationScope and then increases it and resaves the new value. if it doesn't find the document it means that it has never existed so it creates a new document, sets the first sequential number to 1, increases it in the applicationScope and then saves the document.

The reason for saving the document each time is because the applicationScope only exists for the life of the application. If nobody uses the application for 60 minutes then the applicationScope gets removed from memory ( 60 is the default and can be changes as required ). So if you don;t save the value off to a document somewhere then you'd end up with numbers restarting at 1 every time the app hasn't been used for a while.

The code above is a simple version of what I finally implemented. You could make this code better by removing the need for the getView() and getFirstDocument() by using a fixed UNID and then just doing a database.getDocumentByUNID() call. You could possibly make it multi-server aware by opening a database on a central server for find/store the document but this relies on the network connection between servers being up and running and might not be worth the risk.

However you do your sequential numbers, if your using SSJS and XPages then make sure you make use of the synchronized block to make sure only one person at a time can increase the number...

Sequential Numbers. There's no need to be afraid of them any more...

Save as EML in Notes 8.5.2 Can't be Disabled But Does That Really Matter?
Friday, October 1, 2010 3:46 PM

So looking at planetlotus.org today I noticed a blog entry entitled Save as EML in Notes 8.5.2 Can't be Disabled? and I'm confused as to why this is really a problem. I logged into Bleedyellow to write a comment but for some reason comments are disabled on that blog so here is what I would have said in my response.

In the blog entry it is stated that "US-based companies subject to the Federal Rules of Civil Procedure and the vexing and huge costs of email ediscovery in civil matters, would have the scope increase for email searches to many other places, which will add much more cost.". If this is the case then you need to seriously reevaluate your email eDiscovery system because the only way to ensure that eDiscovery is 100% successful is to capture all emails before they hit the users inbox, either through an addin task on the server or even using the built-in Domino Journal feature. Once the email has been captured by the server you have a record of that email no matter what the end user does. They can delete it, they can edit it, they can copy/paste the test to somewhere else and now, with 8.5.2, they can export it an an eml file.

When your legal department needs to do an eDiscovery search of emails they do the search on the emails that were captured by the server. It is a single place for them to look at all emails and be safe in the knowledge that all the emails to ever go through the server are there and unaltered.

if your eDiscovery system is capturing emails AFTER they have hit the users inbox then there is no way to guarantee that the emails haven't been deleted or altered. Any legal search of emails in such a system would not generate valid results.

The case for having the ability to be able to disable the export to eml function in Domino is, in my opinion, null and void. Legal departments shouldn't have to care about what happened to an email after the user has received it as long as they have proper records of the emails when the user received it.

Using The XPages Extension Library In Blogsphere V4
Monday, September 27, 2010 8:32 PM

The new XPages Extension Library from OpenNTF really does make development a lot easier so I thought I'd take some time out from coding the next version of Blogsphere to show everybody some of the places where I have used the features from the library in my code.

In the configuration areas you'll find the xe:navigator control being used to created the menus. Simply dragging the control to the XPage and then setting up a tree of menu options in the controls properties quickly results in a oneUI styled menu.


Here I'm using the xe:slider control in the blogs layout configuration page to allow the owner of the blog to quickly and easily select how many entries should appear on the home page. This is much nicer then having an edit box and hoping that the blog owner will enter in a number.


This is the xe:TagCloud control. Created by dragging the control onto a page and then pointing it to a view within the database. There is no coding on my part except to tell it what view to use. I don't have to write any javascript and the slider control above the tag cloud is also automatically generated for you.


The slide blocks themselves are created using the xe:widgetContainer control. Again the coding is done for you, just drag on the control and give it a title for the most simplest of implementations. You can add an actions menu to the right side of the control by creating a number of 'tree nodes' similar to the way the xe:navigator control is created.


This isn't part of the XPages Extension Library but I just wanted to point it out. This is the new CKEditor control for Richtext items but I'm using a custom toolbar. For comments on blog entries I don't think it is necessary for the blog reader to have to select fonts and font sizes so I removed the from the toolbar along with a few other default menu options.


There's a lot more to come...

<< Older EntriesNewer Entries >>
Powered By Blogsphere V4.0.0