Archives for November, 2012

21 Nov 2012
3

Check the Eclipse version of your Lotus Notes 8 Client

Hi everyone. Just thought I’d blog this quickly. I wanted to check which version of Eclipse is being used for my Notes 8.5.3 FP1 Client and it was a touch tricker than expected. Thanks to Nathan T Freeman, I now know where to find this:

1. Open your Notes Client and click on “HelpAbout”.

2. Click on the “Plug-in Details” button.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

3. Sort the “Plug-in Name” Column and search for “Eclipse UI”. You will see the version in the Version Column. In my case it’s version 3.4.2……

 

 

This is baseline for determining the overall version of Eclipse that’s used for Lotus Notes.

 

Hope this helps.

Cheers.

9 Nov 2012
0

Use Dojo or jQuery to manipulate Printing of Web Pages

Hi everyone. Here’s a second post that was published by Johan Meyer, Ukuvuma’s senior Microsoft Developer.

Enjoy

John.

 

From Johan Meyer at Ukuvuma Solutions

Okay, this is a nice short tutorial where I will show you the following:

  1. How to create a print button on a web page.
  2. Use Firebug (Firefox), Developer Tools(IE) or any other developer tools available to identify what controls needs to be hidden or showed before the page gets printed.
  3. Show you what code is needed for jQuery or Dojo.

 

1. How to create a print button on a web page.
First off you need to create a Print button. Now normally when I create an image as a button on a web page I will use CSS for the style and a <div> for the button.

So first add a <div></div> tag to your Page and give it a class name, for this example I will be using “printButton” as the class name.
In your HTML file add this div:

<body> <div class="printButton"> </div> </body> 

Now that you have your div you need to create the Stylesheet that will style our print button.  Add a CSS file to your project and add the following to it.  The dot before printButton means that this style is applicable to the printButton Class.  If the printButton had a # before it would look for the div’s ID.

.printButton {

background-image: url(“printButton.jpg”);

background-repeat: no-repeat;

cursor: pointer;

cursor: hand;

height: 20px;

width: 20px;

padding: 5px;

}

 

This style will change your div however you want it.  The first two lines will show your image without repeating it.  Then we use two cursors, the first one works for IE and the second for Firefox (this is the code that will show the little hand when you hover over the image).  Then we set the fixed width of the div and the padding to make it look a bit nicer.

 

 

 

 

 

The image above shows how the button should look by now.  To create an actual print button we need to add the Javascript print command.  Add the following to your printButton div.

<html>

<head>

<script type=”text/javascript” language=”javascript”> function printDocument() { window.print(); } </script>

</head>

<body>

<div onclick=”javascript:printDocument();”> </div>

</body>

</html>

 

The onclick event fires a javascript function called printDocument().  Inside this function we call a JavaScript function that calls the browsers print class.  This will print the document but not always as the user would want it to print.

 

2.  Use Firebug to enhanced the nor window.print JavaScript function

For now I’m not going to go into depth of how firebug works but I will post on how to use it and all about what I know of firebug in one of my future posts.

Use Firebug and look through the website that you want to print and identify what controls you want to hide before printing, or what controls you want to modify in size before printing.

If you have a layout that looks like this, it is likely that you only want the content part of this layout.  So identify the controls by ID or by class and write them down.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The sections that we will want to hide are: LeftSide, Header, Footer and RightSide.

 

3.  JQuery and Dojo code

Now that you know what controls you don’t want to show, you need to hide them before calling the printing function and show them again after printing.

In the printDocument function add the following code for jQuery:

<script type=”text/javascript” language=”javascript”>

function printDocument() {

jQuery(“.LeftSide”).hide();

jQuery(“.Header”).hide();

jQuery(“.Footer”).hide();

jQuery(“.RightSide”).hide();

window.print();

jQuery(“.LeftSide”).show();

jQuery(“.Header”).show();

jQuery(“.Footer”).show();

jQuery(“.RightSide”).show();

}

</script>

 

And this if you want to use Dojo:

<script type=”text/javascript” language=”javascript”>

function printDocument() {

dojo.query(“.LeftSide”).style(“display”, “none”);

dojo.query(“.Header”).style(“display”, “none”);

dojo.query(“.Footer”).style(“display”, “none”);

dojo.query(“.RightSide”).style(“display”, “none”);

window.print();

dojo.query(“.LeftSide”).style(“display”, “block”);

dojo.query(“.Header”).style(“display”, “block”);

dojo.query(“.Footer”).style(“display”, “block”);

dojo.query(“.RightSide”).style(“display”, “block”);

}

</script>

 

If you need to call some of the controls on the ID instead of Class, you can change the jQuery to “#Header” and the dojo you need to remover the string with the dot and add dojo.byId(“Header”) instead.

You can manipulate the page as you like, just return everything back to normal after the user has printed or redirect them to a new page.

Hope you enjoyed this tutorial.

6 Nov 2012
6

Enabling Intelli-sense in Firebug for Dojo, jQuery and Javascript

Hi everyone. There are a couple of awesome posts that were published by Johan Meyer, Ukuvuma’s senior Microsoft Developer. I thought it best to re-blog some of his posts that I feel would add a lot of value to those who follow this particular blog.

Enjoy

John.

 

From Johan Meyer at Ukuvuma Solutions

I found a nifty plugin for Firefox that enables intelli-sense in the Firebug Console for certain Javascript Frameworks.

To enable intelli-sense for Dojo, jQuery and Javascript, install the following plugin for Firefox. This will enable the intelli-sense in Firebug’s Console Window.

Get the Firebug auto-completer Plugin

1 Nov 2012
28

Notes Classic vs Notes for Eclipse. A glass case of emotions

The past few days I’ve been involved with quite a lot of Std Notes Development. Waking up this morning I realized that working in Notes 8 Eclipse, as awesome as what it is for many reasons related to XPages, has come at some cost. I’ve been working on a Project that required no XPages Development, and decided to run Notes 8 Classic just to get a feel for it. In doing so, i’ve identified the following that makes me frown daily:

1. The Speed

DDE (Domino Designer in Eclipse) is quite a bit slower than Designer 8 Classic or prior releases. Every time I open DDE for the first time I go make myself some coffee so that it can finish up whatever it’s trying to do. DDE is also less responsive to what i’m used to in prior releases of Notes. Every time i click on something there’s this delay before it reacts.

2. The Build

Ok, this is probably the bane of my existence. How I miss the days of “Modify, Save, Preview”. Now, it’s “Modify/Save/Build/Preview/Hmm, it must have not built properly/Build again/Preview/Dammit, now what!!!/Clean/Build/Preview/Finally! I’m all for XPages but there’s got to be a better way. It’s gotten worse lately where if I have a Local Replica where I design all my changes, then build and replicate with the Server, 60% of the time I have to open the Replica on the Server and re-build, which sometimes takes up to 3 minutes depending on size, etc. This has given me massive amounts of frustration and unnecessary time wasted.

3. The Crashes

It almost feels like DDE is in a bad mood by default, until you can somehow convince it otherwise. I had to install Subversion in DDE on multiple machines the other day. 5 out of the 6 machines resulted in their DDEs crashing and none of them for the same reason. I couldn’t believe my luck. 5 out of 6. Is this the cost of having functionality like XPages, Source Control, etc?

 

I apologize that this is not one of my more positive Blog Posts, but I realized this week what a joy it was to work in Classic Domino Designer. Yes, sure Eclipse brings a lot to the table, but most definitely not for free.

I’d love to hear feedback from everyone on their experiences. Maybe this post could result in finding a way to have DDE Perform the way we all want it to.

 

Cheers

John.