XPages, displaying RichText fields from response docs in a repeat control

It’s pretty easy to create a doc collection for a repeat control to step through. Then in a table, you can easily tie data controls to each doc with a doc.getItemValueString(‘fieldname’) kind of approach.

However, this breaks down when you get to RichText as there’s no doc.getRichText kind of method out there.

So I’m searching for a pattern that will allow me to dynamically get RichText fields from documents and tie them to a RichText control.

Ideas (good/bad/indifferent) are welcome.

TIA

-Lance

Subject: @Abstract()

?

Subject: Rich text in repeat control

I’ve done this (sort of). When a rich text item is saved via Xpages, it seems to be saved as a MIME entity. To retrieve the valuse and display it as it was entered, I have used a computed text control with the syntax DATASOURCE.getDocument().getFirstItem(“richTextItem”).getMIMEEntityAsText()

Set the computed text type to ‘HTML’ and it seems to render OK in a repeat control. I’m still playing around with this :slight_smile: