Tuesday, 25 March 2008

Form formula with Dojo Dialog

It has been a while since Lotusphere, but today I put some functionality live that I had created after being stunned at Lotusphere by the session (BP212) that displayed some of the features in Dojo together with Notes/Domino. In fact Viktor Krantz had made a real effort in creating seperate javascript objects for Domino to show in his demos at BP212.

Putting this code live, reminded me that I wanted to write something about Dojo and the fact that for some reason the form formula is not working when opening a document using dojo dialog.

So returning from Lotusphere I started looking into Dojo and implemented the Dojo grid and Dojo dialog. As I wanted to have some handson with dojo, I did not re-use the Domino objects from BP212.
I made a grid working using the JSON setup Scott Good had shown in his ajax/json session (JMP205). This was actually the most work and required the most lines of javascript (mainly building the search url and the grid layout).

I then created a simple html form to open in a dojo dialog that will be triggered by clicking on a row on the dojo grid. All works fine, except the form specified in the form formula of the view that is used to retrieve the document does not seem to work. It uses the Notes version of the form instead of the specified web format.
I double checked twice and using the same "viewname/docid?OpenDocument" directly in the browser does open the specified web format as specified in the form formula.
Searching the web (LDD a.o.) did not give any clues into this problem having occurred before, nor did posting this problem on the LDD forum result in any answers.
So in the end I solved this problem by using computed subforms, one for the Notes client and one for the web
.

Has anyone else come accross this problem? Forget this, it does work, see the post on 26-03-2008.

For samples of code look at the Lotusphere session:
JMP205 AJAX and JSON for IBM Lotus Domino Applications (Scott Good)
BP212 The Great Code Giveaway: "Beyond Cool" (Rob Novak & Viktor Krantz)

No comments: