Monday, 16 April 2012

Grappling with "Ignoring portion of document that uses a feature from another version of Notes"

In one our databases, whenever we were trying to open a document it used to give us an error of "Ignoring portion of document that uses a feature from another version of Notes". We were able to see all the fields in document properties, even able to extract all the attachments in it using LotusScript code. But document was simply refusing to open in the UI.

A little search and we found this technote which details out the reason and possible solutions to get the document opened. One of them included deleting the problematic rich text field. YIKES!

But what eventually what helped us was this intelligent suggestion by Cathy Fitzherbert. Just open the document in a browser in edit mode and save it. Then you can successfully open it in your Lotus Notes client. On the downside, you lose all the formatting in your rich text field and all the attachments will start to appear at the bottom of the document.

Wednesday, 11 April 2012

Use replica ID in @DbLookup with caution

Few days back I was faced with an issue where a user reported the following error message while opening a form in Lotus Notes client:

Field '<FIELD NAME>': Connection denied. The server you connected to has a different name from the one requested.

While this thing was working at almost all other machines (including mine), it was just one user where it was not working. The formula on the field was a single line database lookup as:


After unsuccessfully going over technotes, forums and blogs I went back to help documentation for @DbLookup and something caught my attention.
Continue reading »

Sunday, 8 April 2012

Installing and running XPages Extension Library in your local machine

I had been hearing a lot about XPages Extension Library and finally got to try it out in XPages code-a-thon held at Mumbai. So I decided to try it on my local machine along with little help from experts on StackOverflow. Its a simple two-step procedure - install extension library and run extension library.

Install XPages Extension Library

First of all get the latest release of extension library from OpenNTF. Unzip the file and find "updateSiteOpenNTF-designer.zip". Unzip it and you will get two folders of "features" & "plugins" and a file "site.xml". In Lotus Notes sidebar, go to My Widgets and select "Options > Configure a Widget from... > Features and Plugin on an Update Site". If you are unable to see My Widgets in your sidebar then click here.


Continue reading »

Saturday, 7 April 2012

Enable "File > Application > Install..." in Lotus Notes

Mary Beth Raven in her blog here shows how to enable "File > Application > Install..." in Lotus Notes. Just you go to "<Lotus Notes folder>\framework\rcp", find a file "plugin_customization.ini" and add a line com.ibm.notes.branding/enable.update.ui=true in the file.


But based the screenshot provided on her blog I guess she didn't ran into a specific problem, which I did, because she was using Windows XP. Basically if you edit the file plugin_customization.ini and try to save it you will get an error saying "Cannot create the C:\Program Files\IBM\Lotus\Notes\framework\rcp\plugin_customization.ini. Make sure that the path name are correct."

Continue reading »

Friday, 6 April 2012

Displaying My Widgets in your sidebar in Lotus Notes

To display My Widgets in your sidebar panel, go to "File > Preferences...". In the Widgets tab enable the option of "Show Widget Toolbar and the My Widget panel".


Tuesday, 20 March 2012

Export Lotus Notes documents to Microsoft Word

For a requirement I was looking for exporting Lotus Notes documents to Microsoft Word. I found some help here and here. The former one uses Word.Application while the latter does something with user32.dll. But I was looking for something which was not dependent on external software. Then I came across @Command([FileExport]). A little help from the discussion here, I was able to devise a simple solution to it.

Lets say, you have a form fUserProfile that you want to export to a Word file. First create a copy of that form and name it, say, fUserProfile_Export. In PostOpen event of the fUserProfile_Export form enter the following formula.


Continue reading »

Monday, 19 March 2012

Get the text back on Gmail buttons

Ever since Gmail launched its new look there have been some positive, some negative and some extremely negative reactions. But what I really hated was the fact that now there were only icons present instead of labels on the buttons. Worse, there was no way to get it back!


But now Google has finally added a setting so that you can get the text back on buttons. On the top-right you will find gear icon (Settings), click on it and from the popup menu click on Settings.


Continue reading »

Sunday, 11 March 2012

Samsung Galaxy Note sets new milestone in display size



The Samsung Galaxy Note from AT&T, which is being called the world's first smartphone with a 5.3-inch display.

It sets a new milestone as it leaves behind other smartphone with screen sizes of around 4-inches to 4.3 inches.

After you come to terms with the size, you can start to enjoy some of the device's cool features, such as the S Pen, the slimness, light weight, five columns of application icons and six rows of apps instead of five.

The Galaxy Note has a gorgeous display with a 1.5 gigahertz dual-core processor inside running an Android 2.3.5 operating system, also known as Gingerbread.

The next version of the Android OS 4.0, also known as Ice Cream Sandwich, will likely be out soon as an upgrade for the Galaxy Note.

Because of the size and the innovative features, the Galaxy Note will cost around $300 under contract.

If you're looking for an e-reader or small tablet, as well as a phone, the Galaxy is worth a closer look.

Advertisement:
iHome FM Stereo Alarm Clock Radio for Android Smartphones - iC50

Saturday, 3 March 2012

24Online client crashes with Avast antivirus

Recently when I moved from AVG antivirus to Avast antivirus, I couldn't use my 24Online Client as it used to crash every time I started it. The only way to start it was to disable Avast, start the 24Online Client and then enable Avast again. A real pain! After a bit of trial-and-error I found the solution.

Go to the main screen of Avast. From there go to "REAL-TIME SHIELDS > Web Shield". Click on the "Expert Settings button".

Continue reading »

Monday, 27 February 2012

If Rajinikanth was a software engineer... :)

I know that there is no shortage of Rajinikanth jokes, but I couldn't stop myself after reading this post. So here it goes.

If Rajinikanth was a software engineer...
  1. Compilers don’t warn Rajinikanth. Rajinikanth warns compilers.
  2. Rajinikanth writes directly in binary. He then writes the source code as a documentation for other developers.
  3. Rajinikanth can derive private key by just looking at the public key.
  4. All pointers point to Rajinikanth.
Continue reading »

Thursday, 23 February 2012

Image URL in XPages using Notes client and browser

In Java Charts, one of the users reported that charts were not visible in Notes client. The charts (images) are basically being generated using the XAgent technique, and you will face the same problem if your image is being generated using XPage.

To understand what exactly is happening lets take help of an example. Say you have XPage with following code snippet which displays an image using javascript formula. (actn005.gif is present in the current database as image resource.)


Continue reading »

Tuesday, 21 February 2012

The BlackBerry PlayBook is back in the game



When the BlackBerry Playbook first arrived on the tablet scene a little less than a year ago, a few other tablets, such as the iPad, the Motorola Xoom and the Samsung Galaxy Tab were already on the shelves. It was going to be tough to gain some attention.

But the PlayBook was different in that it shunned the Android operating system favored by the iPad competitors and instead choose a spiffy OS from QNX Software Systems. QNX is best known for their in-vehicle and infotainment systems.

The PlayBook was good-looking, but it had a unique trait among other tablets in that it needed to be tethered to a BlackBerry smartphone in order to use the calendar, email and contacts features. It was depended on a Bluetooth connection between the PlayBook and the smartphone, with only a range of about 30 feet.

The fan base didn't latch onto the PlayBook as expected, maybe because of the tethering process and the difficulty in setting it up, especially with all the security steps involved.

The engineers at Research In Motion, or RIM, went back to the drawing board and as today, have released OS 2.0 software to give the PlayBook built-in access to the calendar, email, contacts and updated other features, such as the BlackBerry Bridge software. The Bridge upgrade will allow a BlackBerry smartphone to be used as wireless keyboard and mouse for a BlackBerry PlayBook.

With this new OS upgrade, maybe the PlayBook can make another run at the tablet market, which is even more crowded now with another iPad, another Xoom, more Galaxy Tabs, the Amazon Kindle Fire, more Barnes & Noble Nooks and a host of devices from other manufacturers, such as Acer, Asus and Toshiba.

The PlayBook is back on the field and the game is more competitive than ever.

Click here for a video on how the new BlackBerry OS and a BlackBerry smartphone works together.

Advertisement:
BlackBerry Folding Blade Charger for the PlayBook and Smartphones

Friday, 10 February 2012

Google removes plus sign on new tab button in Chrome 17

Just updated to Google Chrome 17 (to be precise 17.0.963.46 m) and there are some UI enhancements that Google has made, like this one.


Yup, they did away with the + (plus) sign on the new tab button. I kind of liked the plus sign and at first it left me confused, thinking it was a bug (I was not alone). I also couldn't find this in Google's Stable Channel Update for Chrome 17 except in the user comments.

Update 12 Feb 2012: Just found this link which basically suggests that this new look was being planned as early as 27 Sep 2011 in Chromium. It even goes on to suggest how you can get the plus sign on new tab button back.

Calling inner classes and enum from SSJS

While working on RSS Reader custom control for OpenNTF I had got stuck when trying to use enums. Basically I wanted to call the enum Proxy.Type to create instance of Proxy class. In Java you would write the code some thing like this:


But to write the same code in SSJS you need to concatenate the class and enum with $ (dollar) symbol. So your SSJS code would be:


The same goes when you are dealing with nested / inner classes. But why use the dollar symbol? I am not sure of the exact reason, but when a Java class with inner class or enum is compiled it generates two class files - one for outer and one for nested. For e.g.


The above class would generate class files as OuterClass.class and OuterClass$InnerClass.class.

Friday, 3 February 2012

Never update agent properties using web helper agents

Well... had a hard day today. But I have only myself to blame.

We had 100+ databases which were recently moved to a new server. So we had to update the "Run on" property of the agent to the new server. That can't be difficult! Just write a helper agent that will update all those agents using the ServerName property of NotesAgent class. I did just that, made it a little bit generic by adding configurable parameters. As their were a lot of databases to be updated I decided to run this agent on the server using the OpenAgent URL command. BIG MISTAKE!
Continue reading »

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

Saturday, 31 December 2011

Import image resources via LotusScript & Java

People have created various versions where you can import image resources in a NSF database using LotusScript. Basically you mimic the functionality of "Import Image Resource" button present in Domino Designer via code.


Some of the examples can be found here and here. Here is my version of doing this same thing using combination of LotusSciript & Java with LS2J.

Continue reading »

Three people icon...

Here are some three people icons similar to Lotus Notes. I will be updating it as when I come across new logos... :)

Lotus Notes

MySpace

Continue reading »

Thursday, 22 December 2011

"loaded" vs "rendered" in XPages

I couldn’t find many resources on the exact difference between loaded and rendered property available in XPage controls except for this blog by Thiyagarajan.

When you hover your mouse over loaded property it says – “Specifies whether or not the control should be created when the page is loaded.” while for rendered it says – “Indicates whether or not control should be displayed or processed on any subsequent form submission.”. Enabling the properties (exclusively) does not generate the control in the web page. But this is where the similarity ends. It was after a discussion with Sven Hasselbach on XPages forum, I understood the usage of these properties.

Create two computed fields cfLoaded and cfRendered with loaded & rendered property set to false in them respectively. Now add another computed field with following code:
Continue reading »

Friday, 16 December 2011

Accessing XPages global objects in Java

Update 24-Dec-2011: Added method to access session and database.

Update 10-Mar-2012: Updated the view object as it was pointing to a super class. Thanks to Tom pointing that one out.

Update 22-May-2012: Rectified the code to get viewScope. Thanks to Jens Winkelmann for pointing it out.

Update 16-Mar-2013: Added link to get getComponent equivalent in Java.

Tim Tripcony in his reply to one of the questions in the Notes/Domino XPages development forum had suggested using Java over SSJS to improve XPages performance. He basically said – “...Minimize the use of SSJS (server-side JavaScript). Every time any SSJS expression is evaluated, Domino parses the expression in realtime into an abstract syntax tree, then runs Java code that is a rough approximation of how the JavaScript specification states that code matching the detected syntax should run. The more you move your logic directly into true Java classes, the less expensive it is to execute, so it runs faster...

So I started thinking about how can we access various XPages Global Objects like – facesContext, sessionScope, context, etc. from Java classes.


Well... here's how we can access it:
Continue reading »

Thursday, 15 December 2011

Importing script library in Domino Designer

Domino Designer provides facility to import image resources, style sheets and file resources.


But for script libraries, there is no such option.


So when I need to import a third-party JavaScript script library I usually would create one and then copy-paste the contents into it. But there's an easier way to do it.
Continue reading »