« ILUG was a great event, and thanks to RIM for sponsoring | Main| Shared Contacts - Behind the scenes »

Domino views in the BlackBerry browser

Category
Bookmark : del.icio.us  Technorati  Digg This  Add To Furl  Add To YahooMyWeb  Add To Reddit  Add To NewsVine 


Hi, this is my first post on NotesBerry and its a technical tip I thought people might appreciate.

I get asked a lot about how to handle Notes views in the BlackBerry browser.

The problem is that the BlackBerry browser currently has trouble with embedded action hotspots on forms. This means that the next and previous links you put in your form, using @dbcommand( "Domino"; "ViewNextPage"), don't work.

I found that the best way to handle this is to code my own links using start and count url parameters.

For example, I have hidden fields on the form called Start and Count which are @TextToNumber(@UrlQueryString("start")) and @TextToNumber(@UrlQueryString("count")) respectively. I also have a hidden field called numdocs with this formula: @Elements(@DbColumn("":"NoCache";"";@Subset(@ViewTitle;1);1))

Then I can compute urls to put in passthru <a href> links like this:

For next -

newstart := start+count;
newstart1:=@If(newstart>numdocs;numdocs;newstart);
"/" + @WebDbName + "/" + @Subset(@ViewTitle;1) + "?openview&start=" + @Text(newstart1) + "&count=" + @Text(count)

For previous -

NewStart := start-count;
NewStart1 := @If(NewStart<1;1;NewStart);
"/" + @WebDbName + "/" + @Subset(@ViewTitle;1) + "?openview&start=" + @Text(NewStart1) + "&count=" + @Text(count)

Using this same basic idea you can build links to go to the top and bottom of a view, etc. The possibilities are endless

Thanks for listening.

Comments

Gravatar Image1 - Nice tip. Obviously it only works for flat views and not categorized ones.