Note that there are some explanatory texts on larger screens.

plurals
  1. POGetting properties/parameters from page level
    primarykey
    data
    text
    <p>I wonder if I can get the parameters and/or properties of an xpage or custom control programmatically.</p> <pre><code>&lt;xp:view xmlns:xp="http://www.ibm.com/xsp/core" id="layout"&gt; &lt;xp:this.properties&gt; &lt;xp:parameter name="testcc.xsp" value="Test 1"&gt;&lt;/xp:parameter&gt; &lt;xp:parameter name="index.xsp" value="Main"&gt;&lt;/xp:parameter&gt; &lt;/xp:this.properties&gt; ... </code></pre> <p>How can I access this parameter list to use it e.g. in a repeat control?</p> <p><strong>EDIT</strong> You both are right, thank you! But this works only on a page, not in a custom control.</p> <p><strong>EDIT</strong></p> <p>You both are great :-)</p> <p>BUT: I should revise my question: I have a custom control where I defined the properties. Within the SAMe custom control I want to access these properties in a repeat control.</p> <p>Both your answers seem to assume that the access to these properties is from the view (page) level, right?</p> <p>I tested Svens way - this works if I access the props in the CC from the page level.</p> <p><strong>EDIT</strong></p> <p>So this is the code of the CC:</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;xp:view xmlns:xp="http://www.ibm.com/xsp/core"&gt; &lt;xp:this.properties&gt; &lt;xp:parameter name="param" value="val"&gt;&lt;/xp:parameter&gt; &lt;/xp:this.properties&gt; &lt;xp:label value="#{javascript:facesContext.getProperty('param')}" id="label1"&gt; &lt;/xp:label&gt; &lt;/xp:view&gt; </code></pre> <p>As you can see I just want to access the property within the CC itselt, not from the page level.</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