QUINDIP: SOLVED!!! that damn DominoDocument IS a WILD AND MAGICAL thing!!!

Wow…

So here’s what I learned:

notes objects usually can’t be serialized. For some stupid reason I came accross the DominoDocument.wrap method and thought: let’s give it a try!! You bet: You create a “manual” DominoDocument with it and it can be serialized.

Exactly this technique now helps me to dynamically display RT fields (actually MIME entities to be correct so far, but I think it’ll work for RT as well) as tooltips:

Resulting code:

<xe:tooltip id=”tooltip4″ dynamicContent=”true” for=”someLabel”>
<xp:inputRichText id=”inputRichText1″
readonly=”true”>
<xp:this.value><![CDATA[#{javascript:doc = database.getDocumentByUNID(‘someUNIDToADocumentContainingTheBodyField’); 
dominoDoc = com.ibm.xsp.model.domino.wrapped.DominoDocument.wrap(null, doc, null, null, false, null, null);
dominoDoc.getValue(‘Body’)}]]></xp:this.value>
</xp:inputRichText>
</xe:tooltip>


Comments

  1. Also be sure that you're calling getValue() and setValue() against your DominoDocument instance instead of getItemValue() and replaceItemValue()… IBM put a massive amount of logic in place to make sure that it's more flexible about what data type the item value is than the original lotus.domino API.

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.