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



Nov 16, 2013, 4:06 PM
4 Posts

Fail to create an empty richtext field in xpage

  • Category: Other
  • Platform: Windows
  • Release: 8.5.3
  • Role: Developer
  • Tags: richtext,xpage
  • Replies: 1

Hi,

I have created a xpage for users to create document.  What I am trying to do is to create an empty richtext field in the document for further use (hide from the users).  However, when I set the style of the field (or table row) to display:none, the field is not created after saving the document.  Could someone help?  thanks in advanced!

Wanfai

Nov 18, 2013, 9:41 AM
30 Posts
Hmm

display:none property makes your code behind that element not to execute. You can put code to write your rich text field in a server side javascript (on button click perhaps).

Your code for writing it down would be something like this:

 

var logDoc:NotesDocument = document1.getDocument(); //presuming document1 is the name of your datasource for form to which you want to save

var rtitem:NotesRichTextItem = logDoc.createRichTextItem("LogDocInfo"); //LogDocInfo is name of the RT field on your form

     rtitem.appendText("Server: ");
     rtitem.appendText(session.getUserName());
     rtitem.addNewLine(1);
     rtitem.appendText("Database:  ");
     rtitem.appendText(database.getFilePath());
     rtitem.addNewLine(1);

// append more stuff per your needs

 

logDoc.save(true, true);


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