<?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" transaction-level="request"> <!-- Sample to demonstrate the different transaction levels. This sample is very similar to CreatePage.xml; the difference is that the portlet is not deployed (update actions) but only found (locate action), and that there's a second page being created. The second page generates an error about the uniquename being used. With the transaction-level set to "request," none of the pages is being created, whereas transaction-level="resource" creates the first page. After running this sample with transaction-level="resource," it can be cleaned up with the DeletePage.xml sample. --> <portal action="locate"> <!-- skin for the portlet --> <skin action="locate" objectid="Shadow" uniquename="ibm.portal.skin.IBM"/> <!-- uid must match the uid attribute of portlet-app in portlet.xml --> <web-app action="locate" uid="com.ibm.wps.portlets.welcome"> <!-- uid must match uid attribute of concrete-portlet-app in portlet.xml --> <portlet-app action="locate" uid="com.ibm.wps.portlets.welcome.1"> <!-- name must match the content of portlet-name subtag of concrete-portlet in portlet.xml --> <portlet action="locate" objectid="thePortlet" name="Welcome Portlet"> </portlet> </portlet-app> </web-app> <!-- The parent element under which the new page is inserted. --> <content-node action="locate" objectid="parentPage" uniquename="ibm.portal.Home"/> <!-- Note that the preceding elements are needed because the XML request uses ID generating mode and the new page must refer to the portlet and the parent place, so the object IDs thePortlet and wps.content.root.My_Portal must be defined. If you use ID preserving mode and have the correct objectid values for these two resources, you do not need to locate them. --> <!-- The new page. contentparentref attribute must match the objectid of parent. Change the uniquename attribute to create another page. --> <content-node action="update" uniquename="ibm.portal.SamplePage.2" ordinal="last" content-parentref="parentPage" active="true" create-type="explicit" type="page"> <supported-markup markup="html" update="set"/> <!-- The title and description for the page are read from property files. The property keys must end with the strings title, description, and keywords. (Pages do not support keywords.) The prefix attribute specifies a string that is prepended to the property key so that you can keep titles for different resources in the same property file. --> <localedata locale="en" prefix="page.sample"> <url>file:///$server_root$/doc/xml-samples/pagetitles_en.properties</url> </localedata> <localedata locale="de" prefix="page.sample"> <url>file:///$server_root$/doc/xml-samples/pagetitles_de.properties</url> </localedata> <component action="create" ordinal="100" type="container" orientation="H"> <component action="create" ordinal="100" type="control" skinref="Shadow"> <!-- portletref must match the objectid attribute of the portlet --> <portletinstance action="update" portletref="thePortlet"/> </component> </component> </content-node> <!-- This is the second page that will generate the error as we set the uniquename to one that is already defined. --> <content-node action="update" uniquename="ibm.portal.SamplePage.2" ordinal="last" content-parentref="parentPage" active="true" create-type="explicit" type="page"> <supported-markup markup="html" update="set"/> <!-- The title and description for the page are read from property files. The property keys must end with the strings title, description, and keywords. (Pages do not support keywords.) The prefix attribute specifies a string that is prepended to the property key, so that you can keep titles for different resources in the same property file. --> <localedata locale="en"> <title>Page that should not appear</title> </localedata> <component action="create" ordinal="100" type="container" orientation="H"> <component action="create" ordinal="100" type="control" skinref="Shadow"> <!-- portletref must match the objectid attribute of the portlet --> <portletinstance action="update" portletref="thePortlet"/> </component> </component> </content-node> </portal> </request>