Note that there are some explanatory texts on larger screens.

plurals
  1. POWhat are all the methods and properties of compositeData
    primarykey
    data
    text
    <p>Ran across an oddity that threw me for a loop. It seems "values" and "get" are a property and method for compositeData, wonder if there's a "set"?</p> <p>I added three Property Definitions to a Custom Control: 'header' &amp; 'menuEntries' (w\ allow mulitple checked) &amp; 'values' (w\ allow mulitple checked)</p> <p>I added values to 'header' and multiple entries for both 'menuEntries' and 'values' in the "Property Definition" tab of the XPage containing the Custom Control:</p> <pre><code>header = "aaa" menuEntries = "Main", "File", "Help" values = "z", "s" </code></pre> <p>Within the Custom Control I referenced the Property Definitions in the Custom Control by putting the header in a Computed Text using "compositeData.header", and the values is referenced in the Interation Data Binding of the repeat control as compositeData.values.</p> <p>When the XPage is displayed the location of the computed text for the header shows "This is the Header" just fine; however, where the repeat control shows its stuff the data shows is NOT the three "Main" &amp; "File" &amp; "Help" but rather only the names of the two Custom Properties namely header and values.</p> <p>In order to obtain the real data items IN compositeData.values,<br> I have to use compositeData.get("values"). Here's the Property Definitions and body of the Custom Control. Add the CC to an XPage and give the Custom Properties somem values and see if you see what I did,,,,</p> <p><img src="https://i.stack.imgur.com/tNeSR.jpg" alt="enter image description here"></p> <p>Custom Control Definitions</p> <p><img src="https://i.stack.imgur.com/pAmxX.jpg" alt="enter image description here"></p> <p>XPages Custom Properties</p> <pre><code>&lt;xp:panel style="border-color:blue solid thin;"&gt; &lt;xp:text id="cf3" value="#{javascript:compositeData.header}"&gt;&lt;/xp:text&gt; &lt;br /&gt;&lt;br /&gt; &lt;xp:repeat id="repeat1" rows="30" var="item" indexVar="itemIndex" value="#{javascript:compositeData.menuEntries}"&gt; &lt;xp:text id="cf2" value="#{javascript:item}"&gt;&lt;/xp:text&gt;&amp;#160; &lt;/xp:repeat&gt; &lt;br /&gt; &lt;xp:repeat id="repeat2" rows="30" var="item" indexVar="itemIndex" value="#{javascript:compositeData.values}"&gt; &lt;xp:text id="computedField5" value="#{javascript:item}"&gt;&lt;/xp:text&gt;&amp;#160; &lt;/xp:repeat&gt; &lt;br /&gt; &lt;xp:text id="cf4" value="#{javascript:compositeData.values}"&gt;&lt;/xp:text&gt; &lt;xp:text id="cf5"&gt;&lt;br /&gt;&lt;br /&gt; &lt;xp:this.value&gt;&lt;![CDATA[#{javascript:compositeData.get("values")}]]&gt;&lt;/xp:this.value&gt; </code></pre> <p> <strong>RESULTS</strong></p> <p><img src="https://i.stack.imgur.com/lAW6I.jpg" alt="enter image description here"></p>
    singulars
    1. This table or related slice is empty.
    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