You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2008/11/08 09:59:31 UTC

svn commit: r712366 - in /ofbiz/trunk: framework/common/data/ framework/common/entitydef/ framework/common/servicedef/ framework/common/src/org/ofbiz/common/preferences/ framework/common/webcommon/includes/ framework/common/widget/ framework/webapp/src...

Author: jleroux
Date: Sat Nov  8 00:59:31 2008
New Revision: 712366

URL: http://svn.apache.org/viewvc?rev=712366&view=rev
Log:
A patch from Ravindra Mandre "The userPrefGroupId field on UserPrefGroupType should be userPrefGroupTypeId, as per conventions" (https://issues.apache.org/jira/browse/OFBIZ-1996) - OFBIZ-1996
With some help by Vikas Mayur for the "Upgrading OFBiz from earlier revisions" Wiki page update

Modified:
    ofbiz/trunk/framework/common/data/CommonTypeData.xml
    ofbiz/trunk/framework/common/entitydef/entitymodel.xml
    ofbiz/trunk/framework/common/servicedef/services.xml
    ofbiz/trunk/framework/common/src/org/ofbiz/common/preferences/PreferenceServices.java
    ofbiz/trunk/framework/common/src/org/ofbiz/common/preferences/PreferenceWorker.java
    ofbiz/trunk/framework/common/webcommon/includes/header.ftl
    ofbiz/trunk/framework/common/webcommon/includes/listVisualThemes.ftl
    ofbiz/trunk/framework/common/widget/CommonScreens.xml
    ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/LoginWorker.java
    ofbiz/trunk/specialpurpose/mypage/data/MyPageTypeData.xml
    ofbiz/trunk/specialpurpose/mypage/script/org/ofbiz/mypage/MyPageServices.xml
    ofbiz/trunk/specialpurpose/mypage/widget/CommonScreens.xml
    ofbiz/trunk/specialpurpose/mypage/widget/MyPageForms.xml

Modified: ofbiz/trunk/framework/common/data/CommonTypeData.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/data/CommonTypeData.xml?rev=712366&r1=712365&r2=712366&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/data/CommonTypeData.xml (original)
+++ ofbiz/trunk/framework/common/data/CommonTypeData.xml Sat Nov  8 00:59:31 2008
@@ -92,8 +92,8 @@
     <UomType description="Other" hasTable="N" parentTypeId="" uomTypeId="OTHER_MEASURE"/>
 
     <!-- User preferences seed data -->
-    <UserPrefGroupType userPrefGroupId="GLOBAL_PREFERENCES" description="Global preferences"/>
-    <UserPreference userLoginId="_NA_" userPrefTypeId="VISUAL_THEME" userPrefGroupId="GLOBAL_PREFERENCES" userPrefValue="DEFAULT"/>
+    <UserPrefGroupType userPrefGroupTypeId="GLOBAL_PREFERENCES" description="Global preferences"/>
+    <UserPreference userLoginId="_NA_" userPrefTypeId="VISUAL_THEME" userPrefGroupTypeId="GLOBAL_PREFERENCES" userPrefValue="DEFAULT"/>
 
     <!-- Visual Themes seed data -->
     <EnumerationType description="Visual Theme Resource Type (stylesheet, javascript file, etc)" enumTypeId="VT_RES_TYPE" hasTable="N"/>

Modified: ofbiz/trunk/framework/common/entitydef/entitymodel.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/entitydef/entitymodel.xml?rev=712366&r1=712365&r2=712366&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/entitydef/entitymodel.xml (original)
+++ ofbiz/trunk/framework/common/entitydef/entitymodel.xml Sat Nov  8 00:59:31 2008
@@ -499,7 +499,7 @@
       </description>
       <field name="userLoginId" type="id-vlong-ne"></field>
       <field name="userPrefTypeId" type="id-ne"><description>A unique identifier for this preference</description></field>
-      <field name="userPrefGroupId" type="id-long"><description>Used to assemble groups of preferences</description></field>
+      <field name="userPrefGroupTypeId" type="id-long"><description>Used to assemble groups of preferences</description></field>
       <field name="userPrefValue" type="value"><description>Contains the value of this preference</description></field>
       <field name="userPrefDataType" type="id-long"><description>The java data type of this preference (empty = java.lang.String)</description></field>
       <prim-key field="userLoginId"/>
@@ -512,9 +512,9 @@
       <description>The UserPrefGroupType entity contains one entry per preference
           group type.
       </description>
-      <field name="userPrefGroupId" type="id-long-ne"></field>
+      <field name="userPrefGroupTypeId" type="id-long-ne"></field>
       <field name="description" type="description"></field>
-      <prim-key field="userPrefGroupId"/>
+      <prim-key field="userPrefGroupTypeId"/>
     </entity>
 
     <!-- ============================ -->

Modified: ofbiz/trunk/framework/common/servicedef/services.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/servicedef/services.xml?rev=712366&r1=712365&r2=712366&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/servicedef/services.xml (original)
+++ ofbiz/trunk/framework/common/servicedef/services.xml Sat Nov  8 00:59:31 2008
@@ -425,7 +425,7 @@
             If no userLoginId is specified, preferences are copied to current user's preferences.</description>
         <permission-service service-name="preferenceCopyPermission"/>
         <attribute name="fromUserLoginId" type="String" mode="IN" optional="false"/>
-        <attribute name="userPrefGroupId" type="String" mode="IN" optional="false"/>
+        <attribute name="userPrefGroupTypeId" type="String" mode="IN" optional="false"/>
         <attribute name="userLoginId" type="String" mode="IN" optional="true"/>
     </service>
 
@@ -434,7 +434,7 @@
         <description>Gets a single user preference.</description>
         <attribute name="userPrefTypeId" type="String" mode="IN" optional="false"/>
         <attribute name="userLoginId" type="String" mode="IN" optional="true"/>
-        <attribute name="userPrefGroupId" type="String" mode="IN" optional="true"/>
+        <attribute name="userPrefGroupTypeId" type="String" mode="IN" optional="true"/>
         <attribute name="userPrefMap" type="Map" mode="OUT" optional="true"/>
         <attribute name="userPrefValue" type="Object" mode="OUT" optional="true"/>
     </service>
@@ -442,7 +442,7 @@
     <service name="getUserPreferenceGroup" engine="java"
             location="org.ofbiz.common.preferences.PreferenceServices" invoke="getUserPreferenceGroup">
         <description>Gets a group of user preferences.</description>
-        <attribute name="userPrefGroupId" type="String" mode="IN" optional="false"/>
+        <attribute name="userPrefGroupTypeId" type="String" mode="IN" optional="false"/>
         <attribute name="userLoginId" type="String" mode="IN" optional="true"/>
         <attribute name="userPrefMap" type="Map" mode="OUT" optional="true"/>
     </service>
@@ -453,7 +453,7 @@
         <permission-service service-name="preferenceGetSetPermission" main-action="CREATE"/>
         <attribute name="userPrefTypeId" type="String" mode="IN" optional="false"/>
         <attribute name="userPrefValue" type="String" mode="IN" optional="false"/>
-        <attribute name="userPrefGroupId" type="String" mode="IN" optional="true"/>
+        <attribute name="userPrefGroupTypeId" type="String" mode="IN" optional="true"/>
         <attribute name="userLoginId" type="String" mode="IN" optional="true"/>
     </service>
 
@@ -462,7 +462,7 @@
         <description>Sets a group of user preferences.</description>
         <permission-service service-name="preferenceGetSetPermission" main-action="CREATE"/>
         <attribute name="userPrefMap" type="Map" mode="IN" optional="false"/>
-        <attribute name="userPrefGroupId" type="String" mode="IN" optional="false"/>
+        <attribute name="userPrefGroupTypeId" type="String" mode="IN" optional="false"/>
         <attribute name="userLoginId" type="String" mode="IN" optional="true"/>
     </service>
 

Modified: ofbiz/trunk/framework/common/src/org/ofbiz/common/preferences/PreferenceServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/src/org/ofbiz/common/preferences/PreferenceServices.java?rev=712366&r1=712365&r2=712366&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/src/org/ofbiz/common/preferences/PreferenceServices.java (original)
+++ ofbiz/trunk/framework/common/src/org/ofbiz/common/preferences/PreferenceServices.java Sat Nov  8 00:59:31 2008
@@ -41,7 +41,7 @@
  * User preference services.<p>User preferences are stored as key-value pairs.
  * <p>User preferences can be grouped - so that multiple preference pairs can be
  * handled at once. Preference groups also allow a single userPrefTypeId to be
- * used more than once - with each occurence having a unique userPrefGroupId.</p>
+ * used more than once - with each occurence having a unique userPrefGroupTypeId.</p>
  * <p>User preference values are stored as Strings, so the easiest and most
  * efficient way to handle user preference values is to keep them as strings.
  * This class handles any data conversion needed.</p>
@@ -73,9 +73,9 @@
         }
         String userLoginId = PreferenceWorker.getUserLoginId(context, true);
         Map<String, String> fieldMap = UtilMisc.toMap("userLoginId", userLoginId, "userPrefTypeId", userPrefTypeId);
-        String userPrefGroupId = (String) context.get("userPrefGroupId");
-        if (UtilValidate.isNotEmpty(userPrefGroupId)) {
-            fieldMap.put("userPrefGroupId", userPrefGroupId);
+        String userPrefGroupTypeId = (String) context.get("userPrefGroupTypeId");
+        if (UtilValidate.isNotEmpty(userPrefGroupTypeId)) {
+            fieldMap.put("userPrefGroupTypeId", userPrefGroupTypeId);
         }
 
         Map<String, Object> userPrefMap = null;
@@ -106,7 +106,7 @@
 
     /**
      * Retrieves a group of user preferences from persistent storage. Call with
-     * userPrefGroupId and optional userLoginId. If userLoginId isn't
+     * userPrefGroupTypeId and optional userLoginId. If userLoginId isn't
      * specified, then the currently logged-in user's userLoginId will be
      * used. The retrieved preferences group is contained in the <b>userPrefMap</b> element.
      * @param ctx The DispatchContext that this service is operating in.
@@ -120,15 +120,15 @@
         }
         GenericDelegator delegator = ctx.getDelegator();
 
-        String userPrefGroupId = (String) context.get("userPrefGroupId");
-        if (UtilValidate.isEmpty(userPrefGroupId)) {
+        String userPrefGroupTypeId = (String) context.get("userPrefGroupTypeId");
+        if (UtilValidate.isEmpty(userPrefGroupTypeId)) {
             return ServiceUtil.returnError(UtilProperties.getMessage(resource, "getPreference.invalidArgument", locale));
         }
         String userLoginId = PreferenceWorker.getUserLoginId(context, true);
 
         Map<String, Object> userPrefMap = null;
         try {
-            Map<String, String> fieldMap = UtilMisc.toMap("userLoginId", "_NA_", "userPrefGroupId", userPrefGroupId);
+            Map<String, String> fieldMap = UtilMisc.toMap("userLoginId", "_NA_", "userPrefGroupTypeId", userPrefGroupTypeId);
             userPrefMap = PreferenceWorker.createUserPrefMap(delegator.findByAnd("UserPreference", fieldMap));
             fieldMap.put("userLoginId", userLoginId);
             userPrefMap.putAll(PreferenceWorker.createUserPrefMap(delegator.findByAnd("UserPreference", fieldMap)));
@@ -147,7 +147,7 @@
 
     /**
      * Stores a single user preference in persistent storage. Call with
-     * userPrefTypeId, userPrefGroupId, userPrefValue and optional userLoginId.
+     * userPrefTypeId, userPrefGroupTypeId, userPrefValue and optional userLoginId.
      * If userLoginId isn't specified, then the currently logged-in user's
      * userLoginId will be used.
      * @param ctx The DispatchContext that this service is operating in.
@@ -164,14 +164,14 @@
         if (UtilValidate.isEmpty(userLoginId) || UtilValidate.isEmpty(userPrefTypeId) || userPrefValue == null) {
             return ServiceUtil.returnError(UtilProperties.getMessage(resource, "setPreference.invalidArgument", locale));
         }
-        String userPrefGroupId = (String) context.get("userPrefGroupId");
+        String userPrefGroupTypeId = (String) context.get("userPrefGroupTypeId");
         String userPrefDataType = (String) context.get("userPrefDataType");
 
         try {
             if (UtilValidate.isNotEmpty(userPrefDataType)) {
                 userPrefValue = ObjectType.simpleTypeConvert(userPrefValue, userPrefDataType, null, null, false);
             }
-            GenericValue rec = delegator.makeValidValue("UserPreference", PreferenceWorker.toFieldMap(userLoginId, userPrefTypeId, userPrefGroupId, userPrefValue));
+            GenericValue rec = delegator.makeValidValue("UserPreference", PreferenceWorker.toFieldMap(userLoginId, userPrefTypeId, userPrefGroupTypeId, userPrefValue));
             delegator.createOrStore(rec);
         } catch (GenericEntityException e) {
             Debug.logWarning(e.getMessage(), module);
@@ -186,7 +186,7 @@
 
     /**
      * Stores a user preference group in persistent storage. Call with
-     * userPrefMap, userPrefGroupId and optional userLoginId. If userLoginId
+     * userPrefMap, userPrefGroupTypeId and optional userLoginId. If userLoginId
      * isn't specified, then the currently logged-in user's userLoginId will be
      * used.
      * @param ctx The DispatchContext that this service is operating in.
@@ -199,15 +199,15 @@
 
         String userLoginId = PreferenceWorker.getUserLoginId(context, false);
         Map<String, Object> userPrefMap = checkMap(context.get("userPrefMap"), String.class, Object.class);
-        String userPrefGroupId = (String) context.get("userPrefGroupId");
-        if (UtilValidate.isEmpty(userLoginId) || UtilValidate.isEmpty(userPrefGroupId) || userPrefMap == null) {
+        String userPrefGroupTypeId = (String) context.get("userPrefGroupTypeId");
+        if (UtilValidate.isEmpty(userLoginId) || UtilValidate.isEmpty(userPrefGroupTypeId) || userPrefMap == null) {
             return ServiceUtil.returnError(UtilProperties.getMessage(resource, "setPreference.invalidArgument", locale));
         }
 
         try {
             for (Iterator i = userPrefMap.entrySet().iterator(); i.hasNext();) {
                 Map.Entry mapEntry = (Map.Entry) i.next();
-                GenericValue rec = delegator.makeValidValue("UserPreference", PreferenceWorker.toFieldMap(userLoginId, (String) mapEntry.getKey(), userPrefGroupId, (String) mapEntry.getValue()));
+                GenericValue rec = delegator.makeValidValue("UserPreference", PreferenceWorker.toFieldMap(userLoginId, (String) mapEntry.getKey(), userPrefGroupTypeId, (String) mapEntry.getValue()));
                 delegator.createOrStore(rec);
             }
         } catch (GenericEntityException e) {
@@ -223,7 +223,7 @@
 
     /**
      * Copies a user preference group. Call with
-     * fromUserLoginId, userPrefGroupId and optional userLoginId. If userLoginId
+     * fromUserLoginId, userPrefGroupTypeId and optional userLoginId. If userLoginId
      * isn't specified, then the currently logged-in user's userLoginId will be
      * used.
      * @param ctx The DispatchContext that this service is operating in.
@@ -236,13 +236,13 @@
 
         String userLoginId = PreferenceWorker.getUserLoginId(context, false);
         String fromUserLoginId = (String) context.get("fromUserLoginId");
-        String userPrefGroupId = (String) context.get("userPrefGroupId");
-        if (UtilValidate.isEmpty(userLoginId) || UtilValidate.isEmpty(userPrefGroupId) || UtilValidate.isEmpty(fromUserLoginId)) {
+        String userPrefGroupTypeId = (String) context.get("userPrefGroupTypeId");
+        if (UtilValidate.isEmpty(userLoginId) || UtilValidate.isEmpty(userPrefGroupTypeId) || UtilValidate.isEmpty(fromUserLoginId)) {
             return ServiceUtil.returnError(UtilProperties.getMessage(resource, "copyPreference.invalidArgument", locale));
         }
 
         try {
-            Map<String, String> fieldMap = UtilMisc.toMap("userLoginId", fromUserLoginId, "userPrefGroupId", userPrefGroupId);
+            Map<String, String> fieldMap = UtilMisc.toMap("userLoginId", fromUserLoginId, "userPrefGroupTypeId", userPrefGroupTypeId);
             List<GenericValue> resultList = delegator.findByAnd("UserPreference", fieldMap);
             if (resultList != null) {
                 for (GenericValue preference: resultList) {

Modified: ofbiz/trunk/framework/common/src/org/ofbiz/common/preferences/PreferenceWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/src/org/ofbiz/common/preferences/PreferenceWorker.java?rev=712366&r1=712365&r2=712366&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/src/org/ofbiz/common/preferences/PreferenceWorker.java (original)
+++ ofbiz/trunk/framework/common/src/org/ofbiz/common/preferences/PreferenceWorker.java Sat Nov  8 00:59:31 2008
@@ -241,15 +241,15 @@
      * Creates a field Map to be used in GenericValue create or store methods.
      * @param userLoginId The user's login ID
      * @param userPrefTypeId The preference ID
-     * @param userPrefGroupId The preference group ID (may be null or empty)
+     * @param userPrefGroupTypeId The preference group ID (may be null or empty)
      * @param userPrefValue The preference value (will be converted to java.lang.String data type)
      * @throws GeneralException
      * @return field map
      */
-    public static Map<String, Object> toFieldMap(String userLoginId, String userPrefTypeId, String userPrefGroupId, Object userPrefValue) throws GeneralException {
+    public static Map<String, Object> toFieldMap(String userLoginId, String userPrefTypeId, String userPrefGroupTypeId, Object userPrefValue) throws GeneralException {
         Map<String, Object> fieldMap = UtilMisc.toMap("userLoginId", userLoginId, "userPrefTypeId", userPrefTypeId, "userPrefValue", ObjectType.simpleTypeConvert(userPrefValue, "String", null, null, false));
-        if (UtilValidate.isNotEmpty(userPrefGroupId)) {
-            fieldMap.put("userPrefGroupId", userPrefGroupId);
+        if (UtilValidate.isNotEmpty(userPrefGroupTypeId)) {
+            fieldMap.put("userPrefGroupTypeId", userPrefGroupTypeId);
         }
         String valueDataType = userPrefValue.getClass().getName();
         if (!"java.lang.String".equals(valueDataType)) {

Modified: ofbiz/trunk/framework/common/webcommon/includes/header.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/webcommon/includes/header.ftl?rev=712366&r1=712365&r2=712366&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/webcommon/includes/header.ftl (original)
+++ ofbiz/trunk/framework/common/webcommon/includes/header.ftl Sat Nov  8 00:59:31 2008
@@ -113,7 +113,7 @@
         </li>
         <li>${nowTimestamp?datetime?string.short}</li>
         <li class="control-area">
-          <p class="collapsed"><a href="setUserPreference?userPrefGroupId=GLOBAL_PREFERENCES&amp;userPrefTypeId=COMPACT_HEADER&amp;userPrefValue=N">&nbsp;&nbsp;</a></p>
+          <p class="collapsed"><a href="setUserPreference?userPrefGroupTypeId=GLOBAL_PREFERENCES&amp;userPrefTypeId=COMPACT_HEADER&amp;userPrefValue=N">&nbsp;&nbsp;</a></p>
         </li>
       <#else>
         <#if layoutSettings.headerImageUrl?exists>
@@ -130,7 +130,7 @@
           <#if userLogin?exists>
             <p class="expanded">
               <a href="<@o...@ofbizUrl>" class="buttontext">${uiLabelMap.VisualThemes}</a>
-              <a href="setUserPreference?userPrefGroupId=GLOBAL_PREFERENCES&amp;userPrefTypeId=COMPACT_HEADER&amp;userPrefValue=Y">&nbsp;&nbsp;</a>
+              <a href="setUserPreference?userPrefGroupTypeId=GLOBAL_PREFERENCES&amp;userPrefTypeId=COMPACT_HEADER&amp;userPrefValue=Y">&nbsp;&nbsp;</a>
             </p>
           </#if>
           <p>

Modified: ofbiz/trunk/framework/common/webcommon/includes/listVisualThemes.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/webcommon/includes/listVisualThemes.ftl?rev=712366&r1=712365&r2=712366&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/webcommon/includes/listVisualThemes.ftl (original)
+++ ofbiz/trunk/framework/common/webcommon/includes/listVisualThemes.ftl Sat Nov  8 00:59:31 2008
@@ -41,8 +41,8 @@
         <tr<#if visualTheme.visualThemeId == visualThemeId> class="selected"</#if>>
           <td>
             <#-- Not too sure about displaying the theme ID - it might confuse the users -->
-            <#-- <a href="<@o...@ofbizUrl>">${visualTheme.description} [${visualTheme.visualThemeId}]</a> -->
-            <a href="<@o...@ofbizUrl>">${visualTheme.description}</a>
+            <#-- <a href="<@o...@ofbizUrl>">${visualTheme.description} [${visualTheme.visualThemeId}]</a> -->
+            <a href="<@o...@ofbizUrl>">${visualTheme.description}</a>
           </td>
           <td>
             <#if visualTheme.visualThemeId == visualThemeId>${uiLabelMap.VisualThemeSelected}<#else>&nbsp;</#if>

Modified: ofbiz/trunk/framework/common/widget/CommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/widget/CommonScreens.xml?rev=712366&r1=712365&r2=712366&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/widget/CommonScreens.xml (original)
+++ ofbiz/trunk/framework/common/widget/CommonScreens.xml Sat Nov  8 00:59:31 2008
@@ -121,7 +121,7 @@
                 <set field="layoutSettings.javaScripts[]" value="/images/calendar_date_select.js" global="true"/>
                 <set field="layoutSettings.commonHeaderImageLinkUrl" from-field="layoutSettings.commonHeaderImageLinkUrl" default-value="main" global="true"/>
                 <service service-name="getUserPreferenceGroup">
-                    <field-map field-name="userPrefGroupId" value="GLOBAL_PREFERENCES"/>
+                    <field-map field-name="userPrefGroupTypeId" value="GLOBAL_PREFERENCES"/>
                 </service>
                 <set field="userPreferences" from-field="userPrefMap" global="true"/>
                 <set field="visualThemeId" from-field="userPreferences.VISUAL_THEME" default-value="DEFAULT" global="true"/>

Modified: ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/LoginWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/LoginWorker.java?rev=712366&r1=712365&r2=712366&view=diff
==============================================================================
--- ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/LoginWorker.java (original)
+++ ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/LoginWorker.java Sat Nov  8 00:59:31 2008
@@ -393,7 +393,7 @@
                 javaScriptEnabled = "Y";
             }
             try {
-                result = dispatcher.runSync("setUserPreference", UtilMisc.toMap("userPrefTypeId", "javaScriptEnabled", "userPrefGroupId", "GLOBAL_PREFS", "userPrefValue", javaScriptEnabled, "userLogin", userLogin));
+                result = dispatcher.runSync("setUserPreference", UtilMisc.toMap("userPrefTypeId", "javaScriptEnabled", "userPrefGroupTypeId", "GLOBAL_PREFS", "userPrefValue", javaScriptEnabled, "userLogin", userLogin));
             } catch (GenericServiceException e) {
                 Debug.logError(e, "Error setting user preference", module);
             }
@@ -437,7 +437,7 @@
         String javaScriptEnabled = null;
         try {
             LocalDispatcher dispatcher = (LocalDispatcher) request.getAttribute("dispatcher");
-            Map<String, Object> result = dispatcher.runSync("getUserPreference", UtilMisc.toMap("userPrefTypeId", "javaScriptEnabled", "userPrefGroupId", "GLOBAL_PREFS", "userLogin", userLogin));
+            Map<String, Object> result = dispatcher.runSync("getUserPreference", UtilMisc.toMap("userPrefTypeId", "javaScriptEnabled", "userPrefGroupTypeId", "GLOBAL_PREFS", "userLogin", userLogin));
             javaScriptEnabled = (String) result.get("userPrefValue");
         } catch (GenericServiceException e) {
             Debug.logError(e, "Error getting user preference", module);

Modified: ofbiz/trunk/specialpurpose/mypage/data/MyPageTypeData.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/mypage/data/MyPageTypeData.xml?rev=712366&r1=712365&r2=712366&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/mypage/data/MyPageTypeData.xml (original)
+++ ofbiz/trunk/specialpurpose/mypage/data/MyPageTypeData.xml Sat Nov  8 00:59:31 2008
@@ -21,13 +21,13 @@
 
     <WorkEffortType description="Company Events" hasTable="N" parentTypeId="EVENT" workEffortTypeId="COMPANY_EVENT"/>
     
-    <UserPrefGroupType userPrefGroupId="MyPage" description="User settings of the MyPage component"/>
-    <UserPreference userLoginId="_NA_" userPrefGroupId="MyPage" userPrefTypeId="myTasks" userPrefValue="Y"/> 
-    <UserPreference userLoginId="_NA_" userPrefGroupId="MyPage" userPrefTypeId="myTimesheet" userPrefValue="Y"/> 
-    <UserPreference userLoginId="_NA_" userPrefGroupId="MyPage" userPrefTypeId="myCommunications" userPrefValue="Y"/> 
-    <UserPreference userLoginId="_NA_" userPrefGroupId="MyPage" userPrefTypeId="otherCommunications" userPrefValue="Y"/> 
-    <UserPreference userLoginId="_NA_" userPrefGroupId="MyPage" userPrefTypeId="myCompanyComms" userPrefValue="Y"/> 
-    <UserPreference userLoginId="_NA_" userPrefGroupId="MyPage" userPrefTypeId="sendCustRequestEmail" userPrefValue="Y"/>
+    <UserPrefGroupType userPrefGroupTypeId="MyPage" description="User settings of the MyPage component"/>
+    <UserPreference userLoginId="_NA_" userPrefGroupTypeId="MyPage" userPrefTypeId="myTasks" userPrefValue="Y"/> 
+    <UserPreference userLoginId="_NA_" userPrefGroupTypeId="MyPage" userPrefTypeId="myTimesheet" userPrefValue="Y"/> 
+    <UserPreference userLoginId="_NA_" userPrefGroupTypeId="MyPage" userPrefTypeId="myCommunications" userPrefValue="Y"/> 
+    <UserPreference userLoginId="_NA_" userPrefGroupTypeId="MyPage" userPrefTypeId="otherCommunications" userPrefValue="Y"/> 
+    <UserPreference userLoginId="_NA_" userPrefGroupTypeId="MyPage" userPrefTypeId="myCompanyComms" userPrefValue="Y"/> 
+    <UserPreference userLoginId="_NA_" userPrefGroupTypeId="MyPage" userPrefTypeId="sendCustRequestEmail" userPrefValue="Y"/>
     
     <RoleType description="Email Administrator" hasTable="N" parentTypeId="PERSON_ROLE" roleTypeId="EMAIL_ADMIN"/>
 

Modified: ofbiz/trunk/specialpurpose/mypage/script/org/ofbiz/mypage/MyPageServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/mypage/script/org/ofbiz/mypage/MyPageServices.xml?rev=712366&r1=712365&r2=712366&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/mypage/script/org/ofbiz/mypage/MyPageServices.xml (original)
+++ ofbiz/trunk/specialpurpose/mypage/script/org/ofbiz/mypage/MyPageServices.xml Sat Nov  8 00:59:31 2008
@@ -45,7 +45,7 @@
                         </entity-one>
                         <set field="setUserPref.userLoginId" from-field="userLogin.userLoginId"/>
                         <set field="setUserPref.userLogin" from-field="userLogin"/>
-                        <set field="setUserPref.userPrefGroupId" value="MyPage"/>
+                        <set field="setUserPref.userPrefGroupTypeId" value="MyPage"/>
                         <call-service service-name="setUserPreferenceGroup" in-map-name="setUserPref" include-user-login="false"/>
                     </if-empty>
                     <!-- if customer want to send email notification when customer request completed then send email-->
@@ -122,4 +122,4 @@
             </then>
         </if>
     </simple-method>
-</simple-methods>
\ No newline at end of file
+</simple-methods>

Modified: ofbiz/trunk/specialpurpose/mypage/widget/CommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/mypage/widget/CommonScreens.xml?rev=712366&r1=712365&r2=712366&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/mypage/widget/CommonScreens.xml (original)
+++ ofbiz/trunk/specialpurpose/mypage/widget/CommonScreens.xml Sat Nov  8 00:59:31 2008
@@ -55,7 +55,7 @@
                     <condition><not><if-empty field-name="userLogin"/></not></condition>
                     <actions>
                         <service service-name="getUserPreferenceGroup" result-map-name="preferences">
-                            <field-map field-name="userPrefGroupId" value="MyPage" />
+                            <field-map field-name="userPrefGroupTypeId" value="MyPage" />
                         </service>
                     </actions>
                     <widgets/>
@@ -199,7 +199,7 @@
             <actions>
                 <service service-name="getUserPreferenceGroup"
                     result-map-name="preferences">
-                    <field-map field-name="userPrefGroupId" value="MyPage" />
+                    <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">
@@ -328,7 +328,7 @@
                     <order-by field-name="-datetimeStarted" />
                 </entity-condition>
                 <service service-name="getUserPreferenceGroup" result-map-name="preferences">
-                    <field-map field-name="userPrefGroupId" value="MyPage" />
+                    <field-map field-name="userPrefGroupTypeId" value="MyPage" />
                 </service>
             </actions>
             <widgets>
@@ -384,7 +384,7 @@
                 <set field="headerItem" value="preferences"/>
                                 <service service-name="getUserPreferenceGroup"
                     result-map-name="preferences">
-                    <field-map field-name="userPrefGroupId" value="MyPage" />
+                    <field-map field-name="userPrefGroupTypeId" value="MyPage" />
                 </service>
             </actions>
             <widgets>
@@ -497,7 +497,7 @@
                 <set field="headerItem" value="custPreferences"/>
                 <service service-name="getUserPreferenceGroup"
                         result-map-name="preferences">
-                        <field-map field-name="userPrefGroupId" value="MyPage" />
+                        <field-map field-name="userPrefGroupTypeId" value="MyPage" />
                     </service>
             </actions>
             <widgets>

Modified: ofbiz/trunk/specialpurpose/mypage/widget/MyPageForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/mypage/widget/MyPageForms.xml?rev=712366&r1=712365&r2=712366&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/mypage/widget/MyPageForms.xml (original)
+++ ofbiz/trunk/specialpurpose/mypage/widget/MyPageForms.xml Sat Nov  8 00:59:31 2008
@@ -81,7 +81,7 @@
     </form>
 
     <form name="preferences" type="single" target="updatePreferences" default-map-name="preferences.userPrefMap">
-        <field name="userPrefGroupId"><hidden value="MyPage"/></field>
+        <field name="userPrefGroupTypeId"><hidden value="MyPage"/></field>
         <field name="myCommunications"><check/></field>
         <field name="otherCommunications"><check/></field>
         <field name="myCompanyComms"><check/></field>
@@ -91,7 +91,7 @@
     </form>
     
     <form name="custPreferences" type="single" target="updateCustPreferences" default-map-name="preferences.userPrefMap">
-        <field name="userPrefGroupId"><hidden value="MyPage"/></field>
+        <field name="userPrefGroupTypeId"><hidden value="MyPage"/></field>
         <field name="sendCustRequestEmail" title="Send Email To Every Customer Request Change"><check/></field>
         <field name="updateButton"><submit/></field>
     </form>
@@ -292,4 +292,4 @@
         <field name="task"><display description="${workEffortName}"/></field>
     </form>
     
-</forms>
\ No newline at end of file
+</forms>