Dojo Date Picker – setting the date format

November 23rd, 2011

We’ve just implemented a Dojo Date picker to replace an old calendar tool we were using.

In testing, the date picker correctly defaulted to the European date format of dd/mm/yyyy. However, all this testing was on PCs. Testing the same code on my Mac in Safari, the date format has switched to US format. My Mac is setup as a UK machine with UK date format, but it’s still defaulted to incorrect date format.

As we’re a University with many international staff and students, assuming that their computers will be set to European format would not be sensible and as the date is being stored in Domino and Oracle we need control over the date formats to ensure the correct date objects are created.

Luckily there’s a very simple solution. If you’re using html markup and the dojo parser to generate the date picker, you simply have to add:

constraints={datePattern:’dd/MM/yy’}

to your input box’s html and it will default to the European format.

Posted in Domino

Agents ignoring Readers Fields in 8.5.3

November 4th, 2011

We’ve just upgraded a server to 8.5.3. We have an agent that runs as a ‘web user’ but has ‘full admin rights’. The agent basically reads a view with documents that have readers fields and assembles them for display to the user. The agent needs to grab info from a protected database so has ‘full administration rights’. Previously the documents were read with the ‘users’ access permissions. So readers fields were obeyed. Various versions of this code has run this way for 10 years. Under 8.5.3 this is not the case. The readers fields are being ignored. Has anyone else experienced this issue?

Posted in Domino

XPages Single Copy Design

September 9th, 2011

I’m posting this on behalf of my colleague David Harding (@dharding) who’s been investigating XPages Single Copy Design. I think it’s best I leave it to Dave to explain:

We are looking to roll out XPages Single Copy Design to several thousand databases.  So far, we have not been able to find a recommended practice for rolling out the XPages Single Copy Design flag and template path to all of these databases.

Documentation on the Lotus Notes and Domino Application Development wiki (http://www-10.lotus.com/ldd/ddwiki.nsf/dx/Single_Copy_XPage_Design#Does+employing+SCXD+typically+have+a+positive+or+negative+affect+on+speed+of+performance%3F) suggests that setting the options in the template should propagate to databases that inherit from that template.

Quote from page:

“Is it true that selecting or de-selecting SCXD in a template does not propagate to applications already created with that template?

This is not the case. If a template is set to use a SCXD database and an application is created from this template then the new application will have the XPages from the SCXD database. And changing the template to say another SCXD or no SCXD database set will reflect in the database that inherits its design from the template.”

In testing, we have not found this to be the case.  Testing adding in the Xpage template path and checking the flag in the template*, combined with all combinations of HTTP Restarts and Design updates do not seem to visibly update the database.properties file in the inheriting database to include the $XPageSharedDesign and $XpageSharedDesignTemplate items.

*When I say Template here, I am referring to the ntf file that the database inherits from, not the Xpages source database that will be the path in the $XpageSharedDesignTemplate item in the database.properties file.

In an attempt to find an alternative, reliable method of deploying this setting we have looked at using a NotesNoteCollection to access the database.properties file and adding in the values.  There doesn’t seem to be an obvious way to locate this file, though tests have indicated that it is the only one in the database with a $Daos item, so we have been able to get a hold of it by filtering for that in the NotesNoteCollection.

So the questions are, is there a ‘best practice’ for rolling out the Single Copy XPage flag? Is the NotesNoteCollection method a no-go area?  Why are our experiences with the template not in line with the claims in the aforementioned quote?

Posted in Domino, XPages