0

I have been following Yannick Ongena's tutorial http://yonaweb.be/webcenter_tutorial/using_content_presenter_templates

I am looking to alter some code in the content presenter template "training-list-item.jsff" so that the region definition will have a dynamic value. That is, rather than writing

<af:outputText value="#{node.propertyMap['RD_TRAINING:description'].asTextHtml}"
         escape="false" id="ot5"/>

I am looking to write like

<af:outputText value="#{node.propertyMap['xRegionDefinition:description'].asTextHtml}"
         escape="false" id="ot5"/>

Unfortunately, this does not work. If I write only "xRegionDefinition" within the propertyMap,it displays the region definition name in the portal, that is "RD_TRAINING". But I am looking to display the value of element definition within the region that is, the "description". My objective is to display different region definitions at the portal rather than a hard coded fixed region. I have wrote some Java code also to dynamically change the CMIS query to supply a new value for the region definition:

    if(news){
        query = "SELECT * FROM ora:t:IDC:GlobalProfile WHERE ora:p:xRegionDefinition LIKE \'RD_TRAINING\'";
    }
    else
        query = "SELECT * FROM ora:t:IDC:GlobalProfile WHERE ora:p:xRegionDefinition LIKE \'RD_SWEDISH\'";

Please help. Hope I am clear in explaining the requirement.

1 Answers1

0

Why don't you use ADF Switcher component if you only have 2 options!

Check this video to know how to use it

Amr Gawish
  • 2,015
  • 1
  • 17
  • 29