Note that there are some explanatory texts on larger screens.

plurals
  1. POHow can I prevent dojo javascript from being rendered from a custom control with rendered=false?
    primarykey
    data
    text
    <p>The title of this question may seem a bit confusing, but here is what is happening to me. </p> <p>First off, I am using Notes/Domino 8.5.3 with UP1. </p> <p>I have an Xpage with a edit mode custom control inside of it. Within the custom control are various elements using digit.forms. I have tried to set the custom control to be rendered only on edit mode, but even when it is in read mode certain dojo elements are STILL being rendered. To test this I even have set it to rendered=false for the control.</p> <pre><code>&lt;xc:ccEditDocument rendered="false"&gt;&lt;/xc:ccEditDocument&gt; </code></pre> <p>When I compare the source of the XPage with the custom control as rendered=false VS source of the XPage with NO custom control at all the following differences are encountered:</p> <pre><code>&lt;script type=”text/javascript” src=”/xsp/.ibmxspres/dojoroot-1.6.1/ibm/xsp/widget/layout/layers/xspClientDojoUI.js”&gt;&lt;/script&gt; &lt;script type=”text/javascript”&gt;dojo.require(’dijit.form.Form’)&lt;/script&gt; </code></pre> <p>and </p> <pre><code>enctype=”multipart/form-data” dojoType=”dijit.form.Form” </code></pre> <p>This is actually causing a problem for me with IE8 and iFRAME rendering of a PDF (it of course works in all other real browsers). </p> <p>Is there a way to TRULY have the custom control NOT render the dojo form elements?</p> <p>Thanks!</p> <p><strong>UPDATE</strong></p> <p>jjtbsomhorst had the fix! It was to add a conditional on the loaded property of the custom control. </p> <pre><code>&lt;xc:ccEditDocument rendered="#{javascript:document1.isEditable()}" loaded="${javascript:document1.isEditable()}"&gt; &lt;/xc:ccEditDocument&gt; </code></pre> <p>Thanks!!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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