This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



Feb 2, 2013, 12:15 PM
35 Posts

Preview updated RichTextItem into Xpages computed field

  • Category: Other
  • Platform: Windows
  • Release: 8.5.3
  • Role: End user,Developer,Administrator
  • Tags:
  • Replies: 3
 Hello Forum,

I'm looking for a way to retrieve a NotesRichTextItem from a document, updating some RT content and preview it into a Xpage computed field.

My code:
// Retrieve my Template RichTextItem from my template Document
var vw:NotesView = database.getView('(vwTemplate)');
var userDoc:NotesDocument = vw.getDocumentByKey('MyTemplate', true);
var rtTemplate:NotesRichTextItem = userDoc.getFirstItem('Template');
 
// Update text contained into my template
var rtRange:NotesRichTextRange = rtTemplate.createRange();
rtRange.findandReplace('varUserName', @Name('[CN]',varUserName));

// I'm now looking for a way to preview my update template RT into a computed field, but it's not working... Xpage ERROR.
getComponent("cfTemplatePreview").setValue(rtTemplate);
 
With rtTemplate.getText() I'm able to preview the text contained into my RT Item, but without formatting and I'm missing the pictures contained into my template RT Item.
 
Does anybody have an idea? 
 
Thx in advance for your help, 
 
Chris
Feb 3, 2013, 6:52 PM
50 Posts
Re: Preview updated RichTextItem into Xpages computed field
 I don't think you are able to display Rich Text in a computed field. Try using a RT Field instead and check the property to make it read only.
Feb 3, 2013, 10:16 PM
35 Posts
Re: Preview updated RichTextItem into Xpages computed field
Thx Rod,
 
But even with a RT component I was unable to show the content... If you have any idea how to do, I would appreciate. 
 
Regards, 
 
Chris 
Feb 18, 2013, 9:08 PM
35 Posts
Re: Preview updated RichTextItem into Xpages computed field
 Hi Forum,
 
Does anybody have an idea how to help me out? 
 
Thx in advance. 
 
Chris 

This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal