Tuesday, October 26, 2010

Using Dojo to Create a Domino File Upload Control

I having been doing research for the past couple of months on how I can create an file uploader control for my UX Pages Project which now has involved to become the iPhora Application Designer. Again Jake Howlett's Codestore.net and a couple of other blogs were great starting points. There was four different ways I could create a Domino file uploader:

- Embedding a traditional file upload control into a Domino form
- Creating a separate HTML form and referencing in the name of the Domino FUC on a traditional Domino form
- Using XPages and create a FUC
- Set DominoDisableFileUploadChecks=1 in the Notes.ini file and create a HTML Form that does a ?createdocument on a traditional Domino form (that I learned from Jake Howlett's blog)

All these techniques will work in creating a Domino File Uploader control. However, each of these techniques have limitations that I do not like. Since I am a strong believer of the total separation of form and data the use of traditional Domino FUC and XPages is totally out. The setting of the notes.ini file leaves a big security hole on the Domino server. Therefore, the creation of a separate HTML form which we do in UX Pages and referencing the name of the Domino FUC on a traditional Domino form was the closes option for me. However, since Domino 6 the name of the Domino FUC consist of %%File.DBRepID.FormID.$Body.0.??? that is unique. There is no guarantee that the name will not change. If you copy the database to another server, the name will change. I was frustrated with the whole thing and drop the whole concept a month ago. As I was listening to music, I suddenly realize the solution was extremely simple and with Dojo it is even simpler. It can be done without Dojo using traditional Ajax, but Dojo makes it so more flexible.

I needed a way to get the name of the Domino FUC on the traditional Domino form. I assume that it will be dynamic and unknown to the separate HTML Form. First assume the name of the traditional Domino form with the FUC in this case is called "fileuploader". If you look at the source of the form when you display it in a web browser you can locate and grab the FUC name and put it in your HTML form. However, I guarantee if will change if you copy the database.

Instead, I use the Dojo xhrPost or xhrGet HTTP service call, handle as text, to get the html of the form "fileuploader".



The data is now only text. Next I parse out the name of FUC and create the FUC using Javascript and place the location of the FUC into any location I want in the form. The StrLeft and StrRight are Javascript functions that does the same functionality as the Lotusscript StrLeft and StrRight.

During the dojo.addOnLoad() you can run the code to generate the FUC using Javascript onto the HTML form using dojo.byId().innerHTML based on the FUC name that you have parsed.

Now regardless of where the database is moved to the separate HTML form with your FUC will always reference the Domino FUC on the Domino form. I believe this technique will also work with a Adobe Flex upload control. Since we are using Dojo this technique works in both IE and Firefox.

I will be presenting at the virtual LTAP 2010 conference this week and I will demonstrates this technique as part of my presentation. So if you get a chance attend my session.

Monday, October 25, 2010

My LTAP 2010 Session: Introduction to Dojo for Domino Developers

I will be presenting a session at the LTAP 2010 virtual conference this week. My session is entitled "Introduction to Dojo for Domino Developers". It will introduce Domino developers who are not familiar with Dojo and how you can used it with Domino as a data store. I will provide a few demos including how you can create a Domino file uploader with Dojo that resolves many of the problems that have existed in the past. I will discuss this technique in my blog tomorrow.

Thursday, October 21, 2010

Lotus Traveler Issue

Recently a couple of our clients added iPhones to replace their Blackberries in their operation and we installed Traveler for them so that they can access there mail and calendar from their iPhones. Everything is working fine with the one exception. Using BES with your Blackberry you have the option of whether the handheld or the desktop has control on the deletion of messages. So if you set it to the desktop (default) when the user deletes the message from their Blackberry to remove the clutter of messages, the messages remain in their mail file until they delete it using their Notes or iNotes client. This is very handy. However, with the Traveler Exchange ActiveSync there does not seem to be a similar option. Has anyone encountered this issue and found a resolution?

Friday, October 15, 2010

Learn about Quickr 8.5 - Reminder GRANITE October 2010 Meeting on Monday

Just a reminder that the GRANITE Lotus User Group October 2010 Meeting will be on Monday. One of the things that we will be covering is Lotus Quickr 8.5 and all the new features and API associated with this new version. Also we will be presenting sessions on E-mail discovery customer experience and using Dojo with XPages.


GRANITE Web Site

Creating Opportunities

This past Tuesday I was fortunate enough to attend a presentation by Geoffrey Baer of WTTW Channel 11 at the brand new Glenview Library which is located a few miles from my house. Geoffrey is the host of the extremely popular Chicago architecture and history series that have been running on WTTW for over 15 years on the same Gateway computers. Geoffrey presented a shorten version of his North Shore tour focused primarily on Glenview. Glenview's new library is very nice. I believe it is a bit smaller than the Evanston, IL library which has won many awards located just about a block from my office. Both are very impressive.

Geoffrey described in his talk how he became the host of the series. He was working as a producer at WTTW while he was giving Chicago architecture tours to visitors. A couple who attended his tour kept following him along even after the tour and asking him many questions. The couple was extremely impressed. The gentlemen happen to be the new appointed chairman at WTTW. Shortly after, the chairman asked Geoffrey to start his series.

This experience is very similar to one that I had almost twenty years ago. When Rob Burton, Dan Eitel, and I first started ReCor almost twenty years ago we were doing a few odd consulting jobs here and there. We networked with different organizations and one day a consultant that we met had a technical issue. She did not have any money to pay us, but we help out because it was interesting. About a year later, she came back to us and told us that she was impressed by our skills and ask if we would be interested in a project at the famous Chicago Museum of Science and Industry. As a result, we developed all the kiosks in the Take Flight exhibit that is still running after 15 years. During that time we were developing our first training course for Notes 3. Through our Lotus Partner representative we got in contact with the Project Manager of one of the largest pharmaceutical company in the world located in Illinois. At that time a number of bigger companies started to develop training for this new Lotus product, Notes 3. So the chances that we would get a sales was very small considering. She asked what we have done beside a cc:Mail course. So we mentioned that we did the kiosks at the Museum of Science and Industry for the Take Flight exhibit. She went down to the MSI and visited the exhibit. A few weeks later we receive a global-wide contract for training all their users on Lotus Notes.

You never know how opportunities can come about. Unfortunately, a few Domino administrators and developers that I have known for many years were recently layoff. I encourage them and anyone else in their situation not only to network, but volunteer your services regardless of whether it is in your field of expertise. Opportunities are there but you need to increase your chances and sometimes it leads you to a totally different area that you never expected. I was a Microwave Engineer for ten years and now the only time I am involved with Microwaves is when I heat up my instant oat meal.

Tuesday, October 12, 2010

GRANITE Lotus User Group October 2010 Meeting

The GRANITE Lotus User Group October meeting will be held next Monday on October 18, 2010 at the IBM Center here in Chicago. We have a great lineup for this meeting. The topics for the meeting includes:

- Email Management, Archiving, and E-discovery
- Exploring Dojo with XPages
- Lotus Quickr 8.5
- MWLUG 2010 Summary and MWLUG 2011

So come join us and learn more about these topics. Breakfast and lunch will be included. Meeting are free for members. But non-members are most welcome. For more information and agenda for the meeting go to GRANITE site at: GRANITE Lotus User Group

Fall Colors in Michigan

With the great weather we had this past weekend, we decide to go to Holland, Michigan for our anniversary and enjoy the fall colors in Michigan. I have been married to the most wonderful lady for 12 years. We visited and hiked the sand dunes of Saugatuck Dunes State Park and P. J. Hoffmaster State Park. It was great exercise climbing the 300 foot sand dunes. You really feel it in your legs later. Both of them have beautiful beaches, but are not crowded especially in the fall. We tried getting a cabin, but they were all filled. This weekend gave me time to relax and enjoy the most important thing in my life, my family. As you can see the Lotus Software Cap make a good sun shade.









Saturday, October 2, 2010

Another Windows Server Retired

I have not been blogging at all recently. I have been so busy for the past month with projects and this weekend was the first time is a long time in which I had a chance to work on a server replacement project. The old Windows-based File Server was finally replaced with a new box running Ubuntu 10.04 LTS on VMWare ESXi 4. The new version of Ubuntu is even nicer than 8.04 LTS which we were using for some of other servers. With Quickr 8.5 now available on Linux, I will be able to retire all my Windows servers and be all Linux server shop(Ubuntu).

Busy so busy it was not good that my T41 hard drive bit the dusk a week ago and with some critical files that I was working on that I did not have a chance to back up. So next week I will be performing surgery on the hard drive to recover the data. The hard drive platters are in great shape so the data is there but the drive has issues. I brought an identical drive and will hopefully be transferring the platter to the new drive. Instead of Windows XP Professional, I will be installing Ubuntu 10.04 Desktop back on the T41. Wish me luck.