SNTT : Adding embedded Video to the Openntf Domino Wiki Template

I use the Domino Wiki template from OpenNTF for most of the projects that I work on. It has its quirks but it is none the less very useful.

We are launching a new XPages product and I wanted the relevant wiki to be a bit more engaging so I added a .swf ( Adobe Shock Wave ) feature that displays the video as an embedded object.
I guess this doesn’t work for iPads ??

Anyhow, it is very simple to do and the end result is a form that looks like this

Image:SNTT : Adding embedded Video to the Openntf Domino Wiki Template

and a wiki  page that looks like this (click here )

Image:SNTT : Adding embedded Video to the Openntf Domino Wiki Template

Step 1 : Add a new field to the underlying Notes form CONTENT NOTES

Image:SNTT : Adding embedded Video to the Openntf Domino Wiki Template

Step 2 : Add a computed field to the Custom Control prtContent

This field displays the html code for the video if the field above is populated.

Image:SNTT : Adding embedded Video to the Openntf Domino Wiki Template

The value of the field is calculated as shown below. The field is set to display as HTML ( see attached file also )

part6 = document1.getValue(“swffilename_tx”);
atturl = facesContext.getExternalContext().getRequest().getRequestURL().toString() + “/$file/”+part6;
“<object width=’550′ height=’400′><param name=’movie’ value='”+ atturl +”‘><embed src='”+atturl+”‘ width=’550′ height=’400’></embed></object>”

The visibility of the filed is calculated as

if(document1.isEditable()){return(false)};
var check1 =  document1.getValue(“swffilename_tx”);
if (check1 ==”” || check1 == null){return(false)}else{return(true)}

I’m not proud, any advice on coding gratefully received.

Step 3: Add a field to the XPages so that it can be edited in the browser

Image:SNTT : Adding embedded Video to the Openntf Domino Wiki Template

This is mapped to the field on the form in step 1. Also note that if you copy the the source for the row above the cells are hidden for some reason.

Thats it !

To use it attach a SWF file and enter the file name into the new field.

The result is like this => http://www.deliverytoolkit.com/Public/FDT/moc/mocwiki.nsf/dx/Overview_Screencast

I have attached the XPage source below. I would attach the whole database but it has been badly hacked about in other ways.

Sean

SNTT : Modifying an Xpage resource file via DXL without a temporary file

In Xpages resource files can be used to store settings. This is a great way of increasing the configurability of your application ( labels, keyword choices etc )  without having to carry the overhead of frequent look-ups to Notes configuration documents. This approach is a core part of the Steve Castledines OpenNTF Xpages Framework and has also been recommended by Matt White.

This article describes how to create a resource file via DXL using a stream so that an intermediate file on the hard drive is not needed. The code incorporates other code from Julian Robichaux for managing the Base64 encoding.

Entering the configuration

The application has a series of configuration documents. As each is saved in the UI it calls a back end LotusScript agent which creates a file resource. The Xpage application pulls the settings directly from this file resource rather than from the documents themselves.
The system does not attempt to update the file resource but creates a new one from scratch by cycling though the view and adding information for each record.

Image:SNTT : Modifying an Xpage resource file via DXL without a temporary file

The structure of the file resource

Image:SNTT : Modifying an Xpage resource file via DXL without a temporary file

Retrieving the settings

The settings can be retrieved using the code below, note that you also need to include the file as a resource bundle

Image:SNTT : Modifying an Xpage resource file via DXL without a temporary file

Image:SNTT : Modifying an Xpage resource file via DXL without a temporary file

The code to create the resource file

Image:SNTT : Modifying an Xpage resource file via DXL without a temporary file

The crux to creating the file resource is that it is in base64 so you will need to use some code originally developed by Julian Robichaux and published on OpenNTF
I have attached the whole script library at the end of the article. The entry point called by the agent is Sub s_CreateFileResourceFromView_6_01

Image:SNTT : Modifying an Xpage resource file via DXL without a temporary file

I have posted the code as an attachment. Apologies for not including a demo database but I would need to strip the functionality out of a commercial system. The attached code has plenty of commenting .

This article has also been posted on the IBM Developers Wiki

Balsamic Wire Mockups – a days work

I’ve been working on a concept for  new Notes application. I’ve used Balsamic  a few times before but this was the first time I have tried to sit down and flush out a scheme in a day.

The results are below, its obviously still at concept stage but a day with the client and a day with Balsamic has left me with something that I can use for a reality check with the client and then put a fixed price against. I find that the process of working through the screens gives me the discipline to look through the users eyes and see both what they need to capture but also what they need to contend with in terms of its usability. The usability will be key in this case because the business process is quite demanding.

It has felt like quite hard going at times, I wish Balsamic had the equivalent of subforms for some of the elements so that if they were changed in one place they would change everywhere – e.g. the navigation bar. Each mesh diagram is essentially a totally separate image so when you add an extra tab into one you need to go back and add it to the others. Having said that it will still be a lot easier to change it as a Balsamic than it would be with Notes and probably even more so if your were using another development platform .

Image:Balsamic Wire Mockups - a days work

Image:Balsamic Wire Mockups - a days work

Image:Balsamic Wire Mockups - a days work

Image:Balsamic Wire Mockups - a days work

Image:Balsamic Wire Mockups - a days work

Image:Balsamic Wire Mockups - a days workImage:Balsamic Wire Mockups - a days work

Image:Balsamic Wire Mockups - a days work

Image:Balsamic Wire Mockups - a days work

Image:Balsamic Wire Mockups - a days work