svn commit: r730947 - in /ofbiz/trunk: framework/common/servicedef/ framework/common/webcommon/portal/ framework/common/widget/ framework/example/config/ framework/example/webapp/example/WEB-INF/ framework/example/widget/example/ specialpurpose/myporta...

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

svn commit: r730947 - in /ofbiz/trunk: framework/common/servicedef/ framework/common/webcommon/portal/ framework/common/widget/ framework/example/config/ framework/example/webapp/example/WEB-INF/ framework/example/widget/example/ specialpurpose/myporta...

hansbak-2
Author: hansbak
Date: Sat Jan  3 01:48:18 2009
New Revision: 730947

URL: http://svn.apache.org/viewvc?rev=730947&view=rev
Log:
 some small corrections in myportal framework and the first batch of updates for myportal

Modified:
    ofbiz/trunk/framework/common/servicedef/services.xml
    ofbiz/trunk/framework/common/webcommon/portal/appheader.ftl
    ofbiz/trunk/framework/common/webcommon/portal/listPortalPortlets.ftl
    ofbiz/trunk/framework/common/widget/PortalPageForms.xml
    ofbiz/trunk/framework/example/config/ExampleUiLabels.xml
    ofbiz/trunk/framework/example/webapp/example/WEB-INF/controller.xml
    ofbiz/trunk/framework/example/widget/example/ExampleScreens.xml
    ofbiz/trunk/specialpurpose/myportal/data/MyPortalTypeData.xml
    ofbiz/trunk/specialpurpose/myportal/script/org/ofbiz/myportal/Events.xml
    ofbiz/trunk/specialpurpose/myportal/script/org/ofbiz/myportal/MyPortalServices.xml
    ofbiz/trunk/specialpurpose/myportal/servicedef/services.xml
    ofbiz/trunk/specialpurpose/myportal/templates/appheader.ftl
    ofbiz/trunk/specialpurpose/myportal/webapp/myportal/WEB-INF/controller.xml
    ofbiz/trunk/specialpurpose/myportal/widget/CommonScreens.xml
    ofbiz/trunk/specialpurpose/myportal/widget/MyPortalScreens.xml

Modified: ofbiz/trunk/framework/common/servicedef/services.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/servicedef/services.xml?rev=730947&r1=730946&r2=730947&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/servicedef/services.xml (original)
+++ ofbiz/trunk/framework/common/servicedef/services.xml Sat Jan  3 01:48:18 2009
@@ -612,7 +612,7 @@
     </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="INOUT" optional="false"/>
+        <auto-attributes include="pk" mode="IN" optional="false"/>
         <auto-attributes include="nonpk" mode="IN" optional="true"/>
     </service>
     <service name="deletePortalPage" default-entity-name="PortalPage" engine="simple" auth="true"

Modified: ofbiz/trunk/framework/common/webcommon/portal/appheader.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/webcommon/portal/appheader.ftl?rev=730947&r1=730946&r2=730947&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/webcommon/portal/appheader.ftl (original)
+++ ofbiz/trunk/framework/common/webcommon/portal/appheader.ftl Sat Jan  3 01:48:18 2009
@@ -19,7 +19,7 @@
 
 <#assign selected = headerItem?default("void")>
 <div id="app-navigation">
-  <h2>${uiLabelMap.ExampleDashboard}</h2>
+  <h2>${uiLabelMap.ExampleApplication}</h2>
   <ul>
     <#if userLogin?has_content>    
         <li <#if selected = "${uiLabelMap.ExampleExample}"> class="selected"</#if>><a href="<@ofbizUrl>FindExample?portalPageId=${uiLabelMap.ExampleExample}</@ofbizUrl>">${uiLabelMap.ExampleExample}</a></li>
@@ -28,7 +28,7 @@
         <li <#if selected = "${uiLabelMap.ExampleAjaxExamples}"> class="selected"</#if>><a href="<@ofbizUrl>authview/findExampleAjax?portalPageId=${uiLabelMap.ExampleAjaxExamples}</@ofbizUrl>">${uiLabelMap.ExampleAjaxExamples}</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>
+             <li<#if selected = "${page.portalPageId}"> class="selected"</#if>><a href="<@ofbizUrl>showPortalPage?portalPageId=${page.portalPageId}</@ofbizUrl>"><#if page.portalPageName?exists>${page.portalPageName}<#else>?</#if></a></li>
          </#list>
         </#if>
         <li class="opposed"><a href="<@ofbizUrl>logout</@ofbizUrl>">${uiLabelMap.CommonLogout}</a></li>

Modified: ofbiz/trunk/framework/common/webcommon/portal/listPortalPortlets.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/webcommon/portal/listPortalPortlets.ftl?rev=730947&r1=730946&r2=730947&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/webcommon/portal/listPortalPortlets.ftl (original)
+++ ofbiz/trunk/framework/common/webcommon/portal/listPortalPortlets.ftl Sat Jan  3 01:48:18 2009
@@ -22,12 +22,11 @@
 margin: 1em;
 }
 </style>
-
 <div class="screenlet">
   <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.portalPageId}</@ofbizUrl>">${uiLabelMap.CommonCancel}</a></li>
+      <li><a href="<@ofbizUrl>editPortalPage?portalPageId=${parameters.portalPageId}&parentPortalPageId=${parameters.parentPortalPageId}</@ofbizUrl>">${uiLabelMap.CommonCancel}</a></li>
     </ul>
     <br class="clear"/>
   </div>

Modified: ofbiz/trunk/framework/common/widget/PortalPageForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/widget/PortalPageForms.xml?rev=730947&r1=730946&r2=730947&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/widget/PortalPageForms.xml (original)
+++ ofbiz/trunk/framework/common/widget/PortalPageForms.xml Sat Jan  3 01:48:18 2009
@@ -30,7 +30,8 @@
         <field name="portalPageId" title="${uiLabelMap.CommonId}" 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">
+        <field name="portalPageName" use-when="ownerUserLoginId.equals(&quot;_NA_&quot;)" title="${uiLabelMap.CommonName}" sort-field="true"><display/></field>
+        <field name="portalPageName" use-when="!ownerUserLoginId.equals(&quot;_NA_&quot;)" 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/>
@@ -38,8 +39,9 @@
                 </in-place-editor>
             </display>
         </field>
-        <field name="description" title="${uiLabelMap.CommonDescription}" id-name="portalDescription" widget-style="tabletext" sort-field="true">
-            <display>
+        <field name="description" use-when="ownerUserLoginId.equals(&quot;_NA_&quot;)" title="${uiLabelMap.CommonDescription}" widget-style="tabletext" sort-field="true"><display/></field>
+        <field name="description" use-when="!ownerUserLoginId.equals(&quot;_NA_&quot;)" title="${uiLabelMap.CommonDescription}" id-name="portalDescription" widget-style="tabletext" sort-field="true">
+                <display>
                 <in-place-editor url="updatePortalPage" cancel-control="button" saving-text="Updating..." text-between-controls=" ">
                     <simple-editor/>
                     <field-map field-name="portalPageId" env-name="portalPageId"/>

Modified: ofbiz/trunk/framework/example/config/ExampleUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/config/ExampleUiLabels.xml?rev=730947&r1=730946&r2=730947&view=diff
==============================================================================
--- ofbiz/trunk/framework/example/config/ExampleUiLabels.xml (original)
+++ ofbiz/trunk/framework/example/config/ExampleUiLabels.xml Sat Jan  3 01:48:18 2009
@@ -61,10 +61,6 @@
         <value xml:lang="zh">开源软件OFBiz家族的一部分</value><!--value xml:lang="zh">开源软件OFBiz的组成部分</value--><!--value xml:lang="zh">开源软件OFBiz的组成部分</value-->
         <value xml:lang="zh_CN">OFBiz的一部分</value>
     </property>
-    <property key="ExampleDashboard">
-        <value xml:lang="en">Example Dashboard</value>
-        <value xml:lang="fr">Exemple de tableau de bord</value>
-    </property>        
     <property key="ExampleExampleId">
         <value xml:lang="en">Example ID</value>
         <value xml:lang="fr">Réf. exemple</value>

Modified: ofbiz/trunk/framework/example/webapp/example/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/webapp/example/WEB-INF/controller.xml?rev=730947&r1=730946&r2=730947&view=diff
==============================================================================
--- ofbiz/trunk/framework/example/webapp/example/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/framework/example/webapp/example/WEB-INF/controller.xml Sat Jan  3 01:48:18 2009
@@ -180,7 +180,6 @@
 
     <!-- View Mappings -->
     <view-map name="main" type="screen" page="component://example/widget/example/CommonScreens.xml#main"/>
-    <view-map name="dashboardExample" type="screen" page="component://example/widget/example/ExampleScreens.xml#DisplayExamplePage"/>
     <view-map name="help" type="screen" page="component://example/widget/example/ExampleScreens.xml#help"/>
 
     <view-map name="FindExample" type="screen" page="component://example/widget/example/ExampleScreens.xml#FindExample"/>

Modified: ofbiz/trunk/framework/example/widget/example/ExampleScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/widget/example/ExampleScreens.xml?rev=730947&r1=730946&r2=730947&view=diff
==============================================================================
--- ofbiz/trunk/framework/example/widget/example/ExampleScreens.xml (original)
+++ ofbiz/trunk/framework/example/widget/example/ExampleScreens.xml Sat Jan  3 01:48:18 2009
@@ -149,36 +149,4 @@
         </section>
     </screen>
     
-    <screen name="DisplayExamplePage">
-        <section>
-            <actions>
-                <set field="portalPageId" from-field="parameters.portalPageId"/>
-                <set field="originalPortalPageId" from-field="parameters.originalPortalPageId"/>
-                <set field="headerItem" from-field="portalPageId"/>
-                <entity-one entity-name="PortalPage" value-name="currentPortalPage"/>                
-                <entity-condition entity-name="PortalPageColumn" list-name="portalPageColumnList">
-                    <condition-expr field-name="portalPageId" env-name="portalPageId"/>
-                    <order-by field-name="columnSeqId"/>
-                </entity-condition>              
-                <entity-condition entity-name="PortalPagePortletView" list-name="portalPagePortletViewList">
-                    <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">
-                        <platform-specific><html><html-template location="component://common/webcommon/portal/portalPage.ftl"/></html></platform-specific>
-                    </decorator-section>
-                </decorator-screen>
-            </widgets>
-        </section>
-    </screen>  
 </screens>

Modified: ofbiz/trunk/specialpurpose/myportal/data/MyPortalTypeData.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/myportal/data/MyPortalTypeData.xml?rev=730947&r1=730946&r2=730947&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/myportal/data/MyPortalTypeData.xml (original)
+++ ofbiz/trunk/specialpurpose/myportal/data/MyPortalTypeData.xml Sat Jan  3 01:48:18 2009
@@ -36,7 +36,7 @@
     <Enumeration description="Customer Request Completed" enumCode="CUST_COMPLETE" enumId="PRDS_CUST_CONFIRM" sequenceId="18" enumTypeId="PRDS_EMAIL"/>
     
     <!-- PortalPortlet Demo Data -->
-    <PortalPage portalPageId="MYPORTAL" portalName="Main" description="The default OFBiz portal page" ownerUserLoginId="_NA_" originalPortalPageId="MYPORTAL"/>
+    <PortalPage portalPageId="MYPORTAL" portalPageName="Main" description="The default OFBiz portal page" ownerUserLoginId="_NA_"/>
     <PortalPageColumn portalPageId="MYPORTAL" columnSeqId="01" />
     <PortalPageColumn portalPageId="MYPORTAL" columnSeqId="02" />
     

Modified: ofbiz/trunk/specialpurpose/myportal/script/org/ofbiz/myportal/Events.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/myportal/script/org/ofbiz/myportal/Events.xml?rev=730947&r1=730946&r2=730947&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/myportal/script/org/ofbiz/myportal/Events.xml (original)
+++ ofbiz/trunk/specialpurpose/myportal/script/org/ofbiz/myportal/Events.xml Sat Jan  3 01:48:18 2009
@@ -312,21 +312,4 @@
             request-name="communicationEventTypeId"/>
         <field-to-request field="communicationEventId" request-name="communicationEventId"/>
     </simple-method>
-    
-    <!--Create simple-method of getPortalPageId-->
-    <simple-method method-name="getPortalPageId" short-description="">
-        <set field="mainPortalPageId" value="MAINMYPORTAL"/>
-        <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>
-        <first-from-list entry="getMyportal" list="getMainPage"/>
-        <if-empty field="getMainPage">
-            <set field="portalPageId" value="MYPORTAL"/>
-        </if-empty>
-        <if-not-empty field="getMainPage">
-            <set field="portalPageId" from-field="getMyportal.portalPageId"/>
-        </if-not-empty>
-        <field-to-request field="portalPageId" request-name="portalPageId"/>
-    </simple-method>
 </simple-methods>

Modified: ofbiz/trunk/specialpurpose/myportal/script/org/ofbiz/myportal/MyPortalServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/myportal/script/org/ofbiz/myportal/MyPortalServices.xml?rev=730947&r1=730946&r2=730947&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/myportal/script/org/ofbiz/myportal/MyPortalServices.xml (original)
+++ ofbiz/trunk/specialpurpose/myportal/script/org/ofbiz/myportal/MyPortalServices.xml Sat Jan  3 01:48:18 2009
@@ -121,5 +121,22 @@
                 </if-not-empty>
             </then>
         </if>
+    </simple-method>    
+    
+    <!--Create simple-method of getPortalPageId-->
+    <simple-method method-name="getMainPortalPageId" short-description="">
+        <entity-and entity-name="PortalPage" list="getPrivatePage">
+            <field-map field-name="parentPortalPageId" from-field="nullField"/>
+            <field-map field-name="originalPortalPageId" value="MYPORTAL"/>
+            <field-map field-name="ownerUserLoginId" from-field="userLogin.userLoginId"/>
+        </entity-and>
+        <first-from-list entry="getPrivatePageId" list="getPrivatePage"/>
+        <if-empty field="getPrivatePageId">
+            <set field="portalPageId" value="MYPORTAL"/>
+        </if-empty>
+        <if-not-empty field="getPrivatePageId">
+            <set field="portalPageId" from-field="getPrivatePageId.portalPageId"/>
+        </if-not-empty>
+        <field-to-result field="portalPageId" result-name="portalPageId"/>
     </simple-method>
 </simple-methods>

Modified: ofbiz/trunk/specialpurpose/myportal/servicedef/services.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/myportal/servicedef/services.xml?rev=730947&r1=730946&r2=730947&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/myportal/servicedef/services.xml (original)
+++ ofbiz/trunk/specialpurpose/myportal/servicedef/services.xml Sat Jan  3 01:48:18 2009
@@ -30,4 +30,10 @@
         <auto-attributes include="nonpk" mode="OUT" optional="true"/>
     </service>
     
+    <service name="getMainPortalPageId" engine="simple"  auth="true" default-entity-name="PortalPage"
+        location="org/ofbiz/myportal/MyPortalServices.xml" invoke="getMainPortalPageId">
+        <description>Send email to customer when customer request is Completed or Created. </description>
+        <attribute name="portalPageId" type="String" mode="OUT"/>
+    </service>
+    
 </services>

Modified: ofbiz/trunk/specialpurpose/myportal/templates/appheader.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/myportal/templates/appheader.ftl?rev=730947&r1=730946&r2=730947&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/myportal/templates/appheader.ftl (original)
+++ ofbiz/trunk/specialpurpose/myportal/templates/appheader.ftl Sat Jan  3 01:48:18 2009
@@ -19,27 +19,17 @@
 
 <#assign selected = headerItem?default("void")>
 <div id="app-navigation">
-  <h2>My Personal Page</h2>
+  <h2>${uiLabelMap.ExampleDashboard}</h2>
   <ul>
-    <#if userLogin?has_content>  
-        <#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 userLogin?has_content>    
+        <#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="http://docs.ofbiz.org/display/OFBENDUSER/My+Page?decorator=printable" url-mode="plain" target-window="new">${uiLabelMap.CommonHelp}</a></li>
-     <li class="opposed"><a href="<@ofbizUrl>ManagePortalPages?originalPortalPageId=${originalPortalPageId}&amp;mainPortalPageId=MAINMYPORTAL</@ofbizUrl>">${uiLabelMap.CommonPreferences}</a></li>
+        <li class="opposed"><a href="<@ofbizUrl>ManagePortalPages?parentPortalPageId=MYPORTAL</@ofbizUrl>">${uiLabelMap.CommonPreferences}</a></li>
     <#else>
         <li class="opposed"><a href="<@ofbizUrl>${checkLoginUrl?if_exists}</@ofbizUrl>">${uiLabelMap.CommonLogin}</a></li>
     </#if>

Modified: ofbiz/trunk/specialpurpose/myportal/webapp/myportal/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/myportal/webapp/myportal/WEB-INF/controller.xml?rev=730947&r1=730946&r2=730947&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/myportal/webapp/myportal/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/specialpurpose/myportal/webapp/myportal/WEB-INF/controller.xml Sat Jan  3 01:48:18 2009
@@ -28,8 +28,7 @@
     <description>Show personal information in the system</description>
     
     <request-map uri="main">
-        <security https="true" auth="true"/>
-        <event  type="simple" invoke="getPortalPageId" path="org/ofbiz/myportal/Events.xml"/>
+        <security https="true" auth="true"/>        
         <response name="success" type="view" value="main"/>
     </request-map>
     
@@ -292,12 +291,7 @@
         <response name="error" type="view" value="EditCustRequestContent"/>
     </request-map>
     
-    <!-- dashboard -->  
-    <request-map uri="dashboardExample">
-        <security https="true" auth="false"/>
-        <response name="success" type="view" value="dashboardExample"/>
-    </request-map>
-    
+    <view-map name="main" type="screen" page="component://myportal/widget/CommonScreens.xml#main"/>
     <view-map name="myTasks" type="screen" page="component://myportal/widget/CommonScreens.xml#MyTasks"/>
     <view-map name="myCommunications" type="screen" page="component://myportal/widget/CommonScreens.xml#MyCommunications"/>
     <view-map name="otherCommunications" type="screen" page="component://myportal/widget/CommonScreens.xml#OtherCommunications"/>
@@ -313,8 +307,4 @@
     <view-map name="EditCommunicationEvent" type="screen" page="component://myportal/widget/MyPageScreens.xml#EditCommunicationEvent"/>
     <view-map name="addAttachmentEmail" type="screen" page="component://myportal/widget/MyPageScreens.xml#addAttachmentEmail"/>
     <view-map name="EditCustRequestContent" type="screen" page="component://myportal/widget/MyPageScreens.xml#EditCustRequestContent"/>  
-    
-    <!-- dashboard -->  
-    <view-map name="main" type="screen" page="component://myportal/widget/CommonScreens.xml#main"/>
-    <view-map name="dashboardExample" type="screen" page="component://myportal/widget/MyPortalScreens.xml#DisplayExamplePage"/>
 </site-conf>

Modified: ofbiz/trunk/specialpurpose/myportal/widget/CommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/myportal/widget/CommonScreens.xml?rev=730947&r1=730946&r2=730947&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/myportal/widget/CommonScreens.xml (original)
+++ ofbiz/trunk/specialpurpose/myportal/widget/CommonScreens.xml Sat Jan  3 01:48:18 2009
@@ -44,36 +44,14 @@
                 <!-- <set field="layoutSettings.headerMiddleBackgroundUrl" value="" global="true"/> -->
                 <!-- <set field="layoutSettings.headerRightBackgroundUrl" value="" global="true"/> -->
                 <!-- TODO: Use transform to specify component URI -->
-                <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="MYPORTAL"/>
-                <set field="mainPortalPageId" value="MAINMYPORTAL"/>
-                <set field="appheaderTemplate" value="component://myportal/templates/appheader.ftl"/>              
-                <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="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="getMainPage">
-                    <field-map field-name="originalPortalPageId" env-name="mainPortalPageId"/>
-                    <field-map field-name="ownerUserLoginId" env-name="userLogin.userLoginId"/>
-                </entity-and>
+                <set field="appheaderTemplate" value="component://myportal/templates/appheader.ftl"/>
+                <set field="parameters.parentPortalPageId" value="MYPORTAL"/>
+                <set field="parameters.userLogin.userLoginId" from-field="userLogin.userLoginId"/>
+                <script location="component://common/webcommon/WEB-INF/actions/includes/ListPortalPages.groovy"/>
             </actions>
             <widgets>
-                <section>
-                    <condition><not><if-empty field-name="userLogin"/></not></condition>
-                    <actions>
-                        <service service-name="getUserPreferenceGroup" result-map-name="preferences">
-                            <field-map field-name="userPrefGroupTypeId" value="MyPortal" />
-                        </service>
-                    </actions>
-                    <widgets/>
-                </section>
                 <include-screen name="GlobalDecorator" location="component://common/widget/CommonScreens.xml"/>
             </widgets>
         </section>
@@ -124,6 +102,7 @@
             </widgets>
         </section>
     </screen>
+    
     <screen name="CommonCommunicationEventDecorator">
         <section>
             <actions>
@@ -131,12 +110,12 @@
                 <entity-one entity-name="CommunicationEvent" value-name="commEvent">
                     <field-map field-name="communicationEventId" env-name="parameters.communicationEventId"/>
                 </entity-one>
-                <script location="component://mypage/webapp/mypage/WEB-INF/actions/GetMyCommunicationEventRole.groovy"/>
+                <script location="component://myportal/webapp/myportal/WEB-INF/actions/GetMyCommunicationEventRole.groovy"/>
             </actions>
             <widgets>
                 <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
                     <decorator-section name="body">
-                        <include-menu location="component://mypage/widget/MyPageMenus.xml" name="CommSubTabBar"/>
+                        <include-menu location="component://myportal/widget/MyPortalMenus.xml" name="CommSubTabBar"/>
                         <decorator-section-include name="body"/>
                     </decorator-section>
                 </decorator-screen>
@@ -158,197 +137,29 @@
     </screen>
 
  <screen name="main">
- <section>
- <widgets>
-    <include-screen name="DisplayExamplePage" location="component://myportal/widget/MyPortalScreens.xml"/>
- </widgets>
- </section>
- </screen>
-    
-    <screen name="mainEmployee">
-        <section>
-            <actions>
-                <service service-name="getUserPreferenceGroup"
-                    result-map-name="preferences">
-                    <field-map field-name="userPrefGroupTypeId" value="MyPage" />
-                </service>
-                <!--  check if there are any customer requests for this user -->
-                <entity-condition list-name="custRequests" entity-name="CustReqAndTypeAndPartyRel">
-                    <condition-list combine="and">
-                        <condition-expr field-name="statusId" operator="equals" value="CRQ_SUBMITTED"/>
-                        <condition-list combine="and">
-                            <condition-expr field-name="roleTypeIdTo" operator="equals" value="REQ_TAKER"/>
-                            <condition-expr field-name="partyIdTo" operator="equals" env-name="userLogin.partyId"/>
-                        </condition-list>
-                    </condition-list>
-                    <order-by field-name="-custRequestDate"/>
-                </entity-condition>
-            </actions>
-            <widgets>
-                <section>
-                    <condition>
-                        <not><if-empty field-name="custRequests"/></not>
-                    </condition>
-                    <widgets>
-                        <screenlet title="${uiLabelMap.IncomingCustRequests}" navigation-form-name="ListRequestList" >
-                            <include-form name="ListRequestList" location="component://order/webapp/ordermgr/request/RequestForms.xml"/>
-                        </screenlet>
-                    </widgets>
-                </section>
-                <section>
-                    <condition>
-                        <if-compare field-name="preferences.userPrefMap.myCommunications"
-                            operator="equals" value="Y" />
-                    </condition>
-                    <widgets>
-                        <include-screen name="MyCommunications"
-                            location="component://mypage/widget/MyPageScreens.xml"/>
-                    </widgets>
-                </section>
-                <section>
-                    <condition>
-                        <if-compare field-name="preferences.userPrefMap.otherCommunications"
-                            operator="equals" value="Y" />
-                    </condition>
-                    <widgets>
-                        <include-screen name="OtherCommunications"
-                            location="component://mypage/widget/MyPageScreens.xml" />
-                    </widgets>
-                </section>
-                <section>
-                    <condition>
-                        <if-compare field-name="preferences.userPrefMap.myCompanyComms"
-                            operator="equals" value="Y" />
-                    </condition>
-                    <widgets>
-                        <include-screen name="MyCompanyComms"
-                            location="component://mypage/widget/MyPageScreens.xml" />
-                    </widgets>
-                </section>
-                <section>
-                    <condition>
-                        <if-compare field-name="preferences.userPrefMap.myTasks"
-                            operator="equals" value="Y" />
-                    </condition>
-                    <widgets>
-                        <include-screen name="MyTasks"
-                            location="component://mypage/widget/MyPageScreens.xml" />
-                    </widgets>
-                </section>
-                <section>
-                    <condition>
-                        <if-compare field-name="preferences.userPrefMap.myTimesheet"
-                            operator="equals" value="Y" />
-                    </condition>
-                    <widgets>
-                        <include-screen name="MyTimesheet"
-                            location="component://mypage/widget/MyPageScreens.xml" />
-                    </widgets>
-                </section>
-            </widgets>
-        </section>
-    </screen>
-    
-    <screen name="mainCustomer">
-        <section>
-            <actions>
-                <set field="partyId" from-field="userLogin.partyId"/>
-                <set field="status" from-field="parameters.status" default-value="open"/>
-                <set field="status" value="${bsh:&quot;all&quot;.equals(status)?&quot;%&quot;:&quot;open&quot;}"/>
-                <entity-condition list-name="custRequests" entity-name="CustRequestInfoAndWorkEffortAndPartyRel">
-                    <condition-list combine="and">
-                        <condition-expr field-name="fromPartyId" operator="equals" value="${userLogin.partyId}"/>
-                        <condition-list combine="or">
-                            <condition-expr field-name="statusId" operator="equals" value="CRQ_REVIEWED"/>
-                            <condition-expr field-name="statusId" operator="equals" value="CRQ_ACCEPTED"/>
-                        </condition-list>
-                    </condition-list>
-                    <order-by field-name="+priority"/>
-                    <order-by field-name="+custRequestDate"/>
-                </entity-condition>
-                <entity-condition list-name="custRequestsCompleted" entity-name="CustRequestInfoAndWorkEffortAndPartyRel">
-                    <condition-list combine="and">
-                        <condition-expr field-name="fromPartyId" operator="equals" value="${userLogin.partyId}"/>
-                        <condition-list combine="or">
-                            <condition-expr field-name="statusId" operator="equals" value="CRQ_COMPLETED"/>
-                            <condition-expr field-name="statusId" operator="equals" value="CRQ_CANCELLED"/>
-                        </condition-list>
-                    </condition-list>
-                    <order-by field-name="custRequestDate"/>
-                </entity-condition>
-                <script location="component://party/webapp/partymgr/WEB-INF/actions/party/GetMyCompany.groovy"/>                
-                <entity-condition list-name="companyCustRequests" entity-name="CustRequestInfoAndWorkEffortAndPartyRel">
-                    <condition-list combine="and">
-                        <condition-expr field-name="partyIdFrom" operator="equals" value="${myCompanyId}"/>
-                        <condition-expr field-name="fromPartyId" operator="not-equals" value="${userLogin.partyId}"/>
-                    </condition-list>
-                    <order-by field-name="custRequestDate"/>
-                </entity-condition>
-                <!-- only list internal notes to the customer do not show the incoming or outgoing emails: will confuse only -->
-                <entity-condition entity-name="CommunicationEventAndRole" list-name="commEvents">
-                    <condition-list combine="and">
-                        <condition-expr field-name="communicationEventTypeId" operator="equals" value="COMMENT_NOTE" />
-                        <condition-expr field-name="partyId" operator="equals" value="${partyId}" />
-                        <condition-list combine="or">
-                            <condition-expr field-name="roleStatusId"
-                                operator="not-equals" value="COM_ROLE_COMPLETED" />
-                            <condition-expr field-name="roleStatusId"
-                                operator="like" value="${status}" />
-                        </condition-list>
-                    </condition-list>
-                    <order-by field-name="-datetimeStarted" />
-                </entity-condition>
-                <service service-name="getUserPreferenceGroup" result-map-name="preferences">
-                    <field-map field-name="userPrefGroupTypeId" value="MyPage" />
-                </service>
-            </actions>
-            <widgets>
-                <screenlet title="${uiLabelMap.MyOpenCustomerRequests}" navigation-form-name="ListCustRequests" >
-                    <link target="newrequest" text="${uiLabelMap.OrderNewRequest}" style="buttontext"/>
-                    <include-form name="ListCustRequests" location="component://mypage/widget/MyPageForms.xml"/>
-                </screenlet>
-                <screenlet title="${uiLabelMap.MyCompletedCustomerRequests}" navigation-form-name="ListCustRequestsCompleted">
-                    <include-form name="ListCustRequestsCompleted" location="component://mypage/widget/MyPageForms.xml"/>
-                </screenlet>
-                <section>
-                    <condition>
-                        <not><if-empty field-name="companyCustRequests"/></not>
-                    </condition>
-                    <widgets>
-                        <screenlet title="${uiLabelMap.OtherCompanyCustomerRequests}" navigation-form-name="ListOtherCompanyRequests">
-                            <include-form name="ListOtherCompanyRequests" location="component://mypage/widget/MyPageForms.xml"/>
-                        </screenlet>
-                    </widgets>
-                </section>
-                <screenlet title="${uiLabelMap.CommunicationsOfParty}: ${partyName.firstName} ${partyName.middleName} ${partyName.lastName} ${partyName.groupName} [${partyId}] "
-                    navigation-menu-name="communicationsMenu" navigation-form-name="ListPartyCommEvents" name="myComms">
-                    <include-menu name="communicationsMenu" location="component://mypage/widget/MyPageMenus.xml" />
-                    <include-form name="ListPartyCommEvents" location="component://mypage/widget/MyPageForms.xml" />
-                </screenlet>                
-            </widgets>
-        </section>
-    </screen>
-    
-    <screen name="mainNoAccess">
-        <section>
-            <widgets>
-                <screenlet title="${uiLabelMap.CommonNoAccess}" navigation-form-name="ListRequestList" >
-                    <container>
-                        <label style="h1" text="${uiLabelMap.MyPageNoAccess1}"></label>
-                    </container>
-                    <container>
-                        <label style="h2" text="${uiLabelMap.MyPageNoAccess2}"></label>
-                    </container>
-                    <container>
-                        <label style="h3" text="${uiLabelMap.MyPageNoAccess3}"></label>
-                    </container>
-                    <container>
-                        <label style="h3" text="${uiLabelMap.MyPageNoAccess4}"></label>
-                    </container>
-                </screenlet>
-            </widgets>
-        </section>
-    </screen>
+    <section>
+        <actions>
+            <service service-name="getMainPortalPageId" result-map-name="getMainPortalPageId"/>
+            <set field="parameters.portalPageId" from-field="getMainPortalPageId.portalPageId"/>
+            <script location="component://common/webcommon/WEB-INF/actions/includes/ShowPortalPage.groovy"/>
+            <set field="headerItem" from-field="parameters.portalPageId"/>
+            <!--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">
+                    <platform-specific><html><html-template location="component://common/webcommon/portal/showPortalPage.ftl"/></html></platform-specific>
+                </decorator-section>
+            </decorator-screen>
+        </widgets>
+    </section>
+ </screen>                
 
     <screen name="CommonRequestDecorator">
         <section>

Modified: ofbiz/trunk/specialpurpose/myportal/widget/MyPortalScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/myportal/widget/MyPortalScreens.xml?rev=730947&r1=730946&r2=730947&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/myportal/widget/MyPortalScreens.xml (original)
+++ ofbiz/trunk/specialpurpose/myportal/widget/MyPortalScreens.xml Sat Jan  3 01:48:18 2009
@@ -803,40 +803,6 @@
             </widgets>
         </section>
     </screen>
-    
-    <!--Create Portal Screen-->
-    <screen name="DisplayExamplePage">
-        <section>
-            <actions>
-                <set field="portalPageId" from-field="parameters.portalPageId"/>
-                <set field="headerItem" from-field="portalPageId"/>
-                <set field="configurePortalPage" from-field="parameters.configurePortalPage"/>
-                <entity-one entity-name="PortalPage" value-name="currentPortalPage"/>
-                <entity-condition entity-name="PortalPageColumn" list-name="portalPageColumnList">
-                    <condition-expr field-name="portalPageId" env-name="portalPageId"/>
-                    <order-by field-name="columnSeqId"/>
-                </entity-condition>              
-                <entity-condition entity-name="PortalPagePortletView" list-name="portalPagePortletViewList">
-                    <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">
-                        <platform-specific><html><html-template location="component://common/webcommon/portal/portalPage.ftl"/></html></platform-specific>
-                    </decorator-section>
-                </decorator-screen>
-            </widgets>
-        </section>
-    </screen>      
 
     <!-- My Profile Screens -->
     <screen name="model">