TIP: Changing Window Perspectives in Lotus Domino Designer

Hi everyone. Have you ever experienced working on an Application in Domino Designer with your team, and when they create new design elements it doesn’t show up on your side, forcing you to remove and re-open the Database Bookmark?

Another scenario is if you decide to change your Design Perspective from XPages to Domino Designer in order to view design elements such as Outlines, Pages, etc….only to sit there wondering why these designs aren’t showing.

Perspective1 TIP: Changing Window Perspectives in Lotus Domino Designer

 

This was never an issue in earlier versions of Domino Designer (prior to Eclipse Designer), but the good news is that you can sort this issue out in 2 simple steps.

 

Step 1 - Right Click on your Database’s Bookmark, and click on “Refresh“.

Perspective2 TIP: Changing Window Perspectives in Lotus Domino Designer

Step 2 - Make Coffee.

 

I hope this makes Domino Designer a friendlier Development Environment for you. Until next time.

Cheers

Automated Testing in XPages

Greetings everyone. I am very happy to announce that I have found a way to automate testing in XPages.

I attended Microsoft’s Tech Ed Event last year, and one of the tools that impressed me heavily, was Visual Studio’s Unit Testing Automation. What I enjoyed most was how you could setup a Test Case by recording what you were doing on the Screen, and then playback that Test Case. What was even more impressive was when the Test Case failed. When this happened, Visual Studio would take you to the line in your code where the Test Case failed.

Now, this is probably old news for Visual Studio Developers, but it’s quite rare for Domino Developers to have this capability. I’ve searched online and have not found any Testing Automation Toolkit for the physical Lotus Notes Client as yet, but I did stumble upon Selenium, which I am now using to automate testing in my XPages Applications.

 

What Is Selenium

The following extract is from Selenium’s Home Page:

Selenium automates browsers. That’s it. What you do with that power is entirely up to you. Primarily it is for automating web applications for testing purposes, but is certainly not limited to just that. Boring web-based administration tasks can (and should!) also be automated as well.

Selenium has the support of some of the largest browser vendors who have taken (or are taking) steps to make Selenium a native part of their browser. It is also the core technology in countless other browser automation tools, APIs and frameworks.

 

For our purpose though, Selenium provides a means of recording your Xpages Testing, and then re-running that test or tests. The below video will show you how I setup and run a Test Case using Selenium IDE on our Online XPages Showcase. You’re more than welcome to use our Showcase to test Selenium. The below video was published through David Leedy’s NotesIn9 Series. Be sure to check out more videos from his Website, or through iTunes.

 

A few important Notes when Testing with Selenium

1. Selenium IDE is a Firefox Add-On. I’m not aware of any other Add-On for IE, Chrome, etc.

2. From what I’ve read, Selenium IDE gives you a small taste of what Selenium can actually do. I’ve however not had the time to explore this product any further.

3. From the feedback I’ve received and from my own tests, it seems that Selenium struggles a bit when it comes to testing certain Dojo and JQuery Controls. I will be testing this further, and will update this Blog Post as soon as I find a way around this. I am also expecting a lot of feedback from the Community, who I hope will also list many Tips, tricks etc.

That’s it from me. Enjoy the Video, and please leave feedback if and when you have time.

Cheers icon smile Automated Testing in XPages

 

Video Demo: Updated Ukuvuma XPages Showcase

Hi Everyone. It’s been quite a while since my last post. I apologize for that. Holiday season and all icon smile Video Demo: Updated Ukuvuma XPages Showcase .

So, i decided to kick-off this lovely year by upgrading our online XPages Showcase. The initial version (Version 1) was designed using Notes/Domino 8.5.2 and made use of the oneuiv2 Theme. Now that we’re running Notes/Domino 8.5.3, I’m using some of the cool features that Xpages provides. An example of this is the Javascript and CSS optimization and the oneuiv2.1 Theme.

So, long story short, we now have a Version 2 XPages Showcase. I created a short Demo Video that gives you a walk-through of some of the features that I use.

To access the Showcase, simply Click Here, and login using the Username “guest” and Password “guest“.

Please feel free to leave any feedback. It’s always appreciated and welcome.

I’ll soon be adding many more features and samples to our XPages Showcase, including a JQuery Accordion Control, Dojo Grids, our new JQuery Mask Control that we’ll be submitting on OpenNTF very soon, and much much more.

We’ll also very soon be launching our .Net Showcase. I’m very excited about this. Sorry to all the IBMers, but trust me, you’ll see what mean when it’s launched.

Until next time. Enjoy icon smile Video Demo: Updated Ukuvuma XPages Showcase

Some hard lessons learned during a XPages Project

Hi Everyone. This is a shortish post where I feel it’s important to make mention of a few issues I ran into during one of my XPages Projects. Please heed my warnings and learn from my experience.

1. I had a problem where I have a button that triggers SSJS, but when I click on the button, nothing happens. My first guess was that the partial refresh wasn’t working as planned. But after what felt like forever, I finally realised that there were controls on the page that were been validated, and I had no error message box for them, because they were in a panel that wasn’t supposed to be refreshed. In my head, they shouldn’t be validating because I’m not refreshing that part of the page, but it seems that i’m wrong.

LESSON LEARNED: Please remember that if your button’s not doing anything, it’s most likely returning false before executing the SSJS, due to failed validation on controls that aren’t bound to an Error Message or Error Messages Control.

2. If you’re creating XPages the right way, your pages won’t be reloading when clicking on buttons, etc. You’ll be using partial updates. Now, the problem here is if you’re executing some advanced business logic, and somewhere it’s failing, you don’t see any XPages Errors returned because your partial refresh is an AJAX Post back. What I do here as a quick fix, is I set the button that fails to perform a full update instead of a partial update. This way, it will reload the page, and return the error that’s occurring. This is not best practice, but a relatively quick fix. I have not had the time to mess around with Medusa on OpenNTF, and OpenLog of XPages works well, but sometimes is a lengthy alternative.

LESSON LEARNED: A Full update is your worst enemy in XPages, but it will always tell you the truth icon smile Some hard lessons learned during a XPages Project

That’s it for now. Back to XPages Development.

Cheers all.

Integrating XPages with DB2 is just too easy

I presented a 3 Day Introduction to XPages Course this week for one of my clients, and they challenged me to have XPages connect to a DB2 environment they had set up. I must be honest I was a touch nervous as this would be my first time attempting this period.

I told the client that we would spend the last day (T0day) focusing on this particular challenge, and then also show them how the Application Layout Custom Control works.

We started around 7:00am this morning, and by 8:15am, we had a View Panel with 1 column displaying data from a DB2 table. Here’s the best part…..we got it right on our FIRST TRY.

Now, I have to make mention and take my hat off to my client for providing me with all the DB2 resources I needed to make the JDBC Data Source work, which included:

1. JDBC Jar Files which were placed in the Domino Directory under the folder “jvm\lib\ext”

2. The URL to the DB2 Database that we planned on using

3. The Class name of the JDBC DB2 Driver

Using this Video from Niklas Heidloff as a reference, as well as perusing the JDBC NSF that ships with the 853 XPages Extension Library, we were able to configure a .jdbc file in our Database’s Package Explorer, create a View Panel in our XPage, map it to a JDBCQuery Data Source, and BOOEM!!!

This was just too easy. I’ll submit a video tutorial on how to achieve this as soon as I’m done with my other tutorials. My backlog is starting to build up. However, for those who are anxious, use the video link I added in this post, and reference the notes below:

NOTES FOR DB2 INTEGRATION:

Using Niklas’s Video as a reference, do the following:

1. in your .jdbc file that you need to create in the Database’s Package Explorer under the “WEB-INF/jdbc” folder, have your XML look something along the lines of:

jdbc1 Integrating XPages with DB2 is just too easy

2. You will need to copy the 2 JDBC Jar Files that come with the DB2 Install into the “jvm\lib\ext” folder in the Domino Program Directory.

3. Restart the HTTP Server (Restart Task HTTP)

You should be able to come right by following the rest of the video.

Enjoy, and please feel free to provide feedback.

John Jardin

© 2011 Ukuvuma Solutions