xpageshcl-notes

Storing and retreiving long strings in XPages


I want to work with long strings (size minimum: 100kb) on Xpages. I assume the best method to store a large string is in a data field of the type "Rich Text". Right now I am stuck with the data handing of this string. How can I transfer this string between server and client?

So far I tried:

So I was wondering whether I missed out on a configuration of my REST Service. Which other alternatives are available to transfer large data between client and server on Xpages?


Solution

  • I tested your scenario. doc.getItemValueString() only reads 64 KB of data from the rich text field. If you want all data you can use (in SSJS):

    var doc = database.getDocumentByUNID(id);
    var item:NotesRichTextItem = doc.getFirstItem('test');
    return item.getUnformattedText();
    

    Looks like that method return the exact text from the rich text item, no paragraph characters are inserted.