svn commit: r730665 - in /ofbiz/trunk/framework: common/data/ common/entitydef/ common/script/org/ofbiz/common/ common/servicedef/ common/webcommon/WEB-INF/ common/webcommon/WEB-INF/actions/includes/ common/webcommon/portal/ common/widget/ example/widg...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r730665 - in /ofbiz/trunk/framework: common/data/ common/entitydef/ common/script/org/ofbiz/common/ common/servicedef/ common/webcommon/WEB-INF/ common/webcommon/WEB-INF/actions/includes/ common/webcommon/portal/ common/widget/ example/widg...

hansbak-2
Author: hansbak
Date: Thu Jan  1 19:35:41 2009
New Revision: 730665

URL: http://svn.apache.org/viewvc?rev=730665&view=rev
Log:
major cleanup of of the portalpages, files split between display and configure, user can now create/update a copy of the system pages and revert back, example component working now....next week we will do the portal component.

Added:
    ofbiz/trunk/framework/common/webcommon/WEB-INF/actions/includes/ListPortalPages.groovy   (with props)
    ofbiz/trunk/framework/common/webcommon/WEB-INF/actions/includes/ShowPortalPage.groovy   (with props)
    ofbiz/trunk/framework/common/webcommon/portal/editPortalPage.ftl
      - copied, changed from r730502, ofbiz/trunk/framework/common/webcommon/portal/portalPage.ftl
    ofbiz/trunk/framework/common/webcommon/portal/showPortalPage.ftl   (with props)
Removed:
    ofbiz/trunk/framework/common/webcommon/portal/portalPage.ftl
Modified:
    ofbiz/trunk/framework/common/data/PortalDemoData.xml
    ofbiz/trunk/framework/common/entitydef/entitymodel.xml
    ofbiz/trunk/framework/common/script/org/ofbiz/common/PortalPageMethods.xml
    ofbiz/trunk/framework/common/script/org/ofbiz/common/PortalPageServices.xml
    ofbiz/trunk/framework/common/servicedef/services.xml
    ofbiz/trunk/framework/common/webcommon/WEB-INF/portal-controller.xml
    ofbiz/trunk/framework/common/webcommon/portal/appheader.ftl
    ofbiz/trunk/framework/common/webcommon/portal/listPortalPortlets.ftl
    ofbiz/trunk/framework/common/webcommon/portal/portalPageHeader.ftl
    ofbiz/trunk/framework/common/widget/PortalPageForms.xml
    ofbiz/trunk/framework/common/widget/PortalPageScreens.xml
    ofbiz/trunk/framework/example/widget/example/CommonScreens.xml

Modified: ofbiz/trunk/framework/common/data/PortalDemoData.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/data/PortalDemoData.xml?rev=730665&r1=730664&r2=730665&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/data/PortalDemoData.xml (original)
+++ ofbiz/trunk/framework/common/data/PortalDemoData.xml Thu Jan  1 19:35:41 2009
@@ -20,9 +20,9 @@
 
 <entity-engine-xml>
     <!-- PortalPortlet Demo Data -->
-    <PortalPage portalPageId="DEFAULT" portalName="Default home Portal Page" description="The default OFBiz portal page" ownerUserLoginId="_NA_" originalPortalPageId="EXAMPLE"/>
-    <PortalPageColumn portalPageId="DEFAULT" columnSeqId="01" columnWidthPixels="200"/>
-    <PortalPageColumn portalPageId="DEFAULT" columnSeqId="02"/><!-- no width in pixels or percent, use the rest of the space available -->
+    <PortalPage portalPageId="EXAMPLE" portalPageName="Example Portal Page" description="The default example OFBiz portal page" ownerUserLoginId="_NA_"/>
+    <PortalPageColumn portalPageId="EXAMPLE" columnSeqId="00001" columnWidthPercentage="50"/>
+    <PortalPageColumn portalPageId="EXAMPLE" columnSeqId="00002"/><!-- no width in pixels or percent, use the rest of the space available -->
     
     <PortalPortlet portalPortletId="WELCOME" portletName="Welcome" description="OFBiz Welcome Message"
         screenName="welcomePortlet" screenLocation="component://common/widget/PortletScreens.xml"/>
@@ -30,6 +30,6 @@
         screenName="loginPortlet"       screenLocation="component://common/widget/PortletScreens.xml"
         editFormName="LoginPortletEdit" editFormLocation="component://common/widget/PortletEditForms.xml"/>
 
-    <PortalPagePortlet portalPageId="DEFAULT" portalPortletId="WELCOME" portletSeqId="1" columnSeqId="01" sequenceNum="1"/>
-    <PortalPagePortlet portalPageId="DEFAULT" portalPortletId="LOGIN"   portletSeqId="1" columnSeqId="02" sequenceNum="1"/>
+    <PortalPagePortlet portalPageId="EXAMPLE" portalPortletId="WELCOME" portletSeqId="1" columnSeqId="00001" sequenceNum="1"/>
+    <PortalPagePortlet portalPageId="EXAMPLE" portalPortletId="LOGIN"   portletSeqId="1" columnSeqId="00002" sequenceNum="1"/>
 </entity-engine-xml>

Modified: ofbiz/trunk/framework/common/entitydef/entitymodel.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/entitydef/entitymodel.xml?rev=730665&r1=730664&r2=730665&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/entitydef/entitymodel.xml (original)
+++ ofbiz/trunk/framework/common/entitydef/entitymodel.xml Thu Jan  1 19:35:41 2009
@@ -573,14 +573,27 @@
     </entity>
     <entity entity-name="PortalPage" package-name="org.ofbiz.common.portal" title="Defines a Portal Page">
         <field name="portalPageId" type="id-ne"></field>
-        <field name="portalName" type="name"></field>
+        <field name="portalPageName" type="name"></field>
         <field name="description" type="description"></field>
         <field name="ownerUserLoginId" type="id"></field>
-        <field name="originalPortalPageId" type="id"></field>
+        <field name="originalPortalPageId" type="id"><description>The system portal page this page is derived from</description></field>
+        <field name="parentPortalPageId" type="id"><description>the parent this page is belonging to, normally the startpage of the portal page group</description></field>
         <field name="sequenceNum" type="numeric"></field>
         <prim-key field="portalPageId"/>
+        <relation type="one" fk-name="PortPage_PARENT" title="Parent" rel-entity-name="PortalPage">
+          <key-map field-name="parentPortalPageId" rel-field-name="portalPageId"/>
+        </relation>
     </entity>
-    <entity entity-name="PortalPageColumn" package-name="org.ofbiz.common.portal" title="Defines a Portal Page">
+  <view-entity entity-name="PortalPageAndChildren" package-name="org.ofbiz.common.portal" title="Defines a Portal Page and children">
+      <member-entity entity-alias="PP" entity-name="PortalPage"/>
+      <member-entity entity-alias="PPP" entity-name="PortalPage"/>
+      <alias-all entity-alias="PP"/>
+      <alias-all entity-alias="PPP" prefix="p"/>
+      <view-link entity-alias="PP" rel-entity-alias="PPP" rel-optional="true">
+        <key-map field-name="parentPortalPageId" rel-field-name="portalPageId"/>
+      </view-link>
+    </view-entity>
+  <entity entity-name="PortalPageColumn" package-name="org.ofbiz.common.portal" title="Defines a Portal Page">
         <field name="portalPageId" type="id-ne"></field>
         <field name="columnSeqId" type="id-ne"></field>
         <field name="columnWidthPixels" type="numeric"></field>

Modified: ofbiz/trunk/framework/common/script/org/ofbiz/common/PortalPageMethods.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/script/org/ofbiz/common/PortalPageMethods.xml?rev=730665&r1=730664&r2=730665&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/script/org/ofbiz/common/PortalPageMethods.xml (original)
+++ ofbiz/trunk/framework/common/script/org/ofbiz/common/PortalPageMethods.xml Thu Jan  1 19:35:41 2009
@@ -22,25 +22,25 @@
         xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/simple-methods.xsd">
 
     <simple-method method-name="getPortletAttributes" short-description="Get Portlet Attribute Values">
-        <call-object-method obj-field-name="request" method-name="getAttribute" ret-field-name="portalPageId"><string value="portalPageId"/></call-object-method>
-        <call-object-method obj-field-name="request" method-name="getAttribute" ret-field-name="portalPortletId"><string value="portalPortletId"/></call-object-method>
-        <call-object-method obj-field-name="request" method-name="getAttribute" ret-field-name="portletSeqId"><string value="portletSeqId"/></call-object-method>
-        <entity-condition entity-name="PortletAttribute" list-name="portletAttributeList">
+        <call-object-method obj-field="request" method-name="getAttribute" ret-field="portalPageId"><string value="portalPageId"/></call-object-method>
+        <call-object-method obj-field="request" method-name="getAttribute" ret-field="portalPortletId"><string value="portalPortletId"/></call-object-method>
+        <call-object-method obj-field="request" method-name="getAttribute" ret-field="portletSeqId"><string value="portletSeqId"/></call-object-method>
+        <entity-condition entity-name="PortletAttribute" list="portletAttributeList">
             <condition-list combine="and">
-                <condition-expr field-name="portalPageId" env-name="portalPageId"/>
-                <condition-expr field-name="portalPortletId" env-name="portalPortletId"/>
-                <condition-expr field-name="portletSeqId" env-name="portletSeqId"/>
+                <condition-expr field-name="portalPageId" from-field="portalPageId"/>
+                <condition-expr field-name="portalPortletId" from-field="portalPortletId"/>
+                <condition-expr field-name="portletSeqId" from-field="portletSeqId"/>
             </condition-list>
         </entity-condition>
         <log level="info" message="portletAttributeList: ${portletAttributeList}"/>
-        <iterate entry-name="portletAttributeList" list-name="portletAttribute">
+        <iterate entry="portletAttributeList" list="portletAttribute">
             <set field="context.${portletAttribute.attrName}" from-field="portletAttribute.attrValue"/>
         </iterate>
     </simple-method>
     
     <simple-method method-name="setPortalPortletAttributes" short-description="Sets a PortalPortlet attributes">
         <if-not-empty field="parameters">
-            <iterate-map map-name="parameters" key-name="attributeKey" value-name="attributeValue">
+            <iterate-map map="parameters" key="attributeKey" value="attributeValue">
                 <if-not-empty field="attributeKey">
                     <if>
                         <condition>
@@ -51,16 +51,16 @@
                             </and>
                         </condition>
                         <then>
-                            <clear-field field-name="attributeEntityMap"/>
-                            <set-service-fields service-name="createPortletAttribute" to-map-name="attributeEntityMap" map-name="parameters"/>
+                            <clear-field field="attributeEntityMap"/>
+                            <set-service-fields service-name="createPortletAttribute" to-map="attributeEntityMap" map="parameters"/>
                             <set field="attributeEntityMap.attrName"  from-field="attributeKey"/>
                             <set field="attributeEntityMap.attrValue" from-field="attributeValue"/>
                             
-                            <entity-one entity-name="PortletAttribute" value-name="attributeItem">
-                                <field-map field-name="attrName" env-name="attributeEntityMap.attrName"/>
+                            <entity-one entity-name="PortletAttribute" value-field="attributeItem">
+                                <field-map field-name="attrName" from-field="attributeEntityMap.attrName"/>
                             </entity-one>
                             <if-not-empty field="attributeItem">
-                                <remove-value value-name="attributeItem"/>
+                                <remove-value value-field="attributeItem"/>
                             </if-not-empty>
 
                             <call-service in-map-name="attributeEntityMap" service-name="createPortletAttribute"/>
@@ -72,69 +72,52 @@
     </simple-method>
     
     <!--Create simple-method of copyOriginalPage-->
-    <simple-method method-name="copyOriginalPage" short-description="">
-        <set field="originalPortalPageId"  from-field="parameters.originalPortalPageId"/>
-        <set field="mainPortalPageId" from-field="parameters.mainPortalPageId"/>
-        <set field="ownerUserLoginId" from-field="parameters.ownerUserLoginId"/>        
-        
-        <if-compare field="ownerUserLoginId" value="_NA_" operator="equals">
-            <entity-and entity-name="PortalPage" list-name="getMainPage">
-                <field-map field-name="originalPortalPageId" env-name="mainPortalPageId"/>
-                <field-map field-name="ownerUserLoginId" env-name="userLogin.userLoginId"/>
+    <simple-method method-name="copyIfRequiredSystemPage" short-description="Check if the page is a system page, then copy before allowing the user to copy it">
+        <entity-one entity-name="PortalPage" value-field="portalPage"/>
+        <if-compare field="portalPage.ownerUserLoginId" value="_NA_" operator="equals">
+            <!-- check if private page already created -->
+            <entity-and entity-name="PortalPage" list="getPrivatePages">
+                <field-map field-name="originalPortalPageId" from-field="parameters.portalPageId"/>
+                <field-map field-name="ownerUserLoginId" from-field="userLogin.userLoginId"/>
             </entity-and>
-            
-            <if-empty field="getMainPage">
-                <entity-and entity-name="PortalPage" use-cache="true" list-name="getNA">
-                    <field-map field-name="ownerUserLoginId" value="_NA_"/>
-                    <field-map field-name="originalPortalPageId" env-name="originalPortalPageId"/>
+            <if-empty field="getPrivatePages">
+                
+                <!-- copy the portal page -->
+                <set-service-fields service-name="createPortalPage" map="portalPage" to-map="createPage"/>
+                <clear-field field="createPage.portalPageId"/>
+                <set field="createPage.ownerUserLoginId" from-field="userLogin.userLoginId"/>
+                <set field="createPage.originalPortalPageId" from-field="parameters.portalPageId"/>
+                <call-service service-name="createPortalPage" in-map-name="createPage">
+                    <result-to-field result-name="portalPageId"/>
+                </call-service>
+                <field-to-request field="portalPageId" request-name="portalPageId"/>
+                
+                <!-- copy portlets -->  
+                <entity-and entity-name="PortalPagePortlet" list="portalPagePortlets">
+                    <field-map field-name="portalPageId" from-field="parameters.portalPageId"/>
                 </entity-and>
-                <first-from-list entry-name="getNA" list-name="getNA"/>
-                <make-value entity-name="PortalPage" value-name="getPortalPageAll" map-name="test"/>
-                <set field="test.portalName" from-field="getNA.portalName"/>
-                <set field="test.description" from-field="getNA.description"/>
-                <set field="test.ownerUserLoginId" from-field="userLogin.userLoginId"/>
-                <set field="test.originalPortalPageId" from-field="mainPortalPageId"/>
-                <set-pk-fields map-name="test" value-name="getPortalPageAll"/>
-                <make-next-seq-id value-name="getPortalPageAll" seq-field-name="portalPageId"/>
-                <set-nonpk-fields map-name="test" value-name="getPortalPageAll"/>
-                <create-value value-name="getPortalPageAll"/>
-                <set field="portalPageId" from-field="getPortalPageAll.portalPageId"/>
-                <field-to-request field-name="portalPageId" request-name="portalPageId"/>
+                <iterate entry="portalPagePortlet" list="portalPagePortlets">
+                    <set-service-fields service-name="createPortalPagePortlet" map="portalPagePortlet" to-map="createPortLet"/>
+                    <set field="createPortLet.portalPageId" from-field="portalPageId" />
+                    <call-service service-name="createPortalPagePortlet" in-map-name="createPortLet"/>
+                </iterate>
                 
-                <entity-and entity-name="PortalPageColumn" use-cache="true"
-                    list-name="portalPageColumnList">
-                    <field-map field-name="portalPageId" env-name="getNA.portalPageId"/>
+                <!-- delete the columns -->
+                <set field="delMap.portalPageId" from-field="portalPageId"/>
+                <remove-by-and entity-name="PortalPageColumn" map="delMap"/>
+
+                <!-- copy columns -->
+                <entity-and entity-name="PortalPageColumn" use-cache="true" list="portalPageColumns">
+                    <field-map field-name="portalPageId" from-field="parameters.portalPageId"/>
                 </entity-and>
-                <iterate entry-name="portalPageColumnList" list-name="portalPageColumnList">
-                    <make-value entity-name="PortalPageColumn" value-name="PortalPageColumn"
-                        map-name="column"/>
-                    <set field="column.portalPageId" from-field="getPortalPageAll.portalPageId"/>
-                    <set field="column.columnSeqId" from-field="portalPageColumnList.columnSeqId"/>
-                    <set-pk-fields map-name="column" value-name="PortalPageColumn"/>
-                    <set-nonpk-fields map-name="column" value-name="PortalPageColumn"/>
-                    <create-value value-name="PortalPageColumn"/>
-                    
-                    <entity-and entity-name="PortalPagePortlet" use-cache="true"
-                        list-name="PortalPagePortlet">
-                        <field-map field-name="portalPageId" env-name="getNA.portalPageId"/>
-                        <field-map field-name="columnSeqId" env-name="PortalPageColumn.columnSeqId"/>
-                    </entity-and>
-                    <iterate entry-name="PortalPagePortlet" list-name="PortalPagePortlet">
-                        <make-value entity-name="PortalPagePortlet" value-name="PortletView"
-                            map-name="portlet"/>
-                        <set field="portlet.portalPageId" from-field="PortalPageColumn.portalPageId"/>
-                        <set field="portlet.portalPortletId"
-                            from-field="PortalPagePortlet.portalPortletId"/>
-                        <set field="portlet.columnSeqId" from-field="PortalPageColumn.columnSeqId"/>
-                        <set field="portlet.portletSeqId"
-                            from-field="PortalPagePortlet.portletSeqId"/>
-                        <set field="portlet.sequenceNum" from-field="PortalPagePortlet.sequenceNum"/>
-                        
-                        <set-pk-fields map-name="portlet" value-name="PortletView"/>
-                        <set-nonpk-fields map-name="portlet" value-name="PortletView"/>
-                        <create-value value-name="PortletView"/>
-                    </iterate>
+                <set field="first" value="true" type="Boolean"/>
+                <iterate entry="portalPageColumn" list="portalPageColumns">
+                    <set-service-fields service-name="addPortalPageColumn" map="portalPageColumn" to-map="addColumnMap"/>
+                    <clear-field field="addColumnMap.columnSeqId"/>
+                    <set field="addColumnMap.portalPageId" from-field="portalPageId" />
+                    <call-service service-name="addPortalPageColumn" in-map-name="addColumnMap"/>
                 </iterate>
+                
             </if-empty>
         </if-compare>
     </simple-method>    

Modified: ofbiz/trunk/framework/common/script/org/ofbiz/common/PortalPageServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/script/org/ofbiz/common/PortalPageServices.xml?rev=730665&r1=730664&r2=730665&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/script/org/ofbiz/common/PortalPageServices.xml (original)
+++ ofbiz/trunk/framework/common/script/org/ofbiz/common/PortalPageServices.xml Thu Jan  1 19:35:41 2009
@@ -41,7 +41,9 @@
     <simple-method method-name="addPortalPageColumn" short-description="Add a new Column to a PortalPage">
         <make-value entity-name="PortalPageColumn" value-field="newEntity"/>
         <set-pk-fields map="parameters" value-field="newEntity"/>
-        <make-next-seq-id value-field="newEntity" seq-field-name="columnSeqId"/>
+        <if-empty field="parameters.columnSeqId">
+            <make-next-seq-id value-field="newEntity" seq-field-name="columnSeqId"/>
+        </if-empty>
         <field-to-result field="newEntity.columnSeqId" result-name="columnSeqId"/>
         <set-nonpk-fields map="parameters" value-field="newEntity"/>
         <create-value value-field="newEntity"/>  
@@ -107,78 +109,29 @@
     <simple-method method-name="createPortalPage" short-description="Create a new Portal Page">
         <make-value entity-name="PortalPage" value-field="newPortalPage"/>
         <set-pk-fields map="parameters" value-field="newPortalPage"/>
-        <make-next-seq-id value-field="newPortalPage" seq-field-name="portalPageId"/>
-
+        <if-empty field="newPortalPage.portalPageId">
+            <make-next-seq-id value-field="newPortalPage" seq-field-name="portalPageId"/>
+        </if-empty>
         <set-nonpk-fields map="parameters" value-field="newPortalPage"/>
+        <set field="newPortalPage.ownerUserLoginId" from-field="parameters.userLogin.userLoginId"/>
         <create-value value-field="newPortalPage"/>  
 
-        <make-value entity-name="PortalPageColumn" value-field="newPortalPageColumn"/>
         <set field="newPortalPageColumn.portalPageId" from-field="newPortalPage.portalPageId"/>
-        <set field="newPortalPageColumn.columnSeqId"  value="1"/>
-        <create-value value-field="newPortalPageColumn"/>
+        <call-service service-name="addPortalPageColumn" in-map-name="newPortalPageColumn"/>
 
         <field-to-result field="newPortalPage.portalPageId" result-name="portalPageId"/>
     </simple-method>
     
     <simple-method method-name="deletePortalPage" short-description="Delete a Portal Page">
-        <if-compare field="parameters.portalPageId" value="MYPORTAL" operator="not-equals">
-            <if-compare field="parameters.portalPageId" value="DEFAULT" operator="not-equals">
-                <entity-one entity-name="PortalPage" value-field="portalPage" auto-field-map="true" use-cache="true"/>
-        
-                <if-not-empty field="portalPage">
-                    <entity-and entity-name="PortalPageColumn" list="portalPageColumnList">
-                        <field-map field-name="portalPageId" from-field="portalPage.portalPageId"/>
-                    </entity-and>
-            
-                    <iterate list="portalPageColumnList" entry="portalPageColumn">
-                        <set-service-fields service-name="deletePortalPageColumn" to-map="deletePortalPageColumnInMap" map="portalPageColumn"/>
-                        <call-service service-name="deletePortalPageColumn" in-map-name="deletePortalPageColumnInMap"/>
-                    </iterate>
-            
-                    <remove-value value-field="portalPage"/>
-                </if-not-empty>
-                </if-compare>
-        </if-compare>
+        <entity-one entity-name="PortalPage" value-field="portalPage"/>
+        <if-not-empty field="portalPage">
+            <if-compare field="portalPage.ownerUserLoginId" value="_NA_" operator="not-equals">
+                <remove-related value-field="portalPage" relation-name="PortalPageColumn"/>
+                <remove-related value-field="portalPage" relation-name="PortalPagePortlet"/>
+                <remove-value value-field="portalPage"/>
+            </if-compare>
+        </if-not-empty>
+
     </simple-method>
-    
-    <!--Create simple-method of getListPreferences-->
-    <simple-method method-name="getListPreferences" short-description="">
-        <set field="mainPortalPageId" from-field="parameters.mainPortalPageId"/>
-        
-        <entity-and entity-name="PortalPage" list="getMainPage">
-            <field-map field-name="originalPortalPageId" from-field="mainPortalPageId"/>
-            <field-map field-name="ownerUserLoginId" from-field="userLogin.userLoginId"/>
-        </entity-and>
-        
-        <if-empty field="getMainPage">
-            <entity-condition entity-name="PortalPage" list="PortalPageList">
-                <condition-list combine="and">
-                    <condition-list combine="or">
-                        <condition-expr field-name="originalPortalPageId" operator="equals" from-field="parameters.originalPortalPageId"/>
-                    </condition-list>
-                    <condition-list combine="or">
-                        <condition-expr field-name="ownerUserLoginId" operator="equals" from-field="userLogin.userLoginId"/>
-                        <condition-expr field-name="ownerUserLoginId" operator="equals" value="_NA_"/>
-                    </condition-list>
-                </condition-list>
-                <order-by field-name="createdStamp"/>
-            </entity-condition>
-        </if-empty>
-        <if-not-empty field="getMainPage">
-            <entity-condition entity-name="PortalPage" list="PortalPageList">
-                <condition-list combine="and">
-                    <condition-list combine="or">
-                        <condition-expr field-name="originalPortalPageId" operator="equals" from-field="parameters.originalPortalPageId"/>
-                        <condition-expr field-name="originalPortalPageId" operator="equals" from-field="mainPortalPageId"/>
-                    </condition-list>
-                    <condition-list combine="or">
-                        <condition-expr field-name="ownerUserLoginId" operator="equals" from-field="userLogin.userLoginId"/>
-                    </condition-list>
-                </condition-list>
-                <order-by field-name="createdStamp"/>
-            </entity-condition>
-        </if-not-empty>
-        <list-to-list list="PortalPageList" to-list="result"/>
-        <field-to-result field="result" result-name="listIt"/>
-    </simple-method>  
+
 </simple-methods>

Modified: ofbiz/trunk/framework/common/servicedef/services.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/servicedef/services.xml?rev=730665&r1=730664&r2=730665&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/servicedef/services.xml (original)
+++ ofbiz/trunk/framework/common/servicedef/services.xml Thu Jan  1 19:35:41 2009
@@ -607,19 +607,18 @@
     <service name="createPortalPage" default-entity-name="PortalPage" engine="simple" auth="true"
         location="org/ofbiz/common/PortalPageServices.xml" invoke="createPortalPage">
         <description>Create a new Portal Page</description>
-        <auto-attributes include="pk" mode="OUT" optional="false"/>
+        <auto-attributes include="pk" mode="INOUT" optional="true"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
     </service>
     <service name="updatePortalPage" default-entity-name="PortalPage" engine="entity-auto" invoke="update" auth="true">
         <description>Update a Portal Page</description>
-        <auto-attributes include="pk" mode="IN" optional="false"/>
+        <auto-attributes include="pk" mode="INOUT" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
     </service>
     <service name="deletePortalPage" default-entity-name="PortalPage" engine="simple" auth="true"
         location="org/ofbiz/common/PortalPageServices.xml" invoke="deletePortalPage">
-        <description>Delete a Portal Page</description>
+        <description>Delete a Portal Page, related colums and used portlets</description>
         <auto-attributes include="pk" mode="IN" optional="false"/>
-        <auto-attributes include="nonpk" mode="IN" optional="true"/>
     </service>
 
     <!-- PortalPageColumn services -->
@@ -628,7 +627,7 @@
         <description>Add a new Column to a PortalPage</description>
         <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
-        <override name="columnSeqId" mode="OUT" optional="true"/>
+        <override name="columnSeqId" mode="INOUT" optional="true"/>
     </service>
     <service name="updatePortalPageColumn" default-entity-name="PortalPageColumn" engine="entity-auto" invoke="update" auth="true">
         <description>Update a Portal Page Column</description>
@@ -655,13 +654,4 @@
         <attribute name="portletSeqId" type="String" mode="IN" optional="false"/>
         <attribute name="attributeMap" type="Map" mode="OUT" optional="true"/>
     </service>
-    
-    <!-- GetListPreferences services -->
-    <service name="getListPreferences" engine="simple" auth="true"
-        location="org/ofbiz/common/PortalPageServices.xml" invoke="getListPreferences">
-        <description>GetListPreferences</description>
-        <attribute name="originalPortalPageId" type="String" mode="IN" optional="false"/>
-        <attribute name="mainPortalPageId" type="String" mode="IN" optional="false"/>
-        <attribute name="listIt" type="List" mode="OUT" optional="true"/>
-    </service>
 </services>

Added: ofbiz/trunk/framework/common/webcommon/WEB-INF/actions/includes/ListPortalPages.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/webcommon/WEB-INF/actions/includes/ListPortalPages.groovy?rev=730665&view=auto
==============================================================================
--- ofbiz/trunk/framework/common/webcommon/WEB-INF/actions/includes/ListPortalPages.groovy (added)
+++ ofbiz/trunk/framework/common/webcommon/WEB-INF/actions/includes/ListPortalPages.groovy Thu Jan  1 19:35:41 2009
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.ofbiz.entity.*;
+import org.ofbiz.base.util.*;
+import org.ofbiz.entity.condition.*;
+
+ppCond =
+    EntityCondition.makeCondition([
+                                   EntityCondition.makeCondition([
+                                                                  EntityCondition.makeCondition("parentPortalPageId", EntityOperator.EQUALS, parameters.parentPortalPageId),
+                                                                  EntityCondition.makeCondition("portalPageId", EntityOperator.EQUALS, parameters.parentPortalPageId),
+                                                                  EntityCondition.makeCondition("originalPortalPageId", EntityOperator.EQUALS, parameters.parentPortalPageId)
+                                                                  ],EntityOperator.OR),
+                                   EntityCondition.makeCondition([
+                                                                  EntityCondition.makeCondition("ownerUserLoginId", EntityOperator.EQUALS, parameters.userLogin.userLoginId),
+                                                                  EntityCondition.makeCondition("ownerUserLoginId", EntityOperator.EQUALS, "_NA_")
+                                                                  ],EntityOperator.OR),
+                                   ],EntityOperator.AND);
+sortField = parameters.sortField;
+if (UtilValidate.isEmpty(sortField)) {
+ sortField = "portalPageName";
+}
+orderBy = [sortField];
+portalPages = delegator.findList("PortalPage", ppCond, null, orderBy, null, false);
+// remove overridden system pages
+portalPages.each { portalPage ->
+ if (portalPage.ownerUserLoginId.equals("_NA_")) {
+ userPortalPages = delegator.findByAnd("PortalPage", [originalPortalPageId : portalPage.portalPageId, ownerUserLoginId : parameters.userLogin.userLoginId]);
+ if (userPortalPages) {
+ portalPages.remove(portalPage);
+ }
+ }
+}
+
+context.portalPages = portalPages;
+

Propchange: ofbiz/trunk/framework/common/webcommon/WEB-INF/actions/includes/ListPortalPages.groovy
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/framework/common/webcommon/WEB-INF/actions/includes/ListPortalPages.groovy
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/trunk/framework/common/webcommon/WEB-INF/actions/includes/ListPortalPages.groovy
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: ofbiz/trunk/framework/common/webcommon/WEB-INF/actions/includes/ShowPortalPage.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/webcommon/WEB-INF/actions/includes/ShowPortalPage.groovy?rev=730665&view=auto
==============================================================================
--- ofbiz/trunk/framework/common/webcommon/WEB-INF/actions/includes/ShowPortalPage.groovy (added)
+++ ofbiz/trunk/framework/common/webcommon/WEB-INF/actions/includes/ShowPortalPage.groovy Thu Jan  1 19:35:41 2009
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.ofbiz.entity.*;
+import org.ofbiz.base.util.*;
+import org.ofbiz.entity.condition.*;
+
+portalPage = delegator.findByPrimaryKey("PortalPage", [portalPageId : parameters.portalPageId]);
+// check if the user created a private page for a system page
+if (portalPage.ownerUserLoginId.equals("_NA_")) {
+ portalPages = delegator.findByAnd("PortalPage", [originalPortalPageId : parameters.portalPageId, ownerUserLoginId : parameters.userLogin.userLoginId]);
+ if (UtilValidate.isNotEmpty(portalPages)) {
+ portalPage = portalPages.get(0);
+ }
+}
+parameters.portalPageId = portalPage.portalPageId;
+context.portalPage = portalPage;
+context.portalPageColumns = portalPage.getRelated("PortalPageColumn");
+context.portalPagePortlets = delegator.findByAnd("PortalPagePortletView", [portalPageId : portalPage.portalPageId]);
+

Propchange: ofbiz/trunk/framework/common/webcommon/WEB-INF/actions/includes/ShowPortalPage.groovy
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/framework/common/webcommon/WEB-INF/actions/includes/ShowPortalPage.groovy
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/trunk/framework/common/webcommon/WEB-INF/actions/includes/ShowPortalPage.groovy
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: ofbiz/trunk/framework/common/webcommon/WEB-INF/portal-controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/webcommon/WEB-INF/portal-controller.xml?rev=730665&r1=730664&r2=730665&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/webcommon/WEB-INF/portal-controller.xml (original)
+++ ofbiz/trunk/framework/common/webcommon/WEB-INF/portal-controller.xml Thu Jan  1 19:35:41 2009
@@ -24,10 +24,14 @@
     <owner>Copyright 2001-2008 The Apache Software Foundation</owner>
 
     <!-- Portal requests -->
-    <request-map uri="dashboard">
+    <request-map uri="showPortalPage">
         <security https="true" auth="true"/>
-        <event  type="simple" invoke="copyOriginalPage" path="org/ofbiz/common/PortalPageMethods.xml"/>
-        <response name="success" type="view" value="dashboard"/>
+        <response name="success" type="view" value="showPortalPage"/>
+    </request-map>
+    <request-map uri="editPortalPage">
+        <security https="true" auth="true"/>
+        <event  type="simple" invoke="copyIfRequiredSystemPage" path="org/ofbiz/common/PortalPageMethods.xml"/>
+        <response name="success" type="view" value="editPortalPage"/>
     </request-map>
     <request-map uri="ManagePortalPages">
         <security https="true" auth="true"/>
@@ -45,26 +49,26 @@
     <request-map uri="createPortalPagePortlet">
         <security https="true" auth="true"/>
         <event type="service" invoke="createPortalPagePortlet"/>
-        <response name="success" type="request" value="dashboard"/>
-        <response name="error" type="request" value="dashboard"/>
+        <response name="success" type="request" value="editPortalPage"/>
+        <response name="error" type="request" value="editPortalPage"/>
     </request-map>
     <request-map uri="updatePortalPagePortlet">
         <security https="true" auth="true"/>
         <event type="service" invoke="updatePortalPagePortlet"/>
-        <response name="success" type="request" value="dashboard"/>
-        <response name="error" type="request" value="dashboard"/>
+        <response name="success" type="request" value="editPortalPage"/>
+        <response name="error" type="request" value="editPortalPage"/>
     </request-map>
     <request-map uri="deletePortalPagePortlet">
         <security https="true" auth="true"/>
         <event type="service" invoke="deletePortalPagePortlet"/>
-        <response name="success" type="request" value="dashboard"/>
-        <response name="error" type="request" value="dashboard"/>
+        <response name="success" type="request" value="editPortalPage"/>
+        <response name="error" type="request" value="editPortalPage"/>
     </request-map>
     <request-map uri="movePortletToPortalPage">
         <security https="true" auth="true"/>
         <event type="service" invoke="movePortletToPortalPage"/>
-        <response name="success" type="request" value="dashboard"/>
-        <response name="error" type="request" value="dashboard"/>
+        <response name="success" type="request" value="editPortalPage"/>
+        <response name="error" type="request" value="editPortalPage"/>
     </request-map>
     <request-map uri="createPortalPage">
         <security https="true" auth="true"/>
@@ -93,24 +97,25 @@
     <request-map uri="addPortalPageColumn">
         <security https="true" auth="true"/>
         <event type="service" invoke="addPortalPageColumn"/>
-        <response name="success" type="request" value="dashboard"/>
-        <response name="error" type="request" value="dashboard"/>
+        <response name="success" type="request" value="editPortalPage"/>
+        <response name="error" type="request" value="editPortalPage"/>
     </request-map>
     <request-map uri="updatePortalPageColumn">
         <security https="true" auth="true"/>
         <event type="service" invoke="updatePortalPageColumn"/>
-        <response name="success" type="request" value="dashboard"/>
-        <response name="error" type="request" value="dashboard"/>
+        <response name="success" type="request" value="editPortalPage"/>
+        <response name="error" type="request" value="editPortalPage"/>
     </request-map>
     <request-map uri="deletePortalPageColumn">
         <security https="true" auth="true"/>
         <event type="service" invoke="deletePortalPageColumn"/>
-        <response name="success" type="request" value="dashboard"/>
-        <response name="error" type="request" value="dashboard"/>
+        <response name="success" type="request" value="editPortalPage"/>
+        <response name="error" type="request" value="editPortalPage"/>
     </request-map>
 
     <!-- View Mappings -->
-    <view-map name="dashboard" type="screen" page="component://common/widget/PortalPageScreens.xml#dashboard"/>
+    <view-map name="showPortalPage" type="screen" page="component://common/widget/PortalPageScreens.xml#showPortalPage"/>
+    <view-map name="editPortalPage" type="screen" page="component://common/widget/PortalPageScreens.xml#editPortalPage"/>
     <view-map name="ManagePortalPages" type="screen" page="component://common/widget/PortalPageScreens.xml#ManagePortalPages"/>
     <view-map name="AddPortlet" type="screen" page="component://common/widget/PortalPageScreens.xml#AddPortlet"/>
     <view-map name="EditPortlet" type="screen" page="component://common/widget/PortalPageScreens.xml#EditPortlet"/>

Modified: ofbiz/trunk/framework/common/webcommon/portal/appheader.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/webcommon/portal/appheader.ftl?rev=730665&r1=730664&r2=730665&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/webcommon/portal/appheader.ftl (original)
+++ ofbiz/trunk/framework/common/webcommon/portal/appheader.ftl Thu Jan  1 19:35:41 2009
@@ -26,23 +26,13 @@
         <li <#if selected = "${uiLabelMap.ExampleFeature}"> class="selected"</#if>><a href="<@ofbizUrl>FindExampleFeature?portalPageId=${uiLabelMap.ExampleFeature}</@ofbizUrl>">${uiLabelMap.ExampleFeature}</a></li>
         <li <#if selected = "${uiLabelMap.ExampleFormWidgetExamples}"> class="selected"</#if>><a href="<@ofbizUrl>FormWidgetExamples?portalPageId=${uiLabelMap.ExampleFormWidgetExamples}</@ofbizUrl>">${uiLabelMap.ExampleFormWidgetExamples}</a></li>
         <li <#if selected = "${uiLabelMap.ExampleAjaxExamples}"> class="selected"</#if>><a href="<@ofbizUrl>authview/findExampleAjax?portalPageId=${uiLabelMap.ExampleAjaxExamples}</@ofbizUrl>">${uiLabelMap.ExampleAjaxExamples}</a></li>        
-        <#if getMainPage?has_content>
-        <#list getMainPage as page>
-           <li<#if selected = "${page.portalPageId}"> class="selected"</#if>><a href="<@ofbizUrl>dashboardExample?portalPageId=${page.portalPageId}</@ofbizUrl>">${page.portalName}</a></li>
-         </#list>
-     <#else>
-     <#list getNA as page>
-           <li<#if selected = "${page.portalPageId}"> class="selected"</#if>><a href="<@ofbizUrl>dashboardExample?portalPageId=${page.portalPageId}</@ofbizUrl>">${page.portalName}</a></li>
-         </#list>
-     </#if>      
-        <#if pages?has_content>
-         <#list pages as page>
-             <li<#if selected = "${page.portalPageId}"> class="selected"</#if>><a href="<@ofbizUrl>dashboardExample?portalPageId=${page.portalPageId}</@ofbizUrl>">${page.portalName}</a></li>
+        <#if portalPages?has_content>
+         <#list portalPages as page>
+             <li<#if selected = "${page.portalPageId}"> class="selected"</#if>><a href="<@ofbizUrl>showPortalPage?portalPageId=${page.portalPageId}</@ofbizUrl>">${page.portalPageName}</a></li>
          </#list>
         </#if>
         <li class="opposed"><a href="<@ofbizUrl>logout</@ofbizUrl>">${uiLabelMap.CommonLogout}</a></li>
-        <#--li class="opposed"><a href="http://docs.ofbiz.org/display/OFBENDUSER/My+Page?decorator=printable" target="_blank">${uiLabelMap.CommonHelp}</a></li>-->
-        <li class="opposed"><a href="<@ofbizUrl>ManagePortalPages?originalPortalPageId=${originalPortalPageId}&amp;mainPortalPageId=MAINEXAMPLE</@ofbizUrl>">${uiLabelMap.CommonDashboard}</a></li>
+        <li class="opposed"><a href="<@ofbizUrl>ManagePortalPages?parentPortalPageId=EXAMPLE</@ofbizUrl>">${uiLabelMap.CommonDashboard}</a></li>
     <#else>
         <li class="opposed"><a href="<@ofbizUrl>${checkLoginUrl?if_exists}</@ofbizUrl>">${uiLabelMap.CommonLogin}</a></li>
     </#if>

Copied: ofbiz/trunk/framework/common/webcommon/portal/editPortalPage.ftl (from r730502, ofbiz/trunk/framework/common/webcommon/portal/portalPage.ftl)
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/webcommon/portal/editPortalPage.ftl?p2=ofbiz/trunk/framework/common/webcommon/portal/editPortalPage.ftl&p1=ofbiz/trunk/framework/common/webcommon/portal/portalPage.ftl&r1=730502&r2=730665&rev=730665&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/webcommon/portal/portalPage.ftl (original)
+++ ofbiz/trunk/framework/common/webcommon/portal/editPortalPage.ftl Thu Jan  1 19:35:41 2009
@@ -16,43 +16,43 @@
 specific language governing permissions and limitations
 under the License.
 -->
-
-<#if currentPortalPage?has_content>
-    <#if configurePortalPage?has_content>
- <div id="manage-portal-toolbar">
+<#if portalPage?has_content>
+<div id="manage-portal-toolbar">
+              <div class="portlet-config">
+              <div class="portlet-config-title-bar">
    <ul>
-       <li id="add-column">
-         <a href="<@ofbizUrl>addPortalPageColumn?portalPageId=${currentPortalPage.portalPageId}&configurePortalPage=true&originalPortalPageId=${parameters.originalPortalPageId}&mainPortalPageId=${parameters.mainPortalPageId}</@ofbizUrl>" class="buttontext">${uiLabelMap.CommonAddColumn}</a>
-       </li>
+            <li class="title">PortalPage : ${portalPage.portalPageName} [${portalPage.portalPageId}]</li>
+   <li id="add-column">
+ <a href="<@ofbizUrl>addPortalPageColumn?portalPageId=${portalPage.portalPageId}&parentPortalPageId=${parentPortalPageId}</@ofbizUrl>" class="buttontext">${uiLabelMap.CommonAddColumn}</a>
+   </li>
    </ul>
+   </div></div>
    <br class="clear"/>
- </div>
-    </#if>
+</div>
 <table width="100%">
-  <#if configurePortalPage?has_content>
     <tr>
       <#list portalPageColumnList?if_exists as portalPageColumn>
         <td class="manage-portal-column-toolbar" style="vertical-align: top; <#if portalPageColumn.columnWidthPercentage?has_content> ${uiLabelMap.CommonWidth}:${portalPageColumn.columnWidthPercentage}%;</#if>">
           <ul>
             <li id="delete-column">
-              <a href="<@ofbizUrl>deletePortalPageColumn?portalPageId=${currentPortalPage.portalPageId}&columnSeqId=${portalPageColumn.columnSeqId}&configurePortalPage=true&originalPortalPageId=${parameters.originalPortalPageId}&mainPortalPageId=${parameters.mainPortalPageId}</@ofbizUrl>" class="buttontext">${uiLabelMap.CommonDelete}</a>
+              <a href="<@ofbizUrl>deletePortalPageColumn?portalPageId=${portalPage.portalPageId}&columnSeqId=${portalPageColumn.columnSeqId}&parentPortalPageId=${parentPortalPageId}</@ofbizUrl>" class="buttontext">${uiLabelMap.CommonDelete}</a>
             </li>
             <li id="add-portlet">
-              <a href="<@ofbizUrl>AddPortlet?portalPageId=${currentPortalPage.portalPageId}&columnSeqId=${portalPageColumn.columnSeqId}&originalPortalPageId=${parameters.originalPortalPageId}&mainPortalPageId=${parameters.mainPortalPageId}</@ofbizUrl>" class="buttontext">${uiLabelMap.CommonAddAPortlet}</a>
+              <a href="<@ofbizUrl>AddPortlet?portalPageId=${portalPage.portalPageId}&columnSeqId=${portalPageColumn.columnSeqId}&parentPortalPageId=${parentPortalPageId}</@ofbizUrl>" class="buttontext">${uiLabelMap.CommonAddAPortlet}</a>
             </li>
             <li id="column-width">
               <select name="setColWidth" onchange="window.location=this.value;">
                 <option value="">${uiLabelMap.CommonSetColumnWidth}</option>
-                <option <#if portalPageColumn.columnWidthPercentage?default(0) == 10> selected</#if> value="<@ofbizUrl>updatePortalPageColumn?portalPageId=${currentPortalPage.portalPageId}&columnSeqId=${portalPageColumn.columnSeqId}&columnWidthPercentage=10&configurePortalPage=true&originalPortalPageId=${parameters.originalPortalPageId}&mainPortalPageId=${parameters.mainPortalPageId}</@ofbizUrl>">10%</option>
-                <option <#if portalPageColumn.columnWidthPercentage?default(0) == 20> selected</#if> value="<@ofbizUrl>updatePortalPageColumn?portalPageId=${currentPortalPage.portalPageId}&columnSeqId=${portalPageColumn.columnSeqId}&columnWidthPercentage=20&configurePortalPage=true&originalPortalPageId=${parameters.originalPortalPageId}&mainPortalPageId=${parameters.mainPortalPageId}</@ofbizUrl>">20%</option>
-                <option <#if portalPageColumn.columnWidthPercentage?default(0) == 30> selected</#if> value="<@ofbizUrl>updatePortalPageColumn?portalPageId=${currentPortalPage.portalPageId}&columnSeqId=${portalPageColumn.columnSeqId}&columnWidthPercentage=30&configurePortalPage=true&originalPortalPageId=${parameters.originalPortalPageId}&mainPortalPageId=${parameters.mainPortalPageId}</@ofbizUrl>">30%</option>
-                <option <#if portalPageColumn.columnWidthPercentage?default(0) == 40> selected</#if> value="<@ofbizUrl>updatePortalPageColumn?portalPageId=${currentPortalPage.portalPageId}&columnSeqId=${portalPageColumn.columnSeqId}&columnWidthPercentage=40&configurePortalPage=true&originalPortalPageId=${parameters.originalPortalPageId}&mainPortalPageId=${parameters.mainPortalPageId}</@ofbizUrl>">40%</option>
-                <option <#if portalPageColumn.columnWidthPercentage?default(0) == 50> selected</#if> value="<@ofbizUrl>updatePortalPageColumn?portalPageId=${currentPortalPage.portalPageId}&columnSeqId=${portalPageColumn.columnSeqId}&columnWidthPercentage=50&configurePortalPage=true&originalPortalPageId=${parameters.originalPortalPageId}&mainPortalPageId=${parameters.mainPortalPageId}</@ofbizUrl>">50%</option>
-                <option <#if portalPageColumn.columnWidthPercentage?default(0) == 60> selected</#if> value="<@ofbizUrl>updatePortalPageColumn?portalPageId=${currentPortalPage.portalPageId}&columnSeqId=${portalPageColumn.columnSeqId}&columnWidthPercentage=60&configurePortalPage=true&originalPortalPageId=${parameters.originalPortalPageId}&mainPortalPageId=${parameters.mainPortalPageId}</@ofbizUrl>">60%</option>
-                <option <#if portalPageColumn.columnWidthPercentage?default(0) == 70> selected</#if> value="<@ofbizUrl>updatePortalPageColumn?portalPageId=${currentPortalPage.portalPageId}&columnSeqId=${portalPageColumn.columnSeqId}&columnWidthPercentage=70&configurePortalPage=true&originalPortalPageId=${parameters.originalPortalPageId}&mainPortalPageId=${parameters.mainPortalPageId}</@ofbizUrl>">70%</option>
-                <option <#if portalPageColumn.columnWidthPercentage?default(0) == 80> selected</#if> value="<@ofbizUrl>updatePortalPageColumn?portalPageId=${currentPortalPage.portalPageId}&columnSeqId=${portalPageColumn.columnSeqId}&columnWidthPercentage=80&configurePortalPage=true&originalPortalPageId=${parameters.originalPortalPageId}&mainPortalPageId=${parameters.mainPortalPageId}</@ofbizUrl>">80%</option>
-                <option <#if portalPageColumn.columnWidthPercentage?default(0) == 90> selected</#if> value="<@ofbizUrl>updatePortalPageColumn?portalPageId=${currentPortalPage.portalPageId}&columnSeqId=${portalPageColumn.columnSeqId}&columnWidthPercentage=90&configurePortalPage=true&originalPortalPageId=${parameters.originalPortalPageId}&mainPortalPageId=${parameters.mainPortalPageId}</@ofbizUrl>">90%</option>
-                <option <#if portalPageColumn.columnWidthPercentage?default(0) == 100> selected</#if> value="<@ofbizUrl>updatePortalPageColumn?portalPageId=${currentPortalPage.portalPageId}&columnSeqId=${portalPageColumn.columnSeqId}&columnWidthPercentage=100&configurePortalPage=true&originalPortalPageId=${parameters.originalPortalPageId}&mainPortalPageId=${parameters.mainPortalPageId}</@ofbizUrl>">100%</option>
+                <option <#if portalPageColumn.columnWidthPercentage?default(0) == 10> selected</#if> value="<@ofbizUrl>updatePortalPageColumn?portalPageId=${portalPage.portalPageId}&columnSeqId=${portalPageColumn.columnSeqId}&columnWidthPercentage=10&parentPortalPageId=${parentPortalPageId}</@ofbizUrl>">10%</option>
+                <option <#if portalPageColumn.columnWidthPercentage?default(0) == 20> selected</#if> value="<@ofbizUrl>updatePortalPageColumn?portalPageId=${portalPage.portalPageId}&columnSeqId=${portalPageColumn.columnSeqId}&columnWidthPercentage=20&parentPortalPageId=${parentPortalPageId}</@ofbizUrl>">20%</option>
+                <option <#if portalPageColumn.columnWidthPercentage?default(0) == 30> selected</#if> value="<@ofbizUrl>updatePortalPageColumn?portalPageId=${portalPage.portalPageId}&columnSeqId=${portalPageColumn.columnSeqId}&columnWidthPercentage=30&parentPortalPageId=${parentPortalPageId}</@ofbizUrl>">30%</option>
+                <option <#if portalPageColumn.columnWidthPercentage?default(0) == 40> selected</#if> value="<@ofbizUrl>updatePortalPageColumn?portalPageId=${portalPage.portalPageId}&columnSeqId=${portalPageColumn.columnSeqId}&columnWidthPercentage=40&parentPortalPageId=${parentPortalPageId}</@ofbizUrl>">40%</option>
+                <option <#if portalPageColumn.columnWidthPercentage?default(0) == 50> selected</#if> value="<@ofbizUrl>updatePortalPageColumn?portalPageId=${portalPage.portalPageId}&columnSeqId=${portalPageColumn.columnSeqId}&columnWidthPercentage=50&parentPortalPageId=${parentPortalPageId}</@ofbizUrl>">50%</option>
+                <option <#if portalPageColumn.columnWidthPercentage?default(0) == 60> selected</#if> value="<@ofbizUrl>updatePortalPageColumn?portalPageId=${portalPage.portalPageId}&columnSeqId=${portalPageColumn.columnSeqId}&columnWidthPercentage=60&parentPortalPageId=${parentPortalPageId}</@ofbizUrl>">60%</option>
+                <option <#if portalPageColumn.columnWidthPercentage?default(0) == 70> selected</#if> value="<@ofbizUrl>updatePortalPageColumn?portalPageId=${portalPage.portalPageId}&columnSeqId=${portalPageColumn.columnSeqId}&columnWidthPercentage=70&parentPortalPageId=${parentPortalPageId}</@ofbizUrl>">70%</option>
+                <option <#if portalPageColumn.columnWidthPercentage?default(0) == 80> selected</#if> value="<@ofbizUrl>updatePortalPageColumn?portalPageId=${portalPage.portalPageId}&columnSeqId=${portalPageColumn.columnSeqId}&columnWidthPercentage=80&parentPortalPageId=${parentPortalPageId}</@ofbizUrl>">80%</option>
+                <option <#if portalPageColumn.columnWidthPercentage?default(0) == 90> selected</#if> value="<@ofbizUrl>updatePortalPageColumn?portalPageId=${portalPage.portalPageId}&columnSeqId=${portalPageColumn.columnSeqId}&columnWidthPercentage=90&parentPortalPageId=${parentPortalPageId}</@ofbizUrl>">90%</option>
+                <option <#if portalPageColumn.columnWidthPercentage?default(0) == 100> selected</#if> value="<@ofbizUrl>updatePortalPageColumn?portalPageId=${portalPage.portalPageId}&columnSeqId=${portalPageColumn.columnSeqId}&columnWidthPercentage=100&parentPortalPageId=${parentPortalPageId}</@ofbizUrl>">100%</option>
               </select>
             </li>
           </ul>
@@ -62,7 +62,6 @@
         </#if>
       </#list>
     </tr>
-  </#if>
   <tr>
     <#list portalPageColumnList?if_exists as portalPageColumn>
       <td style="vertical-align: top; <#if portalPageColumn.columnWidthPercentage?has_content> ${uiLabelMap.CommonWidth}:${portalPageColumn.columnWidthPercentage}%;</#if>">
@@ -70,8 +69,7 @@
       <#list portalPagePortletViewList as portlet>
         <#if (!portlet.columnSeqId?has_content && portalPageColumn_index == 0) || (portlet.columnSeqId?if_exists == portalPageColumn.columnSeqId)>
           <#if portlet.screenName?has_content>
-            <#if configurePortalPage?has_content>
-              <#assign portletUrlLink = "portalPageId="+currentPortalPage.portalPageId+"&amp;portalPortletId="+portlet.portalPortletId+"&amp;portletSeqId="+portlet.portletSeqId+"&amp;configurePortalPage=true&amp;originalPortalPageId="+parameters.originalPortalPageId+"&amp;mainPortalPageId="+parameters.mainPortalPageId/>
+              <#assign portletUrlLink = "portalPageId="+portalPage.portalPageId+"&amp;portalPortletId="+portlet.portalPortletId+"&amp;portletSeqId="+portlet.portletSeqId+"&amp;parentPortalPageId="+parentPortalPageId/>
       
               <div class="portlet-config">
               <div class="portlet-config-title-bar">
@@ -107,8 +105,8 @@
                       <option value="">${uiLabelMap.CommonMoveToPortalPage}</option>
   
                       <#list portalPages as portalPage>
-                        <#if (currentPortalPage.portalName != portalPage.portalName)>
-                          <option value="<@ofbizUrl>movePortletToPortalPage?${portletUrlLink}&amp;newPortalPageId=${portalPage.portalPageId}</@ofbizUrl>">${portalPage.portalName}</option>
+                        <#if (portalPage.portalPageName != portalPage.portalPageName)>
+                          <option value="<@ofbizUrl>movePortletToPortalPage?${portletUrlLink}&amp;newPortalPageId=${portalPage.portalPageId}</@ofbizUrl>">${portalPage.portalPageName}</option>
                         </#if>
                       </#list>                          
                     </select>
@@ -118,21 +116,18 @@
                 <br class="clear"/>
               </div>
               <div class="screenlet-body">
-            </#if>
         
             <#assign screenFileName = portlet.screenLocation + "#" + portlet.screenName/>
             <div>
-            ${setRequestAttribute("portalPageId", currentPortalPage.portalPageId)}
+            ${setRequestAttribute("portalPageId", portalPage.portalPageId)}
             ${setRequestAttribute("portalPortletId", portlet.portalPortletId)}
             ${setRequestAttribute("portletSeqId", portlet.portletSeqId)}
             
             ${screens.render(screenFileName)}
             </div>
           
-            <#if configurePortalPage?has_content>
                 </div>
               </div>
-            </#if>
           </#if>
           <#assign firstInColumn = false/>
         </#if>

Modified: ofbiz/trunk/framework/common/webcommon/portal/listPortalPortlets.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/webcommon/portal/listPortalPortlets.ftl?rev=730665&r1=730664&r2=730665&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/webcommon/portal/listPortalPortlets.ftl (original)
+++ ofbiz/trunk/framework/common/webcommon/portal/listPortalPortlets.ftl Thu Jan  1 19:35:41 2009
@@ -27,7 +27,7 @@
   <div class="screenlet-title-bar">
     <ul>
       <li class="h3">Available portlets</li>
-      <li><a href="<@ofbizUrl>dashboard?portalPageId=${parameters.portalPageId}&amp;configurePortalPage=true&amp;originalPortalPageId=${parameters.originalPortalPageId}&amp;mainPortalPageId=${parameters.mainPortalPageId}</@ofbizUrl>">${uiLabelMap.CommonCancel}</a></li>
+      <li><a href="<@ofbizUrl>dashboard?portalPageId=${parameters.portalPageId}&amp;configurePortalPage=true&amp;originalPortalPageId=${parameters.portalPageId}</@ofbizUrl>">${uiLabelMap.CommonCancel}</a></li>
     </ul>
     <br class="clear"/>
   </div>
@@ -45,7 +45,7 @@
               <tr>
                 <td>
                   <div class="h2">
-                    <a href="<@ofbizUrl>createPortalPagePortlet?portalPortletId=${portalPortlet.portalPortletId}&amp;portalPageId=${parameters.portalPageId}&amp;columnSeqId=${parameters.columnSeqId}&amp;configurePortalPage=true&amp;originalPortalPageId=${parameters.originalPortalPageId}&amp;mainPortalPageId=${parameters.mainPortalPageId}</@ofbizUrl>">${portalPortlet.portletName}</a>
+                    <a href="<@ofbizUrl>createPortalPagePortlet?portalPortletId=${portalPortlet.portalPortletId}&amp;portalPageId=${parameters.portalPageId}&amp;columnSeqId=${parameters.columnSeqId}&amp;parentPortalPageId=${parameters.parentPortalPageId}</@ofbizUrl>">${portalPortlet.portletName}</a>
                   </div>
                   <div class="tabletext">
                     ${portalPortlet.description}

Modified: ofbiz/trunk/framework/common/webcommon/portal/portalPageHeader.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/webcommon/portal/portalPageHeader.ftl?rev=730665&r1=730664&r2=730665&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/webcommon/portal/portalPageHeader.ftl (original)
+++ ofbiz/trunk/framework/common/webcommon/portal/portalPageHeader.ftl Thu Jan  1 19:35:41 2009
@@ -19,9 +19,9 @@
 
 <div id="manage-portal-toolbar">
   <ul>
-    <#if currentPortalPage.portalName?has_content>
+    <#if currentPortalPage.portalPageName?has_content>
       <li id="portal-page-name">
-        ${currentPortalPage.portalName}
+        ${currentPortalPage.portalPageName}
       </li>
     </#if>
 
@@ -31,7 +31,7 @@
           <option>${uiLabelMap.CommonSelectPortalPage}</option>
           <#list portalPages as portalPage>
             <#if (currentPortalPage.portalPageId != portalPage.portalPageId)>
-              <option value="<@ofbizUrl>dashboard?portalPageId=${portalPage.portalPageId}</@ofbizUrl>">${portalPage.portalName}</option>
+              <option value="<@ofbizUrl>dashboard?portalPageId=${portalPage.portalPageId}</@ofbizUrl>">${portalPage.portalPageName}</option>
             </#if>
           </#list>                          
         </select>

Added: ofbiz/trunk/framework/common/webcommon/portal/showPortalPage.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/webcommon/portal/showPortalPage.ftl?rev=730665&view=auto
==============================================================================
--- ofbiz/trunk/framework/common/webcommon/portal/showPortalPage.ftl (added)
+++ ofbiz/trunk/framework/common/webcommon/portal/showPortalPage.ftl Thu Jan  1 19:35:41 2009
@@ -0,0 +1,48 @@
+<#--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<#if portalPage?has_content>
+<table width="100%">
+  <tr>
+    <#list portalPageColumns?if_exists as portalPageColumn>
+      <td style="vertical-align: top; <#if portalPageColumn.columnWidthPercentage?has_content> ${uiLabelMap.CommonWidth}:${portalPageColumn.columnWidthPercentage}%;</#if>">
+      <#assign firstInColumn = true/>
+      <#list portalPagePortlets as portlet>
+        <#if (!portlet.columnSeqId?has_content && portalPageColumn_index == 0) || (portlet.columnSeqId?if_exists == portalPageColumn.columnSeqId)>
+          <#if portlet.screenName?has_content>
+            <#assign screenFileName = portlet.screenLocation + "#" + portlet.screenName/>
+            <div>
+            ${setRequestAttribute("portalPageId", portalPage.portalPageId)}
+            ${setRequestAttribute("portalPortletId", portlet.portalPortletId)}
+            ${setRequestAttribute("portletSeqId", portlet.portletSeqId)}
+            ${screens.render(screenFileName)}
+            </div>
+          </#if>
+          <#assign firstInColumn = false/>
+        </#if>
+      </#list>
+      <#if portalPageColumn_has_next>
+        <td>&nbsp;</td>
+      </#if>
+    </#list>
+  </tr>
+</table>
+<#else/>
+<h2>No portal page data found. You may not have the necessary seed or other data for it.</h2>
+</#if>
\ No newline at end of file

Propchange: ofbiz/trunk/framework/common/webcommon/portal/showPortalPage.ftl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/framework/common/webcommon/portal/showPortalPage.ftl
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/trunk/framework/common/webcommon/portal/showPortalPage.ftl
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: ofbiz/trunk/framework/common/widget/PortalPageForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/widget/PortalPageForms.xml?rev=730665&r1=730664&r2=730665&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/widget/PortalPageForms.xml (original)
+++ ofbiz/trunk/framework/common/widget/PortalPageForms.xml Thu Jan  1 19:35:41 2009
@@ -21,20 +21,16 @@
 <forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-form.xsd">
 
-    <form name="ListPortalPages" type="list" list-name="listIt" paginate-target="ManagePortalPages" default-entity-name="PortalPage" separate-columns="true"
+    <form name="ListPortalPages" type="list" list-name="portalPages" paginate-target="ManagePortalPages" separate-columns="true"
         odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="basic-table hover-bar">
         <actions>
-            <set field="sortField" from-field="parameters.sortField" default-value="createdStamp"/>
-            <service service-name="getListPreferences"  result-map-name="listIt" result-map-list-name="listIt">
-                <field-map field-name="originalPortalPageId" env-name="parameters.originalPortalPageId"/>
-                <field-map field-name="mainPortalPageId" env-name="parameters.mainPortalPageId"/>
-            </service>
+            <script location="component://common/webcommon/WEB-INF/actions/includes/ListPortalPages.groovy"/>
         </actions>
         
         <field name="portalPageId" title="${uiLabelMap.CommonId}" sort-field="true">
-            <hyperlink description="${portalPageId}" target="dashboard?portalPageId=${portalPageId}&amp;configurePortalPage=true&amp;originalPortalPageId=${parameters.originalPortalPageId}&amp;ownerUserLoginId=${ownerUserLoginId}&amp;mainPortalPageId=${parameters.mainPortalPageId}"/>
-        </field>
-        <field name="portalName" title="${uiLabelMap.CommonName}" id-name="portalName" widget-style="tabletext" sort-field="true">
+            <hyperlink description="${portalPageId}" target="editPortalPage?portalPageId=${portalPageId}&amp;parentPortalPageId=${parameters.parentPortalPageId}"/>
+            </field>
+        <field name="portalPageName" title="${uiLabelMap.CommonName}" id-name="portalPageName" widget-style="tabletext" sort-field="true">
             <display>
                 <in-place-editor url="updatePortalPage" cancel-control="button" saving-text="Updating..." text-between-controls=" ">
                     <simple-editor/>
@@ -50,31 +46,16 @@
                 </in-place-editor>
             </display>
         </field>
-        <field name="deleteLink" title="${uiLabelMap.CommonEmptyHeader}" widget-style="buttontext" >
-            <hyperlink target="deletePortalPage?portalPageId=${portalPageId}&amp;originalPortalPageId=${parameters.originalPortalPageId}&amp;mainPortalPageId=${parameters.mainPortalPageId}" description="${uiLabelMap.CommonDelete}"/>
+        <field name="originalPortalPageId"><display/></field>
+        <field name="deleteLink" use-when="!ownerUserLoginId.equals(&quot;_NA_&quot;)" title="${uiLabelMap.CommonEmptyHeader}" widget-style="buttontext" >
+            <hyperlink target="deletePortalPage?portalPageId=${portalPageId}&amp;parentPortalPageId=${parameters.parentPortalPageId}" description="${uiLabelMap.CommonDelete}"/>
         </field>
     </form>
     
-    <form name="NewPortalPage" type="single" target="createPortalPage?mainPortalPageId=${parameters.mainPortalPageId}" title="" default-map-name="PortalPagemap">
-        <actions>
-            <set from-field="userLogin.userLoginId" field="ownerUserLoginId"/>
-            <set field="originalPortalPageId" from-field="parameters.originalPortalPageId"/>
-            <set field="mainPortalPageId" from-field="parameters.mainPortalPageId"/>
-        </actions>    
-        <auto-fields-service service-name="createPortalPage"/>
-        <field name="ownerUserLoginId">
-            <hidden/>
-        </field>
-        <field name="sequenceNum">
-            <hidden/>
-        </field>
-        <field name="originalPortalPageId">
-            <hidden/>
-        </field>
-        <field name="portalName" title="${uiLabelMap.CommonName}">
-            <text/>
-        </field>
-
+    <form name="NewPortalPage" type="single" target="createPortalPage?mainPortalPageId=${parameters.mainPortalPageId}">
+        <field name="parentPortalPageId"><hidden value="${parameters.parentPortalPageId}"/></field>
+        <field name="portalPageName" parameter-name="portalPageName"><text/></field>
+        <field name="description"><text/></field>
         <field name="submitButton" title="${uiLabelMap.CommonCreate}"><submit button-type="button"/></field>
     </form>
     

Modified: ofbiz/trunk/framework/common/widget/PortalPageScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/widget/PortalPageScreens.xml?rev=730665&r1=730664&r2=730665&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/widget/PortalPageScreens.xml (original)
+++ ofbiz/trunk/framework/common/widget/PortalPageScreens.xml Thu Jan  1 19:35:41 2009
@@ -21,17 +21,30 @@
 <screens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-screen.xsd">
 
-    <screen name="dashboard">
+    <screen name="showPortalPage">
+        <section>
+            <actions>
+                <set field="headerItem" from-field="parameters.portalPageId"/>
+                <script location="component://common/webcommon/WEB-INF/actions/includes/ShowPortalPage.groovy"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <platform-specific><html><html-template location="component://common/webcommon/portal/showPortalPage.ftl"/></html></platform-specific>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+    
+    <screen name="editPortalPage">
         <section>
             <actions>
-                <set field="portalPageId" from-field="parameters.portalPageId"/>
-                <set field="originalPortalPageId" from-field="parameters.originalPortalPageId"/>
-                <set field="mainPortalPageId" from-field="parameters.mainPortalPageId"/>
-                
                 <set field="headerItem" from-field="portalPageId"/>
-                <set field="configurePortalPage" from-field="parameters.configurePortalPage"/>
-                <entity-one entity-name="PortalPage" value-name="currentPortalPage"/>    
-                <set field="portalPages[]" from-field="currentPortalPage"/>                
+                <entity-one entity-name="PortalPage" value-name="portalPage"/>    
+                <set field="portalPageId" from-field="portalPage.portalPageId"/>
+                <set field="parentPortalPageId" from-field="parameters.parentPortalPageId"/>                
+                <set field="portalPages[]" from-field="portalPage"/>                
                 <entity-condition entity-name="PortalPageColumn" list-name="portalPageColumnList">
                     <condition-expr field-name="portalPageId" env-name="portalPageId"/>
                     <order-by field-name="columnSeqId"/>
@@ -40,32 +53,21 @@
                     <condition-expr field-name="portalPageId" env-name="portalPageId"/>
                     <order-by field-name="sequenceNum"/>
                 </entity-condition>
-                <!--My Profile From Party-->
-                <set field="titleProperty" value="PageTitleViewPartyProfile"/>
-                <set field="tabButtonItem" value="viewprofile"/>
-                <set field="labelTitleProperty" value="PartyTaxAuthInfos"/>
-                <set field="parameters.partyId" from-field="userLogin.userLoginId"/>
-                <script location="component://party/webapp/partymgr/WEB-INF/actions/party/ViewProfile.groovy"/>
-                <script location="component://party/webapp/partymgr/WEB-INF/actions/party/GetUserLoginPrimaryEmail.groovy"/>
             </actions>
             <widgets>
                 <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
                     <decorator-section name="body">
                         <include-form name="ListPortalPages" location="component://common/widget/PortalPageForms.xml"/>
                         <include-form name="NewPortalPage" location="component://common/widget/PortalPageForms.xml"/>
-                        <platform-specific><html><html-template location="component://common/webcommon/portal/portalPage.ftl"/></html></platform-specific>
+                        <platform-specific><html><html-template location="component://common/webcommon/portal/editPortalPage.ftl"/></html></platform-specific>
                     </decorator-section>
                 </decorator-screen>
             </widgets>
         </section>
     </screen>
-
+    
     <screen name="ManagePortalPages">
         <section>
-            <actions>
-                <set field="originalPortalPageId" from-field="parameters.originalPortalPageId"/>
-                <set field="originalPage" from-field="parameters.originalPage"/>
-            </actions>
             <widgets>
                 <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
                     <decorator-section name="body">

Modified: ofbiz/trunk/framework/example/widget/example/CommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/widget/example/CommonScreens.xml?rev=730665&r1=730664&r2=730665&view=diff
==============================================================================
--- ofbiz/trunk/framework/example/widget/example/CommonScreens.xml (original)
+++ ofbiz/trunk/framework/example/widget/example/CommonScreens.xml Thu Jan  1 19:35:41 2009
@@ -42,22 +42,9 @@
                 <set field="activeApp" value="example" global="true"/>
                 <!--set field="applicationMenuName" value="ExampleAppBar" global="true"/>
                 <set field="applicationMenuLocation" value="component://example/widget/example/ExampleMenus.xml" global="true"/-->
-                <set field="originalPortalPageId" value="EXAMPLE"/>
-                <set field="mainPortalPageId" value="MAINEXAMPLE"/>
                 <set field="appheaderTemplate" value="component://common/webcommon/portal/appheader.ftl"/>
-                <entity-and entity-name="PortalPage" list-name="getNA">
-                    <field-map field-name="ownerUserLoginId" value="_NA_"/>
-                    <field-map field-name="originalPortalPageId" env-name="originalPortalPageId"/>
-                </entity-and>
-                <entity-and entity-name="PortalPage" list-name="pages">
-                    <field-map field-name="originalPortalPageId" env-name="originalPortalPageId"/>
-                    <field-map field-name="ownerUserLoginId" env-name="userLogin.userLoginId"/>
-                    <order-by field-name="createdStamp"/>
-                </entity-and>
-                <entity-and entity-name="PortalPage" list-name="getMainPage">
-                    <field-map field-name="originalPortalPageId" env-name="mainPortalPageId"/>
-                    <field-map field-name="ownerUserLoginId" env-name="userLogin.userLoginId"/>
-                </entity-and>
+                <set field="parameters.parentPortalPageId" value="EXAMPLE"/>
+                <script location="component://common/webcommon/WEB-INF/actions/includes/ListPortalPages.groovy"/>
             </actions>
             <widgets>
                 <include-screen name="GlobalDecorator" location="component://common/widget/CommonScreens.xml"/>