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