How to Display Site Studio Static List Elements in a Content Presenter Display Template? (Doc ID 1368860.1)

Last updated on OCTOBER 13, 2015

Applies to:

Oracle WebCenter Portal - Version 11.1.1.4.0 and later
Information in this document applies to any platform.

Goal

How to access the values of the static list from the Content Presenter template.

Steps To Reproduce:

1.  There is a Static List-type element (c_static_paragraphs_ed.xml), which contains a set of simple elements:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<elementDefinition xmlns="http://www.oracle.com/sitestudio/Element/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.oracle.com/sitestudio/Element/ http://www.oracle.com/sitestudio/ss_element_definition.xsd">
    <elements>
        <elementReference name="Title" location="R_PLAINTEXT_ED">
            <property value="Paragraph Title" name="label"/>
            <property value="" name="description"/>
        </elementReference>
        <elementReference name="Description" location="FREE_TEXT_ED">
            <property value="Description" name="label"/>
            <property value="" name="description"/>
        </elementReference>
        ...
    </elements>
    ...
</elementDefinition>


2.  Reference this static list from their region definition (article_rgd.xml):

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<regionDefinition xmlns="http://www.oracle.com/sitestudio/Element/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.oracle.com/sitestudio/Element/ http://www.oracle.com/sitestudio/ss_element_definition.xsd">
    <elements>
    ...
        <elementReference name="Paragraphs" location="C_STATIC_PARAGRAPHS_ED">
            <property value="List of Complex Paragraphs" name="label"/>
            <property value="" name="description"/>
        </elementReference>
    </elements>
    ...
</regionDefinition>


3.  Finally, In the Content Presenter display template reference the static list with the following code, but it just returns some java code in the HTML runtime:

            <!-- ############## Oracle Support Request ################## -->   
            <!-- ######################################################## -->
            <!-- ### The elements of the Static List are not Available### -->
            <!-- ######################################################## -->
            
               <af:forEach var="elt" items="#{node.propertyMap['ARTICLE_RGD:Paragraphs'].values}">
                <af:outputText value="#{elt.class}"/>
                </af:forEach>


In Runtime the following steps are performed:

1. Edit the page.
2. Add a Content Presenter task flow.
3. Create a new content with the relevant region definition.
4. In UCM, they locate the ID of the new content.
5. Look up the content element with the help of the ID.
6. Apply the Content Presenter template.

Notice that the elements of the static list is not displayed, instead it shows some java code.

Solution

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms