Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to get Image uploading for Rich Text control within a repeat control to work
    text
    copied!<p>Using 8.5.3 UP1 with the Hotfix for the multi-rich text control issue.</p> <p>I am dynamically binding rich text controls that are within a custom control wrapped in a repeat control. The rich text controls render just fine, except that the image upload functionality does not work. If I click on the image upload, choose a file, and then click send to server, the image apparently never makes it there. </p> <p>Here is my code:</p> <p>The Repeat Control:</p> <pre><code>&lt;xp:repeat id="rptSections" rows="99" repeatControls="false" var="sections" indexVar="rptIndex" value="#{javascript:2}"&gt; &lt;xc:ccDynamicSections_2 rptIndex="#{javascript:rptIndex}"&gt; &lt;xc:this.fieldName&gt;&lt;![CDATA[#{javascript:"contentRT"+rptIndex}]]&gt;&lt;/xc:this.fieldName&gt; &lt;/xc:ccDynamicSections_2&gt; &lt;/xp:repeat&gt; </code></pre> <p>The custom control:</p> <pre><code>&lt;xp:inputRichText id="inputRichText1" value="#{document1[compositeData.fieldName]}" &gt; &lt;/xp:inputRichText&gt; </code></pre> <p>I'm pretty sure if I can find a way to bind the rich text controls at run time I can make this work. I tried to do this and it appears to work on the page but when I go to save the document I get a error such like "Could not save the document NEW_79 NotesException: Object has been removed or recycled"</p> <p>Bind after page load attempt:</p> <pre><code>&lt;xp:repeat id="rptSections" rows="99" repeatControls="false" var="sections" indexVar="rptIndex" value="#{javascript:2}"&gt; &lt;xp:text escape="true" id="computedField1"&gt; &lt;xp:this.value&gt;&lt;![CDATA[#{javascript:var application = facesContext.getApplication();var scopedField = 'content'+rptIndex;var valueBinding = application.createValueBinding( '#{document1.' + scopedField + '}');getComponent("inputRichText1").setValueBinding('value', valueBinding );"test"+rptIndex}]]&gt;&lt;/xp:this.value&gt; &lt;/xp:text&gt; &lt;xp:inputRichText id="inputRichText1"&gt;&lt;/xp:inputRichText&gt; &lt;/xp:repeat&gt; </code></pre> <p>Any help is appreciated.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload