+

Search Tips   |   Advanced Search

DeployPortlet.xml

 

<?xml version="1.0" encoding="UTF-8"?>
<!--
 =================================================================
 * Licensed Materials - Property of IBM
 * (c) Copyright IBM Corp. 2003, 2006.  All rights reserved.
 *
 * US Government Users Restricted Rights - Use, duplication or
 * disclosure restricted by GSA ADP Schedule Contract with IBM
 * Corp.
 *
 * DISCLAIMER OF WARRANTIES.  The following [enclosed] code is
 * sample code created by IBM Corporation.  This sample code is
 * not part of any standard or IBM product and is provided to you
 * solely for the purpose of assisting you in the development of
 * your applications.  The code is provided "AS IS", without
 * warranty of any kind.  IBM shall not be liable for any damages
 * arising out of your use of the sample code, even if they have
 * been advised of the possibility of such damages.
 *
 =================================================================
-->

<request
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="PortalConfig_1.4.xsd"
    type="update"
    create-oids="true">

    <!-- Sample for deploying portlets (IBM portlet API and standard portlet) and creating a page with these portlets. -->
    <portal action="locate">

        <!-- Sample IBM portlet API portlet -->
        <!-- The uid must match uid attribute of portlet-app in portlet.xml. -->
        <web-app action="update" active="true" uid="com.ibm.wps.portlets.welcome">
           <url>file:///$server_root$/installableApps/WelcomePortlet.war</url>
           <!-- The uid must match uid attribute of concrete-portlet-app in portlet.xml. -->
           <portlet-app action="update" active="true" uid="com.ibm.wps.portlets.welcome.1">
              <!-- The name attribute must match content of portlet-name subtag  of concrete-portlet in portlet.xml. -->
              <portlet action="update" active="true" objectid="theIbmPortletApiPortlet" name="Welcome Portlet"/>
            </portlet-app>
        </web-app>

        <!-- Sample Standard Portlets -->
        <!-- uid attribute must match the uid attribute of the tag portlet-app subelement with a .webmod suffix. -->
        <web-app action="update" active="true" uid="selfcare.war.webmod">
           <url>file:///$server_root$/installableApps/selfcare.war</url>
           <!-- The referenceid attribute must match the portlet-name element from the portlet.xml appended with the .servlet suffix. -->
           <servlet action="update" active="true" objectid="myServlet" referenceid="Edit My Profile.servlet"/>
           <!-- The uid attribute must match the id attribute of the portlet-app element from the portlet.xml. 
                If this value has not been specified, specify the WAR file name of the portlet application in its place. 
                For portlet updates, the WAR file name must be the original name of the WAR file used to install the portlet application. 
                That is, the WAR file name can be changed, but the uid must indicate the original uid used during portlet installation. -->
           <portlet-app action="update" active="true" uid="selfcare.war">
           <!-- The name attribute must match the portlet-name element from the portlet.xml. -->
              <portlet action="update" active="true" objectid="theStandardPortlet" name="Edit My Profile" servletref="myServlet"/>
           </portlet-app>
        </web-app>

        <!-- Parent element under which the new page is inserted -->
        <content-node action="locate" objectid="parentPage" uniquename="ibm.portal.Home"/>

        <!-- The new page. 
             The contentparentref attribute must match the objectid of the parent. 
             Change the uniquename attribute to create another page. -->
        <content-node action="update" uniquename="ibm.portal.SamplePage"  ordinal="last" content-parentref="parentPage" active="true" allportletsallowed="false" create-type="explicit" type="page">
            <supported-markup markup="html" update="set"/>
            <localedata locale="en"><title>Sample Page</title></localedata>

            <component action="create" ordinal="100" type="container" orientation="H">
                <component action="create" ordinal="100" type="control">
                    <!-- The portletref must match the objectid attribute of the portlet -->
                    <portletinstance action="update" portletref="theIbmPortletApiPortlet"/>
                </component>
                <component action="create" ordinal="200" type="control">
                    <!-- The portletref must match the objectid attribute of the portlet -->
                    <portletinstance action="update" portletref="theStandardPortlet"/>
                </component>
            </component>
        </content-node>

    </portal>
</request>