You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ha...@apache.org on 2011/07/18 05:57:56 UTC
svn commit: r1147733 - in /ofbiz/trunk/specialpurpose/ecommerce:
webapp/ecommerce/WEB-INF/actions/getContextPath.groovy
widget/EmailContactListScreens.xml
Author: hansbak
Date: Mon Jul 18 03:57:56 2011
New Revision: 1147733
URL: http://svn.apache.org/viewvc?rev=1147733&view=rev
Log:
remove the hardcoding of the mountpoint in the contactlist verify url
Added:
ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/getContextPath.groovy (with props)
Modified:
ofbiz/trunk/specialpurpose/ecommerce/widget/EmailContactListScreens.xml
Added: ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/getContextPath.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/getContextPath.groovy?rev=1147733&view=auto
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/getContextPath.groovy (added)
+++ ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/getContextPath.groovy Mon Jul 18 03:57:56 2011
@@ -0,0 +1,35 @@
+/*
+ * 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.base.component.ComponentConfig
+
+ecommerceMountPoint = ""
+ComponentConfig cc = new ComponentConfig()
+
+ecommerce = cc.getComponentConfig("ecommerce")
+ecommerceLists = []
+ecommerceLists = ecommerce.getWebappInfos()
+ecommerceLists.each { ecommerceList ->
+ if(ecommerceList.getName() == "ecommerce"){
+ ecommerceMountPoint = ecommerceList.getContextRoot()
+ }
+}
+ecommerceMountPoint = ecommerceMountPoint == "/" ? "" : ecommerceMountPoint
+
+context.contextPath = ecommerceMountPoint + "/control/"
Propchange: ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/getContextPath.groovy
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/getContextPath.groovy
------------------------------------------------------------------------------
svn:keywords = "Date Rev Author URL Id"
Propchange: ofbiz/trunk/specialpurpose/ecommerce/webapp/ecommerce/WEB-INF/actions/getContextPath.groovy
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: ofbiz/trunk/specialpurpose/ecommerce/widget/EmailContactListScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/widget/EmailContactListScreens.xml?rev=1147733&r1=1147732&r2=1147733&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/widget/EmailContactListScreens.xml (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/widget/EmailContactListScreens.xml Mon Jul 18 03:57:56 2011
@@ -25,8 +25,9 @@ under the License.
<section>
<actions>
<set field="titleProperty" value="EcommerceSubscriptionVerifyEmail"/>
- <set field="baseEcommerceSecureUrl" value="${baseSecureUrl}/ecommerce/control/"/>
-
+ <!--<set field="baseEcommerceSecureUrl" value="${baseSecureUrl}/ecommerce/control/"/>-->
+ <script location="component://ecommerce/webapp/ecommerce/WEB-INF/actions/getContextPath.groovy"/>
+ <set field="baseEcommerceSecureUrl" value="${baseSecureUrl}${contextPath}"/>
<entity-one entity-name="PartyNameView" value-field="partyName" auto-field-map="false">
<field-map field-name="partyId" from-field="contactListParty.partyId"/>
</entity-one>
@@ -67,7 +68,9 @@ under the License.
<actions>
<entity-one entity-name="ContactList" value-field="contactList"/>
<entity-one entity-name="PartyNameView" value-field="partyName"/>
- <set field="baseEcommerceSecureUrl" value="${baseSecureUrl}/ecommerce/control/"/>
+ <!--<set field="baseEcommerceSecureUrl" value="${baseSecureUrl}/ecommerce/control/"/>-->
+ <script location="component://ecommerce/webapp/ecommerce/WEB-INF/actions/getContextPath.groovy"/>
+ <set field="baseEcommerceSecureUrl" value="${baseSecureUrl}${contextPath}"/>
</actions>
<widgets>
<platform-specific><html><html-template location="component://ecommerce/templates/email/ContactListSubscribeEmail.ftl"/></html></platform-specific>
@@ -80,7 +83,9 @@ under the License.
<actions>
<entity-one entity-name="ContactList" value-field="contactList"/>
<entity-one entity-name="PartyNameView" value-field="partyName"/>
- <set field="baseEcommerceSecureUrl" value="${baseSecureUrl}/ecommerce/control/"/>
+ <!--<set field="baseEcommerceSecureUrl" value="${baseSecureUrl}/ecommerce/control/"/>-->
+ <script location="component://ecommerce/webapp/ecommerce/WEB-INF/actions/getContextPath.groovy"/>
+ <set field="baseEcommerceSecureUrl" value="${baseSecureUrl}${contextPath}"/>
</actions>
<widgets>
<platform-specific><html><html-template location="component://ecommerce/templates/email/ContactListUnsubscribeVerifyEmail.ftl"/></html></platform-specific>
@@ -93,7 +98,9 @@ under the License.
<actions>
<entity-one entity-name="ContactList" value-field="contactList"/>
<entity-one entity-name="PartyNameView" value-field="partyName"/>
- <set field="baseEcommerceSecureUrl" value="${baseSecureUrl}/ecommerce/control/"/>
+ <!--<set field="baseEcommerceSecureUrl" value="${baseSecureUrl}/ecommerce/control/"/>-->
+ <script location="component://ecommerce/webapp/ecommerce/WEB-INF/actions/getContextPath.groovy"/>
+ <set field="baseEcommerceSecureUrl" value="${baseSecureUrl}${contextPath}"/>
</actions>
<widgets>
<platform-specific><html><html-template location="component://ecommerce/templates/email/ContactListUnsubscribeEmail.ftl"/></html></platform-specific>
@@ -106,7 +113,9 @@ under the License.
<actions>
<entity-one entity-name="ContactList" value-field="contactList"/>
<entity-one entity-name="PartyNameView" value-field="partyName"/>
- <set field="baseEcommerceSecureUrl" value="${baseSecureUrl}/ecommerce/control/"/>
+ <!--<set field="baseEcommerceSecureUrl" value="${baseSecureUrl}/ecommerce/control/"/>-->
+ <script location="component://ecommerce/webapp/ecommerce/WEB-INF/actions/getContextPath.groovy"/>
+ <set field="baseEcommerceSecureUrl" value="${baseSecureUrl}${contextPath}"/>
</actions>
<widgets>
<platform-specific><html><html-template location="component://ecommerce/templates/email/ContactListEmailTemplate.ftl"/></html></platform-specific>