PT Portlet CCAPI Configuration

From ADF Docs
Revision as of 18:21, 7 September 2010 by Rkahn (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Back to Build Subsites, Templates and Pages

Overview

The Portlet Application uses the ADF CCAPI to populate portlet element records for pod instances, user pod data, pod configurations. The CCAPI needs to be configured for the site and portlet application.

First, follow the steps to set up the CCAPI Config file for the site. Once that configuration is complete, follow the steps below to set up the CCAPI config for the Portlet application. Make sure to update the wsVars section with the correct URLs and username/password.

Setup

  1. Create a new page called 'ccapiPortlet'. It is recommended to create this page in the /webadmin/portlet/ subsite.
  2. Add each of the following Portlet App Elements to the page:
    1. PortletPodInstances
    2. PortletPodUserData
  3. For each element that was added, click on the element indicator and go to 'more...'. Select 'Name' from the menu.
  4. In the Element Name field, enter the appropriate name for each element:
    1. ccapiPortletPodInstance
    2. ccapiPortletPodUserData
  5. Create a new page called 'ccapiPods'. It is recommended to create this page in the /webadmin/portlet/ subsite.
  6. Add each of the following Pod Types to the page:
    1. Links
    2. RSS_Feeds
    3. Simple_Content
    4. Weather
    5. Custom_File
  7. For each element that was added, click on the element indicator and go to 'more...'. Select 'Name' from the menu.
  8. In the Element Name field, enter the appropriate name for each element:
    1. ccapiPodTypeCustomFile
    2. ccapiPodTypeWeather
    3. ccapiPodTypeSimpleContent
    4. ccapiPodTypeRSSFeed
    5. ccapiPodTypeLinks
  9. Publish the pages and view in read mode.
  10. Edit the 'ccapi.cfm' (or ccapi.xml) file for the site and add the following xml blocks into the <elements> section:
    1. an example 'ccapi.cfm' file is in the pt_portlet > site-files > _cs_apps > config folder
    <elements>
        <PortletPodInstance>
           <pageID>####</pageID>
           <subsiteID>##</subsiteID>
           <elementType>custom</elementType>
           <controlName>ccapiPortletPodInstance</controlName>
       	</PortletPodInstance>
	<PortletPodUserData>
           <pageID>####</pageID>
           <subsiteID>##</subsiteID>
           <elementType>custom</elementType>
           <controlName>ccapiPortletPodUserData</controlName>
       	</PortletPodUserData>
	<Custom_File>
           <pageID>####</pageID>
           <subsiteID>##</subsiteID>
           <elementType>custom</elementType>
           <controlName>ccapiPodTypeCustomFile</controlName>
       	</Custom_File>
	<Weather>
           <pageID>####</pageID>
           <subsiteID>##</subsiteID>
           <elementType>custom</elementType>
           <controlName>ccapiPodTypeWeather</controlName>
       	</Weather>
	<Simple_Content>
           <pageID>####</pageID>
           <subsiteID>##</subsiteID>
           <elementType>custom</elementType>
           <controlName>ccapiPodTypeSimpleContent</controlName>
       	</Simple_Content>
	<RSS_Feed>
           <pageID>####</pageID>
           <subsiteID>##</subsiteID>
           <elementType>custom</elementType>
           <controlName>ccapiPodTypeRSSFeed</controlName>
       	</RSS_Feed>
	<Links>
           <pageID>####</pageID>
           <subsiteID>##</subsiteID>
           <elementType>custom</elementType>
           <controlName>ccapiPodTypeLinks</controlName>
       	</Links>
   </elements>

To find the values to populate the <pageID> and <subsiteID> child nodes of the <PortletPodInstance> and <PortletPodUserData> node, view the 'source' code for the 'ccapiPortlet' page that was just created. Find the 'jsSubsiteID' and the 'jsPageID' values then replace the hash (#) marks in the <pageID> and <subsiteID> nodes with the values found in the 'ccapiPortlet' page 'source' code.

Identify the following line in the source code and enter this numeric value into the <subsiteID> tag:

     var jsSubSiteID = ##;

Identify the following line in the source code and enter this numeric value into the <pageID> tag:

     var jsPageID = ####;

Repeat this process for the <Custom_File>,<Weather>,<Simple_Content>,<RSS_Feed>.and <Links> nodes on the 'ccapiPods' page.

Each element that has been added to either page should be represented in in the XML nodes of the 'ccapi.cfm' file with the correct <pageID>, <subsiteID> and <controlName>.

Reset the ADF for the server and site.