JavaViews in your own applications
The R8 inbox, calendar and contacts take full advantage of the new Java views. However support for your application has been postponed to the NMFR*. Memento bene: "support for". That doesn't mean that you can't do it. After all the mailbox is just a Notes application. The biggest challenge: in the normal Designer there seems to be no way to specify the additional properties for the Java views like side preview or the business card view. Actually there is. In the R8 reviewers guide on page 155 (that would be PDF page 163) a new notes.ini parameter is documented:
Add this parameter to your local notes.ini and designer will reveal new properties in views (the (i) tab in the view and the propeller head tab for a view column). The redpaper also mentions what you can do with this. One interesting piece: Currently we have a viewer type: "Table" and one "Tiled". You can specify both and you will get a switcher (like in contacts). The API will be documented, so you could render your very own views (Pivot anybody?). However if you add all this properties nothing happens. A few pieces are missing (and since it is not automatic, there's no support yet). Again the redpaper helps: on page 146 (PDF 158) there is a note, that reminds you that you can link a frameset to a composite. So what you need to do for your JavaView enabled views is to use a composite application. That is actually nice, since you have full backward compatibility: Prior to R8 the frameset opens. In R8 the composite opens.
These are the steps you need to take:
Save everything, close the CAE and here you go.
*Next Mayor Feature Release
Designer_ShowPropForJavaViewsUI=1
Add this parameter to your local notes.ini and designer will reveal new properties in views (the (i) tab in the view and the propeller head tab for a view column). The redpaper also mentions what you can do with this. One interesting piece: Currently we have a viewer type: "Table" and one "Tiled". You can specify both and you will get a switcher (like in contacts). The API will be documented, so you could render your very own views (Pivot anybody?). However if you add all this properties nothing happens. A few pieces are missing (and since it is not automatic, there's no support yet). Again the redpaper helps: on page 146 (PDF 158) there is a note, that reminds you that you can link a frameset to a composite. So what you need to do for your JavaView enabled views is to use a composite application. That is actually nice, since you have full backward compatibility: Prior to R8 the frameset opens. In R8 the composite opens.
These are the steps you need to take:
- Create an empty composite application in your database
- Open the frameset and link the composite in (Don't worry about the "Blank Page", we can take care of that later)
- Edit your view and view column properties in Designer. I won't detail that here, you find all this information in the redpaper. To get the Javaview going this step anyway is optional. Just keep in mind: Split buttons are only available in shared actions (for now?).
- Set the frameset as your start frame when opening the application. Close the database in designer. Switch to the R8 client and open your application
- An empty composite application will show up. Use Actions - Edit Application to switch to the Composite Application Editor (CAE).
- Drag 2 components on your page: the Notes Mail Navigator and the Notes Mail View
The Notes Mail Navigator and the Inbox will show up. That is OK for the moment!. - Go to the advanced properties of the components (you need to do this for both components)
The advanced properties look like this:
We are interested in thecom.ibm.rcpcsiviews.viewpart.dburl
. The value is actually a Notes URL pointing to a frameset in the Mail database. between notes:/// and /MailFS is a ReplicaID. There are a number of reserved numbers, that don't point to a physical database but a logical. E00 stands for current user's mail file. 0 stands for current database (You need to pad the number with left zeros to full lenght). So replace E00 with 000 and MailFS with the name of your Frameset. Do the same with the Viewpart. In the viewpart you will actually find another interesting property to experiment with:com.ibm.rcp.csiviews.viewpart.threadurl
. It allows you to implement your own version of threading, something to experiment with.
Save everything, close the CAE and here you go.
*Next Mayor Feature Release
Posted by Stephan H Wissel on 01 January 2008 | Comments (4) | categories: Show-N-Tell Thursday