The Right Notes

Contributing development ideas to the Lotus Domino community

Archive for May 3rd, 2007

SNTT: Computing Frame Contents

Posted by therightnotes on May 3, 2007

Frames on the web are out of style, but they are invaluable in Notes programming.  We tend to use a frameset with a single frame for our web applications because of the flexibility it gives us.  One of the things it allows us to do is load different content into the frame in different situations.

In my previous post, I talked about how easy it is to make a database accessible to a BlackBerry.  One of the things we wanted to do, though, is to differentiate what a BlackBerry user sees on first opening the database vs. what someone sees using a browser.  To do this, we computed the content to load into the frame depending on the value returned by @useragent.  So I went into our Frameset and got the frame properties dialog box up.  On the Basics tab, next to the Content Value textbox, I click the @ button to calculate the content.  A dialog box like the following appears:Computing Frame Contents

This dialog box allows you to compute 3 things:

  1. the type of element (in this case, a view for a BlackBerry and a form otherwise);
  2. the database where the element can be found (blank means the current database);
  3. the identity of the element (the view name and form name to correspond to #1).

The power of this feature is limited only by what you can do inside an @if statement.

Posted in Blackberry, Domino, Lotus, Lotus Notes, Lotusnotes, Show-n-Tell Thursday, SnTT, formula language, web programming | Leave a Comment »