January 30, 2008

Get your own animated favicon

A favicon for your site makes a better overall impression. My blog's favicon is the icon with the white B on an orange background in the address bar, which stands for Blogger (the platform).

It's actually possible to use animated favicons as well.
Either you can make the icon roll from up to down or you can have a marquee horizontel scroll text. It took some time before it started work in IE though and I have had some troubles with version 6 as well, but it should work for version 7 anyway and of course for mozilla.

Great feature!
This site will show you how to do it and provide you with animated icons as well.

www.wohill.com is an example site that uses an animated favicon. Reload the page if you don't see it first, it runs again on each refresh.

I will be on vacation for the next three weeks by the way, so no more posts til then. See you soon!

Technorati tags:
, ,

January 22, 2008

The Notes.ini ego parameter

Add this line to your private notes.ini file:

Window_Title=Lotus Notes 7.0.2 mastered by Niklas Waller

and restart Lotus Notes. And don't remember to change the text, even if its ok for me to use it ;-)

Each new window in Notes will have the following title

Technorati tags:
, , ,

January 18, 2008

Folder and embedded view problems

Notes is not being nice to me right now!

The last couple of days I have been struggling with notes problems that are really frustrating and to me seems like they are limitations hard to get around. If it's possible to get around them it's a lot of work and causes something else in the requirement specification to fail. I have another problem not described below which makes this feeling worse. I might post about that later on.

I posted on developerworks the other day about one of the problems and got a response which were good suggestions but not solutions I'm afraid.

Here is the issue with more information on other approaches:
We have a situation where there are currently 13 databases, one for a specific project and all inheriting from the same template. The prediction is that a new database (with the same template) will have to be created every week for some time. This is not a suitable solution and instead we want one database where all projects can fit in.

The people working with a specific database still need to feel that they are working the same way seing only the documents for a particular project. The database has a frameset with an outline displaying 23 views which are opened in the right frame.

Approach #1:
For each existing and each new project (former db), create 23 new outline entries and 23 new views. Since we don't know how many projects the new db will contain this is not a good solution looking at performace and usability.

Approach #2:
Use an environment variable to set which project a specific person is working on. Depending on the choice, a fixed amount of outline entries would display computed content in a fixed amount of views or folders, based on the environment variable.

Using approach #2 and views:
It is possible to (in queryopen of a view), when clicking an outline entry for the view, perform an FTSearch (for example FIELD field_name = field_value) to find and display the documents for a specific project. However the resultset is not categorized and it has to be, so this is not an option.

Using approach #2 and folders:
In queryopen of a folder, delete any existing content in the folder using "RemoveAllFromFolder" (from previous runs), perform a lookup to a view (getDocumentsByKey on the environment variable value) and put the result (notesdocumentcollection) into the folder.

This last solution works great BUT only when there are no response documents and also only if you are the only one working with the folders since they are shared. When clicking on a folder that has response documents, a message box displays saying:

"Notes error: All related response documents are being removed from this folder along with their parents. (FolderName)".

Also when refreshing the folder afterwards, all documents disappears. This error is due to the "RemoveAllFromFolder".
I can't seem to catch the error either (I think it is 4005) and do a Resume Next or similar because it is not treated as an error. A messagebox appears and the folder is not rendered as it should.

If I uncheck the folderoption "Show response documents in a hierarchy" the problem is gone. However this is not an option either.

So even if I got rid if this problem I would still be stuck with the shared folder problem. I don't won't to create private folders because then I would be stuck with perfomance issues anyway if there are many users.
I guess I could create a new folder each time an outline entry is clicked for a user, populate it and then remove it when the user leaves. But that really seems complicated as well as time-consuming for the user. It can not take longer time than it already does to open a folder as it is now.

Approch #3:
Each outline entry refers to a form which has the original view embedded. Now this is simple and works great BUT now I can't search in the embedded view AND the embedded view can not be auto-collapsed which makes it harder to read.
I tried to fix the search issue by adding a text input field above the embedded view and do an FTSearch but FTSearch is not available for NotesUIViews.
Then I saw a post on developerWorks with a link to an article by Mr André Guirard from the View which has a solution where the search button is an action in the embedded view's action bar. When clicking on it a dialog box opens a new form which creates a query and performs a search.
This does not work for me however as I want it to. Not in the following example database and not when I try it myself. I'm sure I'm doing something wrong, I am running out of patience though...

I am stuck and either they will have to live with multiple databases as it was before or they will have to use this last example without the search capability (I have added a section in the outline where all views are categorized on the projects so the functionality is still there).

Now I wonder:
#1 Does anyone know a solution or workaround to this folder approach or any of the other approaches?
#2 Does anyone have a suggestion to another solution?
#3 Does anyone have a shoulder to cry on? ;-)

Below is the QueryOpen sub of one of the folders for approach #2:
Sub Queryopen(Source As Notesuiview, Continue As Variant)
Dim s As New NotesSession
Dim db As NotesDatabase
Dim folder As NotesView
Dim view As NotesView
Dim folderName As String
Dim viewName As String
Dim coll As NotesDocumentCollection
Dim vec As NotesViewEntryCollection

folderName = "ReqByReqIdFolder"
viewName = "ReqByID2FolderLookup"

Set db = s.CurrentDatabase

' * Get environment variable
value$ = s.GetEnvironmentString("currentProject")

Set folder = db.GetView(folderName)
Set vec = folder.AllEntries

Call folder.Refresh
folder.AutoUpdate = False

' * Remove all documents from folder from last session
Call vec.RemoveAllFromFolder(folderName)

Set view = db.GetView(viewName)

' * No environment variable has been set
' * Add all documents in view to folder
If (value$ = "") Then
Set vec = view.AllEntries
Call vec.PutAllInFolder(folderName, False)
Exit Sub
End If

' * Get all documents from view which are categorized by the value 'value$'
' * Put them in folder
Set coll = view.GetAllDocumentsByKey(value$, True)
Call coll.PutAllInFolder(folderName, False)

Call folder.Refresh
folder.AutoUpdate = True
Call folder.Refresh
End Sub

/ Take care!

Technorati tags:
, , , ,

January 01, 2008

Conditional statements in html code


2008 is here and I am confident it will be a very good year. My first post this year is no breaking news. Still good to know.

When creating web sites it always comes up browser specific issues where Internet explorer and Firefox don't render the code equally. So annoying... However using css and/or conditional statements in the html code it is possible to launch different html blocks depending on if the browser is Internet explorer or not.

The HTML will run if the browser is Internet explorer:
<!--[If IE]>

The HTML will run if the browser is NOT Internet explorer:
<!--[if !IE]>-->

W3schools has an excellent css reference and this blog post explains and shows examples on conditional statements.

Technorati tags:
, , ,