Tuesday, 31 January 2012

Disable encryption while creating new databases

My friend was facing a problem that while creating new databases in the New Application dialog the encryption settings were being set to "Locally encrypt this database using Medium Encryption".

Continue reading »

Thursday, 19 January 2012

New property in XPages - Show read only as disabled

Some time back I had blogged about creating a read only edit box in XPage. But with Lotus Notes 8.5.3 there is a new property which does this for you - Show read only as disabled.

Continue reading »

Tuesday, 17 January 2012

View XPage source code in browser

Karthikeyan A had written in his blog about viewing your XPage source code in browser. You just needed to add a plus (+) sign in front of your XPage URL and it would show you the source in the browser. Tommy Valand confirmed that this bug was fixed in Domino 8.5.1 FP1.

But recently, while playing around with XPages I found out that there is yet another way where you can get the source code in browser. Open the XPages view in Domino Designer and go to "Properties > Document Ids". There you will find Note UNID. Copy it.


Now create URL as http://<SERVER NAME>/<DATABASE PATH>/<Note UNID>. For e.g. http://myserver/mydatabase.nsf/14C2FD8F53CD42204925791600131817 and run it. You will find your XPage source code in the browser if you are using IE else you will be prompted to download a file which would contain it. I tried it on Domino 8.5.1 FP2.

Of course you need to know the Note UNID of XPage for this, which might not be possible for an end user... PHEW!

Saturday, 14 January 2012

Add custom icon to dojo button in XPages

Adding icon to a dojo button is pretty simple. Jut set the dojo type to dijit.form.Button and add a dojo attribute named iconClass with value dijitEditorIcon dijitEditorIconCut.


And you get something like this:

But what if you want your own custom icon to appear on the button? The Dojo Themes and Theming Documentation explains about using custom icons. First of all import the icon image in your database. Now create a style sheet with following CSS class.

Continue reading »

Dash search in Ubuntu / Unity

When I first upgraded to Ubuntu 11.04 I took an instant disliking to its new desktop environment - Unity. But sadly I was really out of choice as GNOME 3 was even more disappointing (they even decided to do way with minimize and maximize buttons). Unity in Ubuntu 11.10 was a bit improved but still I hated the interface. But now, I have kind of got used to it and discovered this new thing in Dash search.

In Unity you can search for applications in Dash, but what I didn't know that you could also search inside applications. Basically I wanted to change the theme so I went to Dash and searched for "theme" and look what it gave me in results.


Continue reading »

Saturday, 7 January 2012

Declaring global variable in XPage using dataContexts

While working on a XPages application I required a database object to be initialized and then used in various controls in XPage. I wanted to initialize the object only once then use it again and again. With some experimenting I found out that if I put the initialization code in beforePageLoad, afterPageLoad or beforeRenderResponse I was able to access the object from anywhere in XPage. But I wasn't sure that whether this was the correct way or the objects would get automatically garbage collected. So I posted this question on XPages forum.

Paul S. Withers suggested me to use dataContexts. You can find them in All Properties tab of XPages properties inside data section.

Continue reading »

Getting methods, fields, constructors for XPage Java classes


In my previous blog I was able to find out which Java classes were represented by global objects & functions of SSJS. For e.g. facesContext.getExternalContext() returns object of com.ibm.xsp.domino.context.DominoExternalContext. But what methods, fields, etc. are available in that class? To get those you use the Reflection API (java.lang.reflect package) in Java via which we can find out the methods, fields, etc in a class. Using this I built a small XPage which can explore these classes. Here’s how it looks:

Continue reading »

Tuesday, 3 January 2012

Double exclamation / bang (!!) in Lotus Notes

Double bang or double exclamation (!!) is an interesting thing in Lotus Notes. It basically is an internal network separator to Notes1 used to separate the server name and database path. No wonder in older release of Lotus Notes, launching attachments which have double exclamation marks in file name would crash Notes client. Also if you try to attach a file (either from Notes client, web or XPages) with double exclamation marks in its name, then the part preceding the double exclamation marks is removed from the attached file name. So if your name of file is file!!name.txt then after attaching, your file name would be name.txt. Even using the EmbedObject method in NotesRichTextItem class attaches the file in same way.

I used it myself when I wanted to open a specific frameset in a different database. Basically where ever you find the @ button in properties, there you can specify the server & database concatenated with double exclamation marks.


Also you use it in Show Database command at the Domino server console to display database and view information on a different server. David Leedy found out that while binding XPages to external databases you need to use double exclamation. Even in the C API function of W32_NSFDbOpen(dbpath$, hdb&) you specify the dbpath$ as <Server>!!<Database path>.

Update 8 Jan 2012: Starting with Notes and Domino 8.5.3 you can set up Domino to preload XPage applications using the notes.ini entry of XPagesPreloadDB, where you specify the server and database name concatenated with double exclamation. And yes, it is present in the final release of the 8.5.3.


1. Lotus Notes and Domino 5.0.5 Release Notes (Pg 116)

Sunday, 1 January 2012

The need for a different Marketplace

My grandmother always said that in the first day of a new year you should do what you would like to do the rest of the year. Even if the last year I didn't had a lot of time to blog I always wanted to so here I am wanting to start the year with my blog.
So what is wrong with the current version of the Marketplace? I could say nothing really, but there is so much that could be improved/changed. I am referring here to the marketplace of all major mobile platforms: Android, iOS and Windows Phone. They are more or less the same. Right now I have experience as a developer with Windows Phone marketplace and as a customer/consumer with all three of them. The marketplace was/is one of the greatest marketing/selling instrument in the software industry. In theory it gives the opportunity to everyone to sell their ideas/software all over the world. I say in theory because it enables developers to do that, but it doesn't make it easy.
One of the biggest problems I see for the moment is the number of applications. I am looking at the Microsoft "race" to catch up with the number of applications in the marketplace. In this race the number is the priority and the quality comes second. The result of this race is that the marketplace get filled with "junk". It is the same situation on all the three platforms, but today the analysts judge the success of a platform by the number of apps in the marketplace. Let's face it there are 500.000 application in the Apple marketplace and, maybe, not even 10% are quality apps. When I say junk I say applications that don't bring any innovation, written as fast as possible and thrown into the wild just to have an application out there. From my experience (I have a small application in the marketplace) in order to have a decent application there is a lot of work to be done in developing and maintaining it. Having so many applications in the marketplace "kills" the opportunity marketplace gives you if you have a quality app because it makes it almost invisible. If today you have a quality app and you publish it will be there with (I will take the Windows Phone marketplace numbers published by http://wp7applist.com/en-US/stats/ today 01.01.2012) other 451 applications published the same day. Does you application stand any chance? Some will say yes, I would say the more apps are in the marketplace the harder will be. You can only count on the people that are trying new applications. So inevitable a quality app will go down (maybe a little bit slower ) with the others and you have to find other methods to get it "visible". Another consequence of having a lot of applications published every day without a quality check is the degrade in the service offered to developers. I remember that when I wrote this post: http://sviluppomobile.blogspot.com/2011/01/windows-phone-marketplace-more.html the quality of certification the service was great. Things changed a little in the last two months (I think they had an increase in the number of applications to certify) the certification time jumped from two days to more than a week. More frustrating is seeing applications like this one published in "bulk":


So is it worth having thousands of applications without any quality filter (just rules on how to write your app)? I would prefer a quality marketplace, but maybe having both is better. It's like when you go to the market to shop: if you want products that cost less you go in one place, if you want quality products you go to another shop, if you just need one product you go in the first shop you find. The marketplace in the marketplace could improve a little bit on the quality part. It would need quality reviewers that would select the apps for the "quality" marketplace. It is easier than to go on all review websites and look for top applications on each platform. A place in the marketplace where you go when you don't know what you really want but you would like to try some quality applications. Apple, Google and Microsoft should not be the quality reviewers but continue to do what they do and then the best reviewers/websites on each platform should intersect their chosen applications (easy to say and hard to do). It is not a bullet proof mechanism.
Other suggestion regards the reviews specifically bad reviews. In this moment if you want to make a concurrent application go down you just go and slowly start to make bad reviews in all the marketplaces. (it is a situation I am dealing with). I would suggest that, if someone makes a bad review and give one or two stars, he should be "forced" to write a reason. This should help the developers understand the problem, and, if it's not true at least ask the review to be removed. Also the reviews should be disabled when the application is hidden. For the hidden applications the reviews don't make any sense.
Being able to publish a beta version of the application in the marketplace is an awesome feature, but in this moment, for me is almost useless. You have to find your beta testers, but it is a difficult task. So there should be an "open" beta option. This way anybody that wants to test the beta and has a link to it can do it with a limit of 100 users (more or less like the hidden apps but limited to a number of users).
In my opinion 2011 was a great year for Windows Phone even if the market shares don't reflect it . The 7.5 version is a great step forward and I hope that 2012 will bring us another big step. I still think that the application list is "ugly" and not really usable, we need some way to group applications (maybe an evolution of the "folder" concept).
I really hope Microsoft will make Apollo an EVOLUTION and not a REVOLUTION.

Happy New Year to all my readers! A better year to everyone.

NAMASTE