For our iPhora applications we only use one XPage and dynamically create the content that appears. We do this by storing the dynamic content in Notes Rich Text fields and using SSJS to read and generate the HTML/JavaScript during runtime.
Since we are moving to an single page MVC model, we were adding a few addition xp:scriptBlock to generate the initial loader and pulling the information from a NotesRichText field. We were using doc.getFirstValueString('richtextfield') to pull and create the script. No problem until, we had a JavaScript object declaration that was longer than 72 odd characters.
Unfortunately, there is an issue with Notes Rich Text fields that we encountered in the past using LotusScript that I forgot all about. When you read a Notes Rich Text field it will automatically add a carriage return after 72 characters and this can drive you crazy. If the carriage return occurs between a JavaScript object declaration then you will get an JavaScript error.
To resolve this you need to switch to doc.getFirstItem("richtextfield").getUnformattedText() to read it. The automatic carriage return that Domino/Notes pulls in is filtered out, but the carriage returns that you put in remains.
My personal stuff and my interest in Business Processes Automation and Management, Data Security, No-code/Low-code and User Experience.
Subscribe to:
Post Comments (Atom)
CollabSphere 2022 Presentation: COL103 Advanced Automation and Cloud Service Integration for your Notes/Nomad Applications
Our presentation for CollabSphere 2022. Learn how to quickly add workflow automation into Notes/Nomad applications using No-code tools that ...
-
Creating Twitter Bootstrap Widgets - Part I - Anatomy of a Widget Creating Twitter Bootstrap Widgets - Part II - Let's Assemble Creat...
-
Over the past few weeks there has been a significant number of discussions about Domino and the lack of SHA-2 support. Jesse Gallagher had ...
-
As often said by Dr. McCoy in the original Star Trek series, he is a doctor, not a ____________ . However, just like Dr. McCoy, you may ...
1 comment:
There are options:
- you could go an store your content into a MIME entry and read that -> the content could have any form.
- you could use an attachment you generated
- use a bean with a cache instead of a pure script block. There you could do the filtering
Post a Comment