I am a Domino developer who is taking his first steps in XPages so please be patient with me. I have about 15 years development experience in LotusScript etc. Up until now I have only done Notes client development.
The application I am trying to add a couple of XPages to is a staff database. I download data from our AS/400 and our HR department then adds a photo of the staff member. I have a rich text lite field that contains the photo. I have setup the second tab on the field to be thumbnail and to resize on import to 240 x 274 pixels - I copied this from the personal names.nsf database. I would now like to display the staff document (name, telephone number, department and a photo) in xPages. I have everything working except the photo (it was really VERY simple :o). The xPages application part is only going to be used to VIEW the data, editing will be done in Notes.
I have tried the following:
1. add the photo into a RichTextItem and display the using the Rich Text core control - this works but I don't like it as the background is white and my page is blue. It just doesn't look very good. It also would require that all the photos be updated - HR will not be happy.
2. I found this code for a view column somewhere and tried to add it to a Rich Text control as well as an image control as a computed data value - I couldn't get it to work
var _docUNID = entry.getDocument().toString();
var _fp = database.getFilePath();
return '<img class="avatar" src="/' + _fp + '/0/' + _docUNID + '/$file/photo" />'
Does anybody have a solution for me?
Thanking you in advance