June 25, 2010

XPages: XSP Unit testing framework - anyone tried it?

After being "brainwashed" by Uncle Bob and Roy Osherove for 3 days about test driven development, I came back to work eager to try to use some of these techniques in my daily work with XPages. A quick Google search pointed me in the direction of XSP Unit, a "simple framework for xUnit style unit testing of Javascript in XPages Applications" developed by Lorcan McDonald.


My first impression is positive, but I was wondering if anyone else in the XPages community are currently using this framework?
What are your experiences?
Is it worth the hassle to set it up and start using it?

June 14, 2010

XPages: Default Value for Repeat Limit in Repeater Control Equals 30 ?

Last week, I stumbled upon a mysterious bug in XPages. I've created quite a few pages and custom controllers with repeater controls during the last months, but never seen this before:

When I didn't specify a repeat limit for the control, I would only get the first 30 entries from the data source!

I've developed the habit of not setting the repeat limit when I don't need it, believeing that it would provide me with all the entries from the data source. Checking the provided documentation in the Domino Designer comfirmed my thoughts:


Has anyone else experienced this bug? Or is there another way to limit the repeat control, that I might have done unintentionally?

For most cases, the work around is quite easy, just set the repeat limit field to some high value that you (probably?) will never exceed, but in some cases you might not know in what range the number of view entries will be when your application has been in use for a while...

June 8, 2010

XPages: Modifying Button Text in File Upload Control?

I'm currently working on create a page, using XPages, where the users amongst other things are able to upload files. Simply dragging and dropping a File Upload Control onto the page works fine, but I would also like to modify the text on the browse button that is automatically provided by the Dojo framework.

It seems to me that the text on the button is set to the default "browse text" of the system. On other buttons on the page, e.g. the submit button, I am able to set the label of the button (see picture below, which is then displayed as the button's text. This does not work for the browse button...

Label field of an XPages Button, where is the same field for a File Upload Control?


Does anybody know what I need to do to be able to set the text of the file upload control button to whatever string I want to?