jump to navigation

Lotus Notes : simple soft delete form your application November 22, 2009

Posted by pierrekoerber in Uncategorized.
add a comment

Hi,

In our application it’s a common task to delete document but before granting the deletion, we want to be able to discard the modification…

Here the simpliest soft delete agent in your database, it juste rename the form name which should be enough in every lotus application.

FIELD Form := “DELETED_” + Form;
SELECT @All

Just put all this code in a lotus notes agent and you’re done !

Greetings.

How to import PNG images in Lotus Notes 6.x and 7.x October 31, 2009

Posted by pierrekoerber in Uncategorized.
add a comment

When trying to include png images, you will be stuck with these old clients… one simple workaround found on the www…

Lotus Notes does not support importing of PNG images into Rich Text by default but you can add that feature by adding the following line to your Notes Clients notes.ini file:

EDITIMP18=PNG Image,0,_IW4W,,.PNG,,8,

Oops, well it’s seems that I’m dead… September 26, 2009

Posted by pierrekoerber in Miscellaneous.
add a comment

Easy lotusscript picklist class for your apps… August 8, 2009

Posted by pierrekoerber in Lotus domino, lotusscript, programming.
add a comment

When creating your application it’s always painful to remember how to generate a picklist… here comes in play my class (which is part of my own private framework).

Which 3 lines of code, I’m doing a picklist… let me explain…

Dim pl As New DbPickList(Nothing)
pl.setView("ClasseByName")
Set docRet = pl.getSingleDocument()

The first line allows you to create the picklist object which contain the notesuiworkspace object. The class contains member functions to set every parameter of the original picklist function. Defaults values are set when instantiating the object. There is two basic function to display the picklist 1. getSingleDocument() which return a simple document and getMultipleDocuments() which give you the notesdocumentcollection. Give a look to the class, it’s easy.

Link to the lss file

First download the .lss file and put everything in a script library. Then you should add the use statement.
The class allows you to customize easily the picklist but it is more convenient than the ugly function from the notesUiworkspace… give it a try and enjoy.

One cool thing is to derivate the class and then create all the picklist you need in a new class, then you’ve got centralized your picklists in a central class which allows to simplify the maintenance cycle of your app.

Greetings.

How to execute Visual Basic from JAVA ? – part 2 – autostart your VB… July 11, 2009

Posted by pierrekoerber in Uncategorized.
2 comments

In our last article we have seen how to start word from JAVA. Now we will start word with a document in parameter and then we will put an autoopen marcro in our document.

JAVA – Code

String sCmd ;

sCmd = “C:\\Program Files\\Microsoft Office\\OFFICE11\\winword.exe ” + “\”c:\\Mes documents\\Doc3.doc\”" ;

try {
Runtime.getRuntime().exec(sCmd);
} catch (IOException e) {
e.printStackTrace();
}

This will start word with a special document.

The next step is how to autostart the VB code.

You can put in your document macro the autoopen, which will automatically starts when the document is launch

VB – Code in the document

Sub autoopen()

Load UserForm1
UserForm1.Show

End Sub

Ok, this is a simple way to starts VB from JAVA. Of course you can’t synchronise your programs and also you can’t pass parameters. This is not a perfect integration but it can helps you to reuse easily something which exists already on your system.
Of course it breaks the main advantage of JAVA to be multi-system, but the world isn’t perfect… for now.

Greetings.

How to execute Visual Basic from JAVA ? – part 1 July 9, 2009

Posted by pierrekoerber in It strategy, java.
Tags:
add a comment

I’m facing a common programming problem. I’m on my windows machine and I have a software package which run fine form my needs but it is not available in JAVA… how to integrate it in my JAVA program ?

First there is connectors to run activeX of other microsoft tech from JAVA, my way is to use directly VB from JAVA with a shell command.

Everyone know that there is a visual basic embedded in microsoft office. So the strategy is to launch a word to make the VB code run…

To launch word, here the easy way :

String sCmd ;
sCmd = “notepad ” + “c:\\temp\\test.txt” ;
try {
Runtime.getRuntime().exec(sCmd);
} catch (IOException e) {
e.printStackTrace();
}

In our next article we will see how to start VB… greetings.

A remain of the past – the dusty console July 5, 2009

Posted by pierrekoerber in Uncategorized.
add a comment

After sometimes of laziness, (I’m too much playing with facebook and twitter) I’m back on my blog…

Which one of you is an old enough notes freak to remember the dusty old console which was the bread and butter of the dark age of the domino administration ? at this time to administrate a notes server you only need a strong knowledge of the domino directory and a simple console… old good times !

The old console remains in lotus notes today, and you can call it which a simple macro :

@Command([AdminRemoteConsole]) ;

Of course you need the rights to do it, it could be very useful when you are stuck with a “simple” notes client…

The cCounter class. March 11, 2009

Posted by pierrekoerber in Lotus domino, Tech, programming.
Tags: , , , , , , , ,
1 comment so far

* When programming a very long an complex agent it’s very fine to display the agent stats at the end of the agent’s execution. These stats could be a lot of numeric data. It’s a pain to declare and manage all these variables.
* For doing this you need to create a lot of different counters and it’s very boring to manage the init part of these counters, the increment and the display. And what a pain if you want to add a new counter…
* With my solution you will find this very easy to manage and you will add a lot of interesting counters in your next complex agent.
* The idea is to put every counter in a class which will manage for us the boring job.
* This class will init the counter, manage the increment and give us the text.

Here the code :

‘  Class counter v1.0
‘  By Pierre Koerber

Class cCounter
lCounter List As Long

Public Function incrementCount(sCounterName As String)
If Iselement(lCounter(sCounterName)) = False Then
lCounter(sCounterName) = 1
Else
lCounter(sCounterName) = lCounter(sCounterName) + 1
End If
End Function

Public Function toString() As String
Dim sRes As String
Forall x In lCounter

If sRes = “” Then
sRes = Listtag(x) + “=” + Cstr(x)
Else
sRes = sRes + “,” + Listtag(x) + “=” + Cstr(x)
End If
End Forall
toString = sRes
End Function

End Class

‘——————————-

‘ calling code, this allows you to manage three counter in a easy and cool way.

‘——————————-

sub initialize
dim counter as new cCounter()

set doc = dc.getFirstDocument
while not(doc is nothing)
if doc.Subject(0) = “” then
Call counter.incrementCount(“Err”)
else

call counter.incrementCount(“Treated”)
end if

Call counter.incrementCount(“RcdTreated”)
set doc = dc.getNextDocument(doc)
wend

log(counter.toString())

end sub

Diary of my switch to ubuntu 8.10… March 10, 2009

Posted by pierrekoerber in It strategy, Tech.
Tags: , , , , , , , , , ,
add a comment

Remember last year post :

http://pierrekoerber.wordpress.com/2008/03/10/diary-of-my-switch-to-kubuntu/

After giving up because facing some wireless troubles, I did it again… The fact is that after one year of moderate use, my old laptop was completely unusable. WinXp was so slow, I read a lot of articles of how to boost an XP system but, what a big job and you know I haven’t so much time. I’m using an old Dell Inspirion 9200, with hh 60 gigas and 700 of RAM.

I burned the 8.10 version on a CD and went on to the installation.

The installation process went perfectly. After that I should connected my laptop to internet with the internal network car. After that ubuntu proposed me to upgrade the installation. After a reboot (like in the windows world) the system has auto-detected my internal wireless card and proposed to me the right native driver. (what a luck). I was beginning to try to install the NDIS Wrapper… but how lucky to bypass this challenge.

After installing the must-have application, I have a brand new laptop… the feeling is that the hardware is responding like a brand new PC. The interface is pretty good, and it’s really a pleasure to work with ubuntu. If like me you have an old laptop, you should try to make it young again with ubuntu.

My test is superficial, for the moment I haven’t done serious use of open-office product and so on… but we will see.

Greetings !

Install the domino server java console November 25, 2008

Posted by pierrekoerber in Lotus Admin, Lotus domino, Tech.
Tags: , , , , ,
1 comment so far

For me the java console is a lost gem for the notes administrators.

It is a good feature because it allows to administrate all your server from one single point. It will run the console separatly from your notes client, and this is good because the admin client sucks ! it give you more but that’s not the subject of this post.

This article allows you to configure your Windows server to make it run.

First you should modify the start of your server to make it load the domino controller and the java console.

Take “the HKEY_LOCAL_MACHINE\System\CurrentControllSet\Services” key and look for the Lotus Domino key.  In there you will find an entry called ImagePath.  The add to the service’s parameter the -c to load the domino controler and the -jc if you want to load the java console the machine.

domino-server-registry

After that your server should start as in this picture :

domino-server-reg-edit

You could start the console from your notes client directory to have the same on you computer… nice isn’it.