I've got a XPage containing a Rich Text Field. In this Rich Text Field is some Text, formatted with HTML. As long as I don't change anything, it is very easy to get the content using
docMail.getItemValue("dBody")[0].toString()
The content of the document looks like this:
As soon as I change anything of the Text, the content will be saved as MIME and my code doesn't work anymore, because when I want to get the Value of dBody, it's empty. The content looks like this:
So it's MIME Part now. But how do I get the HTML Code? I just want the HTML Code and send it via Mail.
docMail
refers to a document data source (not a "back end" document), callgetValue
instead ofgetItemValue
. Otherwise, use the wrapper function mentioned on the question Per included to get the document as a data source... and then callgetValue
instead ofgetItemValue
. :) – Tim Tripcony