UI Example LN application

Even though Notes 8.5.1 can be expected soon reality learns us however that a lot of users are still on versions 7 or even 6. Ofcourse you could use the limitations in the UI as an argument to force them to upgrade to newer versions of Notes, but then still a lot would run the basic client, not the standard one, so nice looking Java Views are still a long way to go.

I wrote before something about UI’s in Lotus Notes but now I was thinking about adding an example so those who are interested can test it and give feedback or use it for their projects. Whatever.

Here is the link to the download. Below you can find some snapshots of the UI:

Notes View used as horizontal menu
Notes View used as horizontal menu
Collapsible Vertical Menus
Collapsible Vertical Menus
Vertical Menu placed in preview pane
Vertical Menu placed in preview pane
Preview on bottom by default
Preview on bottom by default
Option to switch place for preview pane
Option to switch place for preview pane
Form example 1
Form example 1
Form example 2
Form example 2
Form example 3
Form example 3
Form example 4
Form example 4

Well hopefully one day we have a “CSS Zen Garden” equivalent somewhere one OpenNTF where people can post good UI examples. Further may we say:

with every Notes Client installation with a version of Notes 7 or older a kitten dies?

faster pussycat
faster pussycat

Mimicing the preview-switch option

I thought I give this Thursday a ‘SnTT’ swing (what happened with that phenomena?).

My collegue Tomas can be sometime tough with progressive ideas, but this makes you just try that extra effort to make something in Notes a little bit better than expected.

When I asked him for ideas for a standard development template he liked the ideas to have multiple collapsible preview panes BUT he wanted the option for the user to switch in preview in bottom or preview on side, just like in the Notes 8 mail template.

previewbutton

Since we know that the mail is a composite application with it specific functionality a different approach to provide something similar in the ‘classic’ client.

Solution

The following image shows the frameset for my application:

main_frameset2

So in frame ‘main’ I have a frameset. By default the frameset is the one that contains a preview on the bottom. This frameset is called ‘$fs-notes-documents-vr’ (vr for vertical). I have a second frameset that is called ‘$fs-notes-documents-hr’ (hr vor horizontal) that will be displayed in frame ‘main’ when the user chooses for a preview on side.

In my horizontal menu (alternative menu) I have added 2 action buttons:

  • Preview on Bottom.

@SetTargetFrame(“Main”);
@Command( [OpenFrameset] ; “$fs-notes-documents-vr” );
@Environment(“AppCode-AppPreview”;”$fs-notes-documents-vr”)

  • Preview on Side.

@SetTargetFrame(“Main”);
@Command( [OpenFrameset] ; “$fs-notes-documents-hr” );
@Environment(“AppCode-AppPreview”;”$fs-notes-documents-hr”)

These actions will place the appropiate frameset in frame ‘main’ and set an environment variable. This variable is being read when the ‘default’ frameset (the frameset that contains frame ‘main’) is being used when opening the application.

For frame ‘main’ I have as computed value:

varFrSetDefault:=@Environment( “AppCode-AppPreview” );
@If ( varFrmSetDefault = “” ; “$fs-notes-documents-vr” ; varFrmSetDefault)

So if the user has used the application before and has set a preview preference the next time the user comes in the application the ‘prefered’ frameset / preview option is being used!

Too bad there is no option to read which design element is currently used in a frame (like in a @GetTargetFrame). In that way I would have been able to re-open the currently opened view / folder (okej I could use another environment variable for that).

SetTargetFrame and getting the uidoc

For a new template I got inspired a bit by Chris Blatnick’s post on cascading menus and the left navigation pane in OpenTV’s template on OpenNTF. Take a look here:

my frameset
my frameset

The ‘problem’ that I am facing now is that I want frame A (the one with the cascading menu) talk with frame B (the one with the collapsible tables).

Opening a frame is not a problem with

Call ws.SetTargetFrame(“frameB”)

But is it possible to set a value in frameB from frameA? Frame B contains a form. Normally if you would click on an icon on the right you set a field and refresh the hidewhenformula’s:

 If uidoc.FieldGetText(“nav_option”) = “0” Then
  Call uidoc.FieldSetText(“nav_option”, “”)
  Call uidoc.Refresh
 Else
  Call uidoc.FieldSetText(“nav_option”,  “0”)
  Call uidoc.Refresh
 End If

I tried & searched the web and did not find a solution yet, basically this is how I would like to have my code look like:

Sub Click(Source As Button)
 Dim ws As New NotesUIWorkspace
 Dim session As New NotesSession
 Call ws.SetTargetFrame(“frameB”)
 Call ws.OpenFrameSet(“MenuFrame”) ‘<- frameset containing the form
 
 Dim uidoc As NotesUIDocument
 Set uidoc = ws.CurrentDocument ‘<- does not work uidoc is not recognized
 
 Call uidoc.GotoField( “nav_option” )
 Call uidoc.FieldSetText(“nav_option”,”1″)
 Call uidoc.Refresh

‘updating the right pane: 
 Call ws.SetTargetFrame(“NotesView”)
 Call uidb.OpenView(“Main Structure”)
End Sub

Anybody has a hint ???

Framesets (Notes client), a bug or maybe I am doing something wrong…?

I am experiencing a problem with setting up a Frameset to be used in the Notes client. Here is a simple graphic example how I have set it up:

my frameset
my frameset
In Frame C I am loading a Form that contains the same open and close tables that is used in the OpenTV project on OpenNTF. Each table in the left navigation can expand and collaps itself by an action hotspot with a following construction:
the hotspot and its formula
the hotspot and its formula

@If(nav_option=”0″;
 @Do(
  @SetField(“nav_option”;””);
  @PostedCommand([ViewRefreshFields])); 
 @Do(
  @SetField(“nav_option”;”0″);
  @PostedCommand([ViewRefreshFields]))
)

Based upon hide/when formulas the tables ‘mimics’ to be collapsed or expanded.

This works nice untill… I use in frame D a new Frameset and one of its Frames is a preview Frame. This preview Frame you get when you name it ‘NotesPreview’ and give it an URL as type (see image below).

the other frameset
the other frameset

Is this a known ‘bug’ ? Or am I doing something wrong? It seems like this preview Frame is ‘consuming‘ the actions that are being triggered when clicking on one of the action hotspots…

Thanks for your help/guidance!