Author: hansbak
Date: Mon Dec 22 01:51:29 2008 New Revision: 728634 URL: http://svn.apache.org/viewvc?rev=728634&view=rev Log: have the ability to modify system pages (ownerLogin=_NA_) by copying to own number and modify there...now also available in the example component Modified: ofbiz/trunk/framework/common/data/PortalDemoData.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/portal/appheader.ftl ofbiz/trunk/framework/common/webcommon/portal/listPortalPortlets.ftl ofbiz/trunk/framework/common/webcommon/portal/portalPage.ftl ofbiz/trunk/framework/common/widget/PortalPageForms.xml ofbiz/trunk/framework/common/widget/PortalPageScreens.xml ofbiz/trunk/framework/example/widget/example/CommonScreens.xml ofbiz/trunk/specialpurpose/myportal/data/MyPortalTypeData.xml ofbiz/trunk/specialpurpose/myportal/templates/appheader.ftl ofbiz/trunk/specialpurpose/myportal/widget/CommonScreens.xml Modified: ofbiz/trunk/framework/common/data/PortalDemoData.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/data/PortalDemoData.xml?rev=728634&r1=728633&r2=728634&view=diff ============================================================================== --- ofbiz/trunk/framework/common/data/PortalDemoData.xml (original) +++ ofbiz/trunk/framework/common/data/PortalDemoData.xml Mon Dec 22 01:51:29 2008 @@ -20,7 +20,7 @@ <entity-engine-xml> <!-- PortalPortlet Demo Data --> - <PortalPage portalPageId="DEFAULT" portalName="Default home Portal Page" description="The default OFBiz portal page" ownerUserLoginId="admin" originalPortalPageId="EXAMPLE"/> + <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 --> 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=728634&r1=728633&r2=728634&view=diff ============================================================================== --- ofbiz/trunk/framework/common/script/org/ofbiz/common/PortalPageMethods.xml (original) +++ ofbiz/trunk/framework/common/script/org/ofbiz/common/PortalPageMethods.xml Mon Dec 22 01:51:29 2008 @@ -73,23 +73,27 @@ <!--Create simple-method of copyOriginalPage--> <simple-method method-name="copyOriginalPage" short-description=""> - <set field="mainPortalPageId" value="MAINMYPORTAL"/> - <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> - <if-empty field="getMainPage"> - <set field="portalPageId" from-field="parameters.portalPageId"/> - <if-compare field="portalPageId" value="MYPORTAL" operator="equals"> + <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"/> + </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"/> </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" value="MAINMYPORTAL"/> + <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"/> @@ -113,8 +117,7 @@ <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" - /> + <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" @@ -132,7 +135,7 @@ <create-value value-name="PortletView"/> </iterate> </iterate> - </if-compare> - </if-empty> + </if-empty> + </if-compare> </simple-method> </simple-methods> 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=728634&r1=728633&r2=728634&view=diff ============================================================================== --- ofbiz/trunk/framework/common/script/org/ofbiz/common/PortalPageServices.xml (original) +++ ofbiz/trunk/framework/common/script/org/ofbiz/common/PortalPageServices.xml Mon Dec 22 01:51:29 2008 @@ -122,67 +122,62 @@ <simple-method method-name="deletePortalPage" short-description="Delete a Portal Page"> <if-compare field="parameters.portalPageId" value="MYPORTAL" operator="not-equals"> - <entity-one entity-name="PortalPage" value-name="portalPage" auto-field-map="true" use-cache="true"/> + <if-compare field="parameters.portalPageId" value="DEFAULT" operator="not-equals"> + <entity-one entity-name="PortalPage" value-name="portalPage" auto-field-map="true" use-cache="true"/> - <if-not-empty field="portalPage"> - <entity-and entity-name="PortalPageColumn" list-name="portalPageColumnList"> - <field-map field-name="portalPageId" env-name="portalPage.portalPageId"/> - </entity-and> + <if-not-empty field="portalPage"> + <entity-and entity-name="PortalPageColumn" list-name="portalPageColumnList"> + <field-map field-name="portalPageId" env-name="portalPage.portalPageId"/> + </entity-and> - <iterate list-name="portalPageColumnList" entry-name="portalPageColumn"> - <set-service-fields service-name="deletePortalPageColumn" to-map-name="deletePortalPageColumnInMap" map-name="portalPageColumn"/> - <call-service service-name="deletePortalPageColumn" in-map-name="deletePortalPageColumnInMap"/> - </iterate> + <iterate list-name="portalPageColumnList" entry-name="portalPageColumn"> + <set-service-fields service-name="deletePortalPageColumn" to-map-name="deletePortalPageColumnInMap" map-name="portalPageColumn"/> + <call-service service-name="deletePortalPageColumn" in-map-name="deletePortalPageColumnInMap"/> + </iterate> - <remove-value value-name="portalPage"/> - </if-not-empty> + <remove-value value-name="portalPage"/> + </if-not-empty> + </if-compare> </if-compare> </simple-method> <!--Create simple-method of getListPreferences--> <simple-method method-name="getListPreferences" short-description=""> - <if-compare field="parameters.originalPortalPageId" value="EXAMPLE" operator="equals"> - <entity-and entity-name="PortalPage" list-name="PortalPageList"> - <field-map field-name="originalPortalPageId" env-name="parameters.originalPortalPageId"/> - <field-map field-name="ownerUserLoginId" env-name="userLogin.userLoginId"/> - </entity-and> - <else> - <set field="mainPortalPageId" value="MAINMYPORTAL"/> - <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> - <if-empty field="getMainPage"> - <entity-condition entity-name="PortalPage" list-name="PortalPageList"> - <condition-list combine="and"> - <condition-list combine="or"> - <condition-expr field-name="originalPortalPageId" operator="equals" env-name="parameters.originalPortalPageId"/> - <condition-expr field-name="originalPortalPageId" operator="equals" value="_NA_"/> - </condition-list> - <condition-list combine="or"> - <condition-expr field-name="ownerUserLoginId" operator="equals" env-name="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-name="PortalPageList"> - <condition-list combine="and"> - <condition-list combine="or"> - <condition-expr field-name="originalPortalPageId" operator="equals" env-name="parameters.originalPortalPageId"/> - <condition-expr field-name="originalPortalPageId" operator="equals" value="MAINMYPORTAL"/> - </condition-list> - <condition-list combine="or"> - <condition-expr field-name="ownerUserLoginId" operator="equals" env-name="userLogin.userLoginId"/> - </condition-list> - </condition-list> - <order-by field-name="createdStamp"/> - </entity-condition> - </if-not-empty> - </else> - </if-compare> + <set field="mainPortalPageId" from-field="parameters.mainPortalPageId"/> + + <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> + + <if-empty field="getMainPage"> + <entity-condition entity-name="PortalPage" list-name="PortalPageList"> + <condition-list combine="and"> + <condition-list combine="or"> + <condition-expr field-name="originalPortalPageId" operator="equals" env-name="parameters.originalPortalPageId"/> + </condition-list> + <condition-list combine="or"> + <condition-expr field-name="ownerUserLoginId" operator="equals" env-name="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-name="PortalPageList"> + <condition-list combine="and"> + <condition-list combine="or"> + <condition-expr field-name="originalPortalPageId" operator="equals" env-name="parameters.originalPortalPageId"/> + <condition-expr field-name="originalPortalPageId" operator="equals" env-name="mainPortalPageId"/> + </condition-list> + <condition-list combine="or"> + <condition-expr field-name="ownerUserLoginId" operator="equals" env-name="userLogin.userLoginId"/> + </condition-list> + </condition-list> + <order-by field-name="createdStamp"/> + </entity-condition> + </if-not-empty> <list-to-list list-name="PortalPageList" to-list-name="result"/> <field-to-result field-name="result" result-name="listIt"/> </simple-method> Modified: ofbiz/trunk/framework/common/servicedef/services.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/servicedef/services.xml?rev=728634&r1=728633&r2=728634&view=diff ============================================================================== --- ofbiz/trunk/framework/common/servicedef/services.xml (original) +++ ofbiz/trunk/framework/common/servicedef/services.xml Mon Dec 22 01:51:29 2008 @@ -661,6 +661,7 @@ 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> Modified: ofbiz/trunk/framework/common/webcommon/portal/appheader.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/webcommon/portal/appheader.ftl?rev=728634&r1=728633&r2=728634&view=diff ============================================================================== --- ofbiz/trunk/framework/common/webcommon/portal/appheader.ftl (original) +++ ofbiz/trunk/framework/common/webcommon/portal/appheader.ftl Mon Dec 22 01:51:29 2008 @@ -25,13 +25,24 @@ <li <#if selected = "${uiLabelMap.ExampleExample}"> class="selected"</#if>><a href="<@ofbizUrl>FindExample?portalPageId=${uiLabelMap.ExampleExample}</@ofbizUrl>">${uiLabelMap.ExampleExample}</a></li> <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> - <#list pages as page> - <li<#if selected = "${page.portalPageId}"> class="selected"</#if>><a href="<@ofbizUrl>dashboardExample?portalPageId=${page.portalPageId}</@ofbizUrl>">${page.portalName}</a></li> - </#list> + <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> + </#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}</@ofbizUrl>">${uiLabelMap.CommonDashboard}</a></li> + <li class="opposed"><a href="<@ofbizUrl>ManagePortalPages?originalPortalPageId=${originalPortalPageId}&mainPortalPageId=MAINEXAMPLE</@ofbizUrl>">${uiLabelMap.CommonDashboard}</a></li> <#else> <li class="opposed"><a href="<@ofbizUrl>${checkLoginUrl?if_exists}</@ofbizUrl>">${uiLabelMap.CommonLogin}</a></li> </#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=728634&r1=728633&r2=728634&view=diff ============================================================================== --- ofbiz/trunk/framework/common/webcommon/portal/listPortalPortlets.ftl (original) +++ ofbiz/trunk/framework/common/webcommon/portal/listPortalPortlets.ftl Mon Dec 22 01:51:29 2008 @@ -27,7 +27,7 @@ <div class="screenlet-title-bar"> <ul> <li class="h3">Available portlets</li> - <li><a href="<@ofbizUrl>dashboard?portalPageId=${parameters.portalPageId}&configurePortalPage=true</@ofbizUrl>">${uiLabelMap.CommonCancel}</a></li> + <li><a href="<@ofbizUrl>dashboard?portalPageId=${parameters.portalPageId}&configurePortalPage=true&mainPortalPageId=${parameters.mainPortalPageId}</@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}&portalPageId=${parameters.portalPageId}&columnSeqId=${parameters.columnSeqId}&configurePortalPage=true&originalPortalPageId=${parameters.originalPortalPageId}</@ofbizUrl>">${portalPortlet.portletName}</a> + <a href="<@ofbizUrl>createPortalPagePortlet?portalPortletId=${portalPortlet.portalPortletId}&portalPageId=${parameters.portalPageId}&columnSeqId=${parameters.columnSeqId}&configurePortalPage=true&originalPortalPageId=${parameters.originalPortalPageId}&mainPortalPageId=${parameters.mainPortalPageId}</@ofbizUrl>">${portalPortlet.portletName}</a> </div> <div class="tabletext"> ${portalPortlet.description} Modified: ofbiz/trunk/framework/common/webcommon/portal/portalPage.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/webcommon/portal/portalPage.ftl?rev=728634&r1=728633&r2=728634&view=diff ============================================================================== --- ofbiz/trunk/framework/common/webcommon/portal/portalPage.ftl (original) +++ ofbiz/trunk/framework/common/webcommon/portal/portalPage.ftl Mon Dec 22 01:51:29 2008 @@ -22,7 +22,7 @@ <div id="manage-portal-toolbar"> <ul> <li id="add-column"> - <a href="<@ofbizUrl>addPortalPageColumn?portalPageId=${currentPortalPage.portalPageId}&configurePortalPage=true&originalPortalPageId=${parameters.originalPortalPageId}</@ofbizUrl>" class="buttontext">${uiLabelMap.CommonAddColumn}</a> + <a href="<@ofbizUrl>addPortalPageColumn?portalPageId=${currentPortalPage.portalPageId}&configurePortalPage=true&originalPortalPageId=${parameters.originalPortalPageId}&mainPortalPageId=${parameters.mainPortalPageId}</@ofbizUrl>" class="buttontext">${uiLabelMap.CommonAddColumn}</a> </li> </ul> <br class="clear"/> @@ -35,24 +35,24 @@ <td class="manage-portal-column-toolbar" style="vertical-align: top; <#if portalPageColumn.columnWidthPercentage?has_content> width:${portalPageColumn.columnWidthPercentage}%;</#if>"> <ul> <li id="delete-column"> - <a href="<@ofbizUrl>deletePortalPageColumn?portalPageId=${currentPortalPage.portalPageId}&columnSeqId=${portalPageColumn.columnSeqId}&configurePortalPage=true&originalPortalPageId=${parameters.originalPortalPageId}</@ofbizUrl>" class="buttontext">${uiLabelMap.CommonDelete}</a> + <a href="<@ofbizUrl>deletePortalPageColumn?portalPageId=${currentPortalPage.portalPageId}&columnSeqId=${portalPageColumn.columnSeqId}&configurePortalPage=true&originalPortalPageId=${parameters.originalPortalPageId}&mainPortalPageId=${parameters.mainPortalPageId}</@ofbizUrl>" class="buttontext">${uiLabelMap.CommonDelete}</a> </li> <li id="add-portlet"> - <a href="<@ofbizUrl>AddPortlet?portalPageId=${currentPortalPage.portalPageId}&columnSeqId=${portalPageColumn.columnSeqId}&originalPortalPageId=${parameters.originalPortalPageId}</@ofbizUrl>" class="buttontext">${uiLabelMap.CommonAddAPortlet}</a> + <a href="<@ofbizUrl>AddPortlet?portalPageId=${currentPortalPage.portalPageId}&columnSeqId=${portalPageColumn.columnSeqId}&originalPortalPageId=${parameters.originalPortalPageId}&mainPortalPageId=${parameters.mainPortalPageId}</@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}</@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}</@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}</@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}</@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}</@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}</@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}</@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}</@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}</@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}</@ofbizUrl>">100%</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> </select> </li> </ul> Modified: ofbiz/trunk/framework/common/widget/PortalPageForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/widget/PortalPageForms.xml?rev=728634&r1=728633&r2=728634&view=diff ============================================================================== --- ofbiz/trunk/framework/common/widget/PortalPageForms.xml (original) +++ ofbiz/trunk/framework/common/widget/PortalPageForms.xml Mon Dec 22 01:51:29 2008 @@ -27,11 +27,12 @@ <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> </actions> <field name="portalPageId" title="${uiLabelMap.CommonId}" sort-field="true"> - <hyperlink description="${portalPageId}" target="dashboard?portalPageId=${portalPageId}&configurePortalPage=true&originalPortalPageId=${parameters.originalPortalPageId}"/> + <hyperlink description="${portalPageId}" target="dashboard?portalPageId=${portalPageId}&configurePortalPage=true&originalPortalPageId=${parameters.originalPortalPageId}&ownerUserLoginId=${ownerUserLoginId}&mainPortalPageId=${parameters.mainPortalPageId}"/> </field> <field name="portalName" title="${uiLabelMap.CommonName}" id-name="portalName" widget-style="tabletext" sort-field="true"> <display> @@ -50,7 +51,7 @@ </display> </field> <field name="deleteLink" title="${uiLabelMap.CommonEmptyHeader}" widget-style="buttontext" > - <hyperlink target="deletePortalPage?portalPageId=${portalPageId}&originalPortalPageId=${parameters.originalPortalPageId}" description="${uiLabelMap.CommonDelete}"/> + <hyperlink target="deletePortalPage?portalPageId=${portalPageId}&originalPortalPageId=${parameters.originalPortalPageId}&mainPortalPageId=${parameters.mainPortalPageId}" description="${uiLabelMap.CommonDelete}"/> </field> </form> Modified: ofbiz/trunk/framework/common/widget/PortalPageScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/widget/PortalPageScreens.xml?rev=728634&r1=728633&r2=728634&view=diff ============================================================================== --- ofbiz/trunk/framework/common/widget/PortalPageScreens.xml (original) +++ ofbiz/trunk/framework/common/widget/PortalPageScreens.xml Mon Dec 22 01:51:29 2008 @@ -26,6 +26,8 @@ <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"/> @@ -62,6 +64,7 @@ <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}"> @@ -78,6 +81,7 @@ <section> <actions> <set field="originalPortalPageId" from-field="parameters.originalPortalPageId"/> + <set field="mainPortalPageId" from-field="parameters.mainPortalPageId"/> <entity-condition entity-name="PortalPortlet" list-name="portalPortlets"/> </actions> <widgets> Modified: ofbiz/trunk/framework/example/widget/example/CommonScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/widget/example/CommonScreens.xml?rev=728634&r1=728633&r2=728634&view=diff ============================================================================== --- ofbiz/trunk/framework/example/widget/example/CommonScreens.xml (original) +++ ofbiz/trunk/framework/example/widget/example/CommonScreens.xml Mon Dec 22 01:51:29 2008 @@ -43,12 +43,21 @@ <!--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="appheaderTemplate" value="component://common/webcommon/portal/appheader.ftl"/> + <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> </actions> <widgets> <include-screen name="GlobalDecorator" location="component://common/widget/CommonScreens.xml"/> Modified: ofbiz/trunk/specialpurpose/myportal/data/MyPortalTypeData.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/myportal/data/MyPortalTypeData.xml?rev=728634&r1=728633&r2=728634&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/myportal/data/MyPortalTypeData.xml (original) +++ ofbiz/trunk/specialpurpose/myportal/data/MyPortalTypeData.xml Mon Dec 22 01:51:29 2008 @@ -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="_NA_"/> + <PortalPage portalPageId="MYPORTAL" portalName="Main" description="The default OFBiz portal page" ownerUserLoginId="_NA_" originalPortalPageId="MYPORTAL"/> <PortalPageColumn portalPageId="MYPORTAL" columnSeqId="01" /> <PortalPageColumn portalPageId="MYPORTAL" columnSeqId="02" /> Modified: ofbiz/trunk/specialpurpose/myportal/templates/appheader.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/myportal/templates/appheader.ftl?rev=728634&r1=728633&r2=728634&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/myportal/templates/appheader.ftl (original) +++ ofbiz/trunk/specialpurpose/myportal/templates/appheader.ftl Mon Dec 22 01:51:29 2008 @@ -39,7 +39,7 @@ <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">Help</a></li> - <li class="opposed"><a href="<@ofbizUrl>ManagePortalPages?originalPortalPageId=${originalPortalPageId}</@ofbizUrl>">preferences</a></li> + <li class="opposed"><a href="<@ofbizUrl>ManagePortalPages?originalPortalPageId=${originalPortalPageId}&mainPortalPageId=MAINMYPORTAL</@ofbizUrl>">preferences</a></li> <#else> <li class="opposed"><a href="<@ofbizUrl>${checkLoginUrl?if_exists}</@ofbizUrl>">${uiLabelMap.CommonLogin}</a></li> </#if> Modified: ofbiz/trunk/specialpurpose/myportal/widget/CommonScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/myportal/widget/CommonScreens.xml?rev=728634&r1=728633&r2=728634&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/myportal/widget/CommonScreens.xml (original) +++ ofbiz/trunk/specialpurpose/myportal/widget/CommonScreens.xml Mon Dec 22 01:51:29 2008 @@ -57,6 +57,7 @@ </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"/> |
Free forum by Nabble | Edit this page |