You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by le...@apache.org on 2008/06/14 08:03:15 UTC

svn commit: r667748 [4/16] - in /ofbiz/trunk: applications/accounting/script/org/ofbiz/accounting/agreement/ applications/accounting/script/org/ofbiz/accounting/cost/ applications/accounting/script/org/ofbiz/accounting/finaccount/ applications/accounti...

Modified: ofbiz/trunk/applications/content/script/org/ofbiz/content/data/DataServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/script/org/ofbiz/content/data/DataServices.xml?rev=667748&r1=667747&r2=667748&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/script/org/ofbiz/content/data/DataServices.xml (original)
+++ ofbiz/trunk/applications/content/script/org/ofbiz/content/data/DataServices.xml Fri Jun 13 23:03:12 2008
@@ -26,7 +26,7 @@
         <set-nonpk-fields map-name="parameters" value-name="newEntity"/>
         <set-pk-fields map-name="parameters" value-name="newEntity"/>
 
-        <if-empty field-name="newEntity.dataResourceId">
+        <if-empty field="newEntity.dataResourceId">
             <sequenced-id-to-env sequence-name="DataResource" env-name="dataResourceId"/>
             <set field="newEntity.dataResourceId" from-field="dataResourceId"/>
         </if-empty>
@@ -37,11 +37,11 @@
         <set field="newEntity.lastModifiedDate" from-field="nowTimestamp"/>
         <set field="newEntity.createdDate" from-field="nowTimestamp"/>
 
-        <if-empty field-name="parameters.dataTemplateTypeId">
+        <if-empty field="parameters.dataTemplateTypeId">
             <set field="newEntity.dataTemplateTypeId" value="NONE"/>
         </if-empty>
 
-        <if-empty field-name="content.statusId">
+        <if-empty field="content.statusId">
             <!-- get the first status item -->
             <entity-and entity-name="StatusItem" list-name="contentStatus">
                 <field-map field-name="statusTypeId" value="CONTENT_STATUS"/>
@@ -167,7 +167,7 @@
         <set-nonpk-fields map-name="parameters" value-name="newEntity"/>
         <set-pk-fields map-name="parameters" value-name="newEntity"/>
 
-        <if-empty field-name="newEntity.fromDate">
+        <if-empty field="newEntity.fromDate">
             <now-timestamp-to-env env-name="nowTimestamp"/>
             <set field="newEntity.fromDate" from-field="nowTimestamp"/>
         </if-empty>
@@ -508,20 +508,20 @@
         <set field="currentContent" from-field="parameters.content" />
         <log level="always" message="GETELECTRONICTEXT, currentContent:${currentContent}"/>
         
-        <if-empty field-name="currentContent">
-            <if-not-empty field-name="contentId" map-name="parameters">
+        <if-empty field="currentContent">
+            <if-not-empty field="parameters.contentId">
                 <set field="contextA.contentId" from-field="parameters.contentId" />
                 <find-by-primary-key value-name="currentContent" entity-name="Content"
                          map-name="contextA" use-cache="true" />
             </if-not-empty>
-            <if-empty field-name="currentContent" >
+            <if-empty field="currentContent">
                 <add-error>
                     <fail-message message="Neither content nor contentId supplied." />
                 </add-error>
             </if-empty>
         </if-empty>
         <check-errors/>
-        <if-empty field-name="dataResourceId" map-name="currentContent">
+        <if-empty field="currentContent.dataResourceId">
                 <add-error>
                     <fail-message message="No dataResourceId found" />
                 </add-error>
@@ -531,7 +531,7 @@
         <set field="contextB.dataResourceId" from-field="currentContent.dataResourceId" />
         <find-by-primary-key value-name="eText" entity-name="ElectronicText"
                          map-name="contextB" use-cache="true" />
-        <if-empty field-name="eText" >
+        <if-empty field="eText">
                 <add-error>
                     <fail-message message="Electronic Text not found." />
                 </add-error>
@@ -547,16 +547,16 @@
     <simple-method method-name="attachUploadToDataResource" short-description="Attach an uploaded file to a data resource">
         <set field="isUpdate" value="false"/>
         <property-to-field resource="content.properties" property="content.upload.always.local.file" field-name="forceLocal"/>
-        <if-compare field-name="forceLocal" value="true" operator="equals">
+        <if-compare field="forceLocal" value="true" operator="equals">
             <set field="parameters.dataResourceTypeId" value="LOCAL_FILE"/>
         </if-compare>
         
-        <if-empty field-name="parameters.dataResourceTypeId">
+        <if-empty field="parameters.dataResourceTypeId">
             <!-- create default behavior -->
             <if>
                 <condition>
                     <not>
-                        <if-empty field-name="parameters._uploadedFile_contentType"/>
+                        <if-empty field="parameters._uploadedFile_contentType"/>
                     </not>
                 </condition>
                 <then>
@@ -594,49 +594,49 @@
             </if>
         </if-empty>
 
-        <if-compare field-name="parameters.dataResourceTypeId" value="LOCAL_FILE" operator="equals">
+        <if-compare field="parameters.dataResourceTypeId" value="LOCAL_FILE" operator="equals">
             <call-simple-method method-name="saveLocalFileDateResource"/>
             <return/>
         </if-compare>
 
-        <if-compare field-name="parameters.dataResourceTypeId" value="IMAGE_OBJECT" operator="equals">
+        <if-compare field="parameters.dataResourceTypeId" value="IMAGE_OBJECT" operator="equals">
             <entity-one entity-name="ImageDataResource" value-name="dataResObj">
                 <field-map field-name="dataResourceId" env-name="parameters.dataResourceId"/>
             </entity-one>
-            <if-not-empty field-name="dataResObj">
+            <if-not-empty field="dataResObj">
                 <set field="isUpdate" value="true"/>
             </if-not-empty>
             <call-simple-method method-name="saveImageObjectDateResource"/>
             <return/>
         </if-compare>
 
-        <if-compare field-name="parameters.dataResourceTypeId" value="VIDEO_OBJECT" operator="equals">
+        <if-compare field="parameters.dataResourceTypeId" value="VIDEO_OBJECT" operator="equals">
             <entity-one entity-name="VideoDataResource" value-name="dataResObj">
                 <field-map field-name="dataResourceId" env-name="parameters.dataResourceId"/>
             </entity-one>
-            <if-not-empty field-name="dataResObj">
+            <if-not-empty field="dataResObj">
                 <set field="isUpdate" value="true"/>
             </if-not-empty>
             <call-simple-method method-name="saveVideoObjectDateResource"/>
             <return/>
         </if-compare>
 
-        <if-compare field-name="parameters.dataResourceTypeId" value="AUDIO_OBJECT" operator="equals">
+        <if-compare field="parameters.dataResourceTypeId" value="AUDIO_OBJECT" operator="equals">
             <entity-one entity-name="AudioDataResource" value-name="dataResObj">
                 <field-map field-name="dataResourceId" env-name="parameters.dataResourceId"/>
             </entity-one>
-            <if-not-empty field-name="dataResObj">
+            <if-not-empty field="dataResObj">
                 <set field="isUpdate" value="true"/>
             </if-not-empty>
             <call-simple-method method-name="saveAudioObjectDateResource"/>
             <return/>
         </if-compare>
 
-        <if-compare field-name="parameters.dataResourceTypeId" value="OTHER_OBJECT" operator="equals">
+        <if-compare field="parameters.dataResourceTypeId" value="OTHER_OBJECT" operator="equals">
             <entity-one entity-name="OtherDataResource" value-name="dataResObj">
                 <field-map field-name="dataResourceId" env-name="parameters.dataResourceId"/>
             </entity-one>
-            <if-not-empty field-name="dataResObj">
+            <if-not-empty field="dataResObj">
                 <set field="isUpdate" value="true"/>
             </if-not-empty>
             <call-simple-method method-name="saveOtherObjectDateResource"/>
@@ -652,19 +652,19 @@
         <entity-one entity-name="DataResource" value-name="dataResource">
             <field-map field-name="dataResourceId" env-name="parameters.dataResourceId"/>
         </entity-one>
-        <if-empty field-name="dataResource">
+        <if-empty field="dataResource">
             <add-error><fail-message message="No data resource found for ID: [$parameters.dataResourceId}]"/></add-error>
         </if-empty>
         <if>
             <condition>
-                <if-empty field-name="_uploadedFile_fileName" map-name="parameters"/>
+                <if-empty field="parameters._uploadedFile_fileName"/>
             </condition>
             <then>
                 <if>
                     <condition>
                         <or>
-                            <if-empty field-name="isUpdate"/>
-                            <if-compare field-name="isUpdate" value="Y" operator="not-equals"/>
+                            <if-empty field="isUpdate"/>
+                            <if-compare field="isUpdate" value="Y" operator="not-equals"/>
                         </or>
                     </condition>
                     <then>
@@ -692,7 +692,7 @@
         <set from-field="parameters._uploadedFile_fileName" field="dataResource.dataResourceName"/>
         <set from-field="parameters._uploadedFile_contentType" field="dataResource.mimeTypeId"/>
         <set value="${uploadPath}/${dataResource.dataResourceId}" field="dataResource.objectInfo"/>
-        <if-not-empty field-name="extension">
+        <if-not-empty field="extension">
             <set value="${uploadPath}/${dataResource.dataResourceId}.${extension.fileExtensionId}" field="dataResource.objectInfo"/>
         </if-not-empty>
         <set value="LOCAL_FILE" field="dataResource.dataResourceTypeId"/>
@@ -712,19 +712,19 @@
         <entity-one entity-name="DataResource" value-name="dataResource">
             <field-map field-name="dataResourceId" env-name="parameters.dataResourceId"/>
         </entity-one>
-        <if-empty field-name="dataResource">
+        <if-empty field="dataResource">
             <add-error><fail-message message="No data resource found for ID: [$parameters.dataResourceId}]"/></add-error>
         </if-empty>
         <if>
             <condition>
-                <if-empty field-name="_uploadedFile_fileName" map-name="parameters"/>
+                <if-empty field="parameters._uploadedFile_fileName"/>
             </condition>
             <then>
                 <if>
                     <condition>
                         <or>
-                            <if-empty field-name="isUpdate"/>
-                            <if-compare field-name="isUpdate" value="Y" operator="not-equals"/>
+                            <if-empty field="isUpdate"/>
+                            <if-compare field="isUpdate" value="Y" operator="not-equals"/>
                         </or>
                     </condition>
                     <then>
@@ -752,7 +752,7 @@
         <set-service-fields service-name="createOtherDataResource" map-name="dataResource" to-map-name="serviceContext"/>
         <set from-field="parameters.uploadedFile" field="serviceContext.dataResourceContent"/>        
 
-        <if-compare field-name="isUpdate" value="true" operator="equals">
+        <if-compare field="isUpdate" value="true" operator="equals">
             <call-service service-name="updateOtherDataResource" in-map-name="serviceContext"/>
             <else>
                 <call-service service-name="createOtherDataResource" in-map-name="serviceContext"/>
@@ -768,19 +768,19 @@
         <entity-one entity-name="DataResource" value-name="dataResource">
             <field-map field-name="dataResourceId" env-name="parameters.dataResourceId"/>
         </entity-one>
-        <if-empty field-name="dataResource">
+        <if-empty field="dataResource">
             <add-error><fail-message message="No data resource found for ID: [$parameters.dataResourceId}]"/></add-error>
         </if-empty>
         <if>
             <condition>
-                <if-empty field-name="_uploadedFile_fileName" map-name="parameters"/>
+                <if-empty field="parameters._uploadedFile_fileName"/>
             </condition>
             <then>
                 <if>
                     <condition>
                         <or>
-                            <if-empty field-name="isUpdate"/>
-                            <if-compare field-name="isUpdate" value="Y" operator="not-equals"/>
+                            <if-empty field="isUpdate"/>
+                            <if-compare field="isUpdate" value="Y" operator="not-equals"/>
                         </or>
                     </condition>
                     <then>
@@ -808,7 +808,7 @@
         <set-service-fields service-name="createImageDataResource" map-name="dataResource" to-map-name="serviceContext"/>
         <set from-field="parameters.uploadedFile" field="serviceContext.imageData"/>        
 
-        <if-compare field-name="isUpdate" value="true" operator="equals">
+        <if-compare field="isUpdate" value="true" operator="equals">
             <call-service service-name="updateImageDataResource" in-map-name="serviceContext"/>
             <else>
                 <call-service service-name="createImageDataResource" in-map-name="serviceContext"/>
@@ -824,19 +824,19 @@
         <entity-one entity-name="DataResource" value-name="dataResource">
             <field-map field-name="dataResourceId" env-name="parameters.dataResourceId"/>
         </entity-one>
-        <if-empty field-name="dataResource">
+        <if-empty field="dataResource">
             <add-error><fail-message message="No data resource found for ID: [$parameters.dataResourceId}]"/></add-error>
         </if-empty>
         <if>
             <condition>
-                <if-empty field-name="_uploadedFile_fileName" map-name="parameters"/>
+                <if-empty field="parameters._uploadedFile_fileName"/>
             </condition>
             <then>
                 <if>
                     <condition>
                         <or>
-                            <if-empty field-name="isUpdate"/>
-                            <if-compare field-name="isUpdate" value="Y" operator="not-equals"/>
+                            <if-empty field="isUpdate"/>
+                            <if-compare field="isUpdate" value="Y" operator="not-equals"/>
                         </or>
                     </condition>
                     <then>
@@ -864,7 +864,7 @@
         <set-service-fields service-name="createVideoDataResource" map-name="dataResource" to-map-name="serviceContext"/>
         <set from-field="parameters.uploadedFile" field="serviceContext.videoData"/>
 
-        <if-compare field-name="isUpdate" value="true" operator="equals">
+        <if-compare field="isUpdate" value="true" operator="equals">
             <call-service service-name="updateVideoDataResource" in-map-name="serviceContext"/>
             <else>
                 <call-service service-name="createVideoDataResource" in-map-name="serviceContext"/>
@@ -880,19 +880,19 @@
         <entity-one entity-name="DataResource" value-name="dataResource">
             <field-map field-name="dataResourceId" env-name="parameters.dataResourceId"/>
         </entity-one>
-        <if-empty field-name="dataResource">
+        <if-empty field="dataResource">
             <add-error><fail-message message="No data resource found for ID: [$parameters.dataResourceId}]"/></add-error>
         </if-empty>
         <if>
             <condition>
-                <if-empty field-name="_uploadedFile_fileName" map-name="parameters"/>
+                <if-empty field="parameters._uploadedFile_fileName"/>
             </condition>
             <then>
                 <if>
                     <condition>
                         <or>
-                            <if-empty field-name="isUpdate"/>
-                            <if-compare field-name="isUpdate" value="Y" operator="not-equals"/>
+                            <if-empty field="isUpdate"/>
+                            <if-compare field="isUpdate" value="Y" operator="not-equals"/>
                         </or>
                     </condition>
                     <then>
@@ -920,7 +920,7 @@
         <set-service-fields service-name="createAudioDataResource" map-name="dataResource" to-map-name="serviceContext"/>
         <set from-field="parameters.uploadedFile" field="serviceContext.audioData"/>
 
-        <if-compare field-name="isUpdate" value="true" operator="equals">
+        <if-compare field="isUpdate" value="true" operator="equals">
             <call-service service-name="updateAudioDataResource" in-map-name="serviceContext"/>
             <else>
                 <call-service service-name="createAudioDataResource" in-map-name="serviceContext"/>

Modified: ofbiz/trunk/applications/content/script/org/ofbiz/content/layout/LayoutEvents.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/script/org/ofbiz/content/layout/LayoutEvents.xml?rev=667748&r1=667747&r2=667748&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/script/org/ofbiz/content/layout/LayoutEvents.xml (original)
+++ ofbiz/trunk/applications/content/script/org/ofbiz/content/layout/LayoutEvents.xml Fri Jun 13 23:03:12 2008
@@ -40,7 +40,7 @@
             <result-to-field field-name="contentId" result-name="contentId"/>
             <result-to-field field-name="dataResourceId" result-name="dataResourceId"/>
         </call-service>
-        <if-empty field-name="contentId">
+        <if-empty field="contentId">
             <add-error>
                 <fail-message message="Permission not granted."/>
             </add-error>
@@ -66,7 +66,7 @@
         <call-service in-map-name="context" service-name="checkContentPermission">
             <result-to-field field-name="permissionStatus" result-name="permissionStatus"/>
         </call-service>
-        <if-compare field-name="permissionStatus" operator="not-equals" value="granted" type="String">
+        <if-compare field="permissionStatus" operator="not-equals" value="granted" type="String">
             <add-error>
                 <fail-message message="Permission not granted."/>
             </add-error>
@@ -127,7 +127,7 @@
 
         <set field="context2.contentIdTo" from-field="parameters.contentIdTo"/>
         <set field="context2.mapKey" from-field="parameters.mapKey"/>
-        <if-not-empty map-name="context2" field-name="activeContentId">
+        <if-not-empty field="context2.activeContentId">
             <call-service in-map-name="context2" service-name="deactivateAssocs">
                 <result-to-field field-name="deactivateList" result-name="deactivateList"/>
             </call-service>
@@ -223,7 +223,7 @@
 
         <set field="context2.contentIdTo" from-field="formInput.contentIdTo"/>
         <set field="context2.mapKey" from-field="formInput.mapKey"/>
-        <if-not-empty map-name="context2" field-name="activeContentId">
+        <if-not-empty field="context2.activeContentId">
             <call-service in-map-name="context2" service-name="deactivateAssocs">
                 <result-to-field field-name="deactivateList" result-name="deactivateList"/>
             </call-service>
@@ -281,7 +281,7 @@
 
         <set field="context2.contentIdTo" from-field="parameters.contentIdTo"/>
         <set field="context2.mapKey" from-field="parameters.mapKey"/>
-        <if-not-empty map-name="context2" field-name="activeContentId">
+        <if-not-empty field="context2.activeContentId">
             <call-service in-map-name="context2" service-name="deactivateAssocs">
                 <result-to-field field-name="deactivateList" result-name="deactivateList"/>
             </call-service>

Modified: ofbiz/trunk/applications/content/script/org/ofbiz/content/permission/ContentPermissionServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/script/org/ofbiz/content/permission/ContentPermissionServices.xml?rev=667748&r1=667747&r2=667748&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/script/org/ofbiz/content/permission/ContentPermissionServices.xml (original)
+++ ofbiz/trunk/applications/content/script/org/ofbiz/content/permission/ContentPermissionServices.xml Fri Jun 13 23:03:12 2008
@@ -41,9 +41,9 @@
         <if>
             <condition>
                 <and>
-                    <if-empty field-name="parameters.ownerContentId"/>
+                    <if-empty field="parameters.ownerContentId"/>
                     <not>
-                        <if-empty field-name="parameters.contentIdFrom"/>
+                        <if-empty field="parameters.contentIdFrom"/>
                     </not>
                 </and>
             </condition>
@@ -56,14 +56,14 @@
         <if>
             <condition>
                 <not>
-                    <if-compare field-name="hasPermission" value="true" type="Boolean" operator="equals"/>
+                    <if-compare field="hasPermission" value="true" type="Boolean" operator="equals"/>
                 </not>
             </condition>
             <then>
                 <if>
                     <!-- view content -->
                     <condition>
-                        <if-compare field-name="parameters.mainAction" value="VIEW" operator="equals"/>
+                        <if-compare field="parameters.mainAction" value="VIEW" operator="equals"/>
                     </condition>
                     <then>
                         <call-simple-method method-name="viewContentPermission"/>
@@ -71,11 +71,11 @@
                     <else-if>
                         <!-- create content -->
                         <condition>
-                            <if-compare field-name="parameters.mainAction" value="CREATE" operator="equals"/>
+                            <if-compare field="parameters.mainAction" value="CREATE" operator="equals"/>
                         </condition>
                         <then>
                             <!-- setup default operation -->
-                            <if-empty field-name="parameters.contentOperationId">
+                            <if-empty field="parameters.contentOperationId">
                                 <set field="contentOperationId" value="CONTENT_CREATE"/>
                             </if-empty>
                             <call-simple-method method-name="createContentPermission"/>
@@ -84,11 +84,11 @@
                     <else-if>
                         <!-- update content -->
                         <condition>
-                            <if-compare field-name="parameters.mainAction" value="UPDATE" operator="equals"/>
+                            <if-compare field="parameters.mainAction" value="UPDATE" operator="equals"/>
                         </condition>
                         <then>
                             <!-- setup default operation -->
-                            <if-empty field-name="parameters.contentOperationId">
+                            <if-empty field="parameters.contentOperationId">
                                 <set field="contentOperationId" value="CONTENT_UPDATE"/> 
                             </if-empty>
                             <call-simple-method method-name="updateContentPermission"/>
@@ -108,7 +108,7 @@
 
     <simple-method method-name="viewContentPermission" short-description="Check user can view content">
         <!-- if called directly check the main permission -->
-        <if-empty field-name="hasPermission">
+        <if-empty field="hasPermission">
             <set field="primaryPermission" value="CONTENTMGR"/>
             <set field="mainAction" value="VIEW"/>
             <call-simple-method method-name="genericBasePermissionCheck"
@@ -123,19 +123,19 @@
         <!-- must have the security permission to continue -->
         <if>
             <condition>
-                <if-compare field-name="hasPermission" value="true" type="Boolean" operator="equals"/>
+                <if-compare field="hasPermission" value="true" type="Boolean" operator="equals"/>
             </condition>
             <then>
                 <!-- if no operation is passed; we use the CONTENT_VIEW operation -->
-                <if-empty field-name="parameters.contentOperationId">
+                <if-empty field="parameters.contentOperationId">
                     <set field="parameters.contentOperationId" value="CONTENT_VIEW"/>
                 </if-empty>
 
 		        <!-- contentId is required for update checking -->
-		        <if-empty field-name="contentId">
+		        <if-empty field="contentId">
 		            <set field="contentId" from-field="parameters.contentId"/>
 		        </if-empty>
-		        <if-empty field-name="contentId">
+		        <if-empty field="contentId">
 		            <add-error><fail-message message="Content Permission Service VIEW requires a contentId!"/></add-error>
 		        </if-empty>
 		        <check-errors/>
@@ -156,7 +156,7 @@
 
     <simple-method method-name="createContentPermission" short-description="Check user can create new content">
         <!-- if called directly check the main permission -->
-        <if-empty field-name="hasPermission">
+        <if-empty field="hasPermission">
             <set field="primaryPermission" value="CONTENTMGR"/>
             <set field="mainAction" value="CREATE"/>
             <call-simple-method method-name="genericBasePermissionCheck"
@@ -164,17 +164,17 @@
         </if-empty>
 
         <!-- ownerContentId can be set from a calling method -->
-        <if-empty field-name="ownerContentId">
+        <if-empty field="ownerContentId">
             <set field="ownerContentId" from-field="parameters.ownerContentId"/>
         </if-empty>
 
         <!-- operation ID can be set from the calling method -->
-        <if-empty field-name="contentOperationId">
+        <if-empty field="contentOperationId">
             <set field="contentOperationId" from-field="parameters.contentOperationId"/>
         </if-empty>
 
         <!-- statusId can be set from the calling method -->
-        <if-empty field-name="statusId">
+        <if-empty field="statusId">
             <set field="statusId" from-field="parameters.statusId"/>
         </if-empty>
 
@@ -186,7 +186,7 @@
         <!-- must have the security permission to continue -->
         <if>
             <condition>
-                <if-compare field-name="hasPermission" value="true" type="Boolean" operator="equals"/>
+                <if-compare field="hasPermission" value="true" type="Boolean" operator="equals"/>
             </condition>
             <then>
                 <log level="verbose" message="Found necessary ROLE permission: ${primaryPermission}_${mainAction} :: ${contentOperationId}"/>
@@ -195,7 +195,7 @@
                 <if>
                     <condition>
                         <not>
-                            <if-empty field-name="contentOperationId"/>
+                            <if-empty field="contentOperationId"/>
                         </not>
                     </condition>
                     <then>
@@ -208,15 +208,15 @@
                 <if>
                     <condition>
                         <or>
-                            <if-empty field-name="contentOperationId"/>
-                            <if-compare field-name="hasPermission" value="false" type="Boolean" operator="equals"/>
+                            <if-empty field="contentOperationId"/>
+                            <if-compare field="hasPermission" value="false" type="Boolean" operator="equals"/>
                         </or>
                     </condition>
                     <then>
                         <if>
                             <condition>
                                 <not>
-                                    <if-empty field-name="ownerContentId"/>
+                                    <if-empty field="ownerContentId"/>
                                 </not>
                             </condition>
                             <then>
@@ -226,7 +226,7 @@
                                 <call-simple-method method-name="checkOwnership"/>
                                 <if>
                                     <condition>
-                                        <if-compare field-name="hasPermission" value="false" type="Boolean" operator="equals"/>
+                                        <if-compare field="hasPermission" value="false" type="Boolean" operator="equals"/>
                                     </condition>
                                     <then>
                                         <!-- no permission on this parent; check the parent's parent(s) -->
@@ -234,9 +234,9 @@
                                             <condition>
                                                 <!-- iterate until either we have permission or there are no more parents -->
                                                 <and>
-                                                    <if-compare field-name="hasPermission" value="false" type="Boolean" operator="equals"/>
+                                                    <if-compare field="hasPermission" value="false" type="Boolean" operator="equals"/>
                                                     <not>
-                                                        <if-empty field-name="checkId"/>
+                                                        <if-empty field="checkId"/>
                                                     </not>
                                                 </and>                                                 
                                             </condition>
@@ -247,7 +247,7 @@
                                                 <if>
                                                     <condition>
                                                         <not>
-                                                            <if-empty field-name="currentContent.ownerContentId"/>
+                                                            <if-empty field="currentContent.ownerContentId"/>
                                                         </not>
                                                     </condition>
                                                     <then>
@@ -278,7 +278,7 @@
 
     <simple-method method-name="updateContentPermission" short-description="Check user can update existing content">
         <!-- if called directly check the main permission -->
-        <if-empty field-name="hasPermission">
+        <if-empty field="hasPermission">
             <set field="primaryPermission" value="CONTENTMGR"/>
             <set field="mainAction" value="UPDATE"/>
             <call-simple-method method-name="genericBasePermissionCheck"
@@ -286,21 +286,21 @@
         </if-empty>
 
         <!-- contentId is required for update checking -->
-        <if-empty field-name="contentId">
+        <if-empty field="contentId">
             <set field="contentId" from-field="parameters.contentId"/>
         </if-empty>
-        <if-empty field-name="contentId">
+        <if-empty field="contentId">
             <add-error><fail-message message="Content Permission Service UPDATE requires a contentId!"/></add-error>
         </if-empty>
         <check-errors/>
 
         <!-- ownerContentId can be set from a calling method -->
-        <if-empty field-name="ownerContentId">
+        <if-empty field="ownerContentId">
             <set field="ownerContentId" from-field="parameters.ownerContentId"/>
         </if-empty>
 
         <!-- operation ID can be set from the calling method -->
-        <if-empty field-name="contentOperationId">
+        <if-empty field="contentOperationId">
             <set field="contentOperationId" from-field="parameters.contentOperationId"/>
         </if-empty>
 
@@ -312,7 +312,7 @@
         <!-- must have permission to continue -->
         <if>
             <condition>
-                <if-compare field-name="hasPermission" value="true" type="Boolean" operator="equals"/>
+                <if-compare field="hasPermission" value="true" type="Boolean" operator="equals"/>
             </condition>
             <then>
                 <log level="verbose" message="Found necessary ROLE permission: ${primaryPermission}_${mainAction}"/>
@@ -321,7 +321,7 @@
                 <entity-one entity-name="Content" value-name="thisContent">
                     <field-map field-name="contentId"/>
                 </entity-one>
-                <if-empty field-name="thisContent">
+                <if-empty field="thisContent">
                     <add-error><fail-message message="Content record not found for ID [${contentId}]"/></add-error>
                     <check-errors/>
                 </if-empty>
@@ -330,7 +330,7 @@
                 <if>
                     <condition>
                         <not>
-                            <if-empty field-name="contentOperationId"/>
+                            <if-empty field="contentOperationId"/>
                         </not>
                     </condition>
                     <then>
@@ -344,8 +344,8 @@
                 <if>
                     <condition>
                         <or>
-                            <if-empty field-name="contentOperationId"/>
-                            <if-compare field-name="hasPermission" value="false" type="Boolean" operator="equals"/>
+                            <if-empty field="contentOperationId"/>
+                            <if-compare field="hasPermission" value="false" type="Boolean" operator="equals"/>
                         </or>
                     </condition>
 
@@ -360,9 +360,9 @@
                             <condition>
                                 <and>
                                     <not>
-                                        <if-empty field-name="ownerContentId"/>
+                                        <if-empty field="ownerContentId"/>
                                     </not>
-                                    <if-compare-field field-name="ownerContentId" operator="not-equals" to-field-name="ownerContentId" map-name="thisContent"/>
+                                    <if-compare-field field="thisContent.ownerContentId" to-field="ownerContentId" operator="not-equals"/>
                                 </and>
                             </condition>
                             <then>
@@ -371,7 +371,7 @@
                                 <call-simple-method method-name="checkOwnership"/>
                                 <if>
                                     <condition>
-                                        <if-compare field-name="hasPermission" value="false" type="Boolean" operator="equals"/>
+                                        <if-compare field="hasPermission" value="false" type="Boolean" operator="equals"/>
                                     </condition>
                                     <then>
                                         <!-- no permission on this parent; check the parent's parent(s) -->
@@ -379,9 +379,9 @@
                                             <condition>
                                                 <!-- iterate until either we have permission or there are no more parents -->
                                                 <and>
-                                                    <if-compare field-name="hasPermission" value="false" type="Boolean" operator="equals"/>
+                                                    <if-compare field="hasPermission" value="false" type="Boolean" operator="equals"/>
                                                     <not>
-                                                        <if-empty field-name="checkId"/>
+                                                        <if-empty field="checkId"/>
                                                     </not>
                                                 </and>
                                             </condition>
@@ -392,7 +392,7 @@
                                                 <if>
                                                     <condition>
                                                         <not>
-                                                            <if-empty field-name="currentContent.ownerContentId"/>
+                                                            <if-empty field="currentContent.ownerContentId"/>
                                                         </not>
                                                     </condition>
                                                     <then>
@@ -423,14 +423,14 @@
         <!-- resetting the permission flag -->
         <set field="hasPermission" type="Boolean" value="false"/>
 
-        <if-empty field-name="contentOperationId">
+        <if-empty field="contentOperationId">
             <add-error><fail-message message="Required field 'contentOperationId' is missing in simple method call [checkContentOperationSecurity]"/></add-error>
         </if-empty>
 
-        <if-empty field-name="contentPurposeTypeId">
+        <if-empty field="contentPurposeTypeId">
             <set field="contentPurposeTypeId" from-field="parameters.contentPurposeTypeId"/>
         </if-empty>
-        <if-empty field-name="contentPurposeTypeId">
+        <if-empty field="contentPurposeTypeId">
             <set field="contentPurposeTypeId" value="_NA_"/>
         </if-empty>
 
@@ -444,9 +444,9 @@
         <if>
             <condition>
                 <and>
-                    <if-compare value="CONTENT_CREATE" field-name="contentOperationId" operator="equals"/>
+                    <if-compare value="CONTENT_CREATE" field="contentOperationId" operator="equals"/>
                     <not>
-                        <if-empty field-name="contentPurposeTypeId"/>
+                        <if-empty field="contentPurposeTypeId"/>
                     </not>
                 </and>
             </condition>
@@ -476,7 +476,7 @@
                 </iterate>
 
                 <!-- check the _NA_ purpose but only if no other purposes were found -->
-                <if-empty field-name="contentPurposes">
+                <if-empty field="contentPurposes">
                     <entity-condition entity-name="ContentPurposeOperation" list-name="operations">
                         <condition-list combine="and">
                             <condition-expr field-name="contentPurposeTypeId" operator="equals" value="_NA_"/>
@@ -494,7 +494,7 @@
 
         <if>
             <condition>
-                <if-empty field-name="operations"/>
+                <if-empty field="operations"/>
             </condition>
             <!-- there are no ContentPurposeOperation entries for this operation/purpose; default is approve permission -->
             <then>
@@ -508,14 +508,14 @@
 
                 <!-- check each operation security -->
                 <iterate entry-name="operation" list-name="operations">
-                    <if-compare field-name="hasPermission" value="false" type="Boolean" operator="equals">
+                    <if-compare field="hasPermission" value="false" type="Boolean" operator="equals">
                         <!-- reset the checkId if needed -->
                         <if>
                             <condition>
                                 <and>
-                                    <if-empty field-name="checkId"/>
+                                    <if-empty field="checkId"/>
                                     <not>
-                                        <if-empty field-name="toCheckContentId"/>
+                                        <if-empty field="toCheckContentId"/>
                                     </not>
                                 </and>
                             </condition>
@@ -530,12 +530,12 @@
                         <if>
                             <condition>
                                 <or>
-                                    <if-compare field-name="operation.statusId" value="_NA_" operator="equals"/>
+                                    <if-compare field="operation.statusId" value="_NA_" operator="equals"/>
                                     <and>
                                         <not>
-                                            <if-empty field-name="statusId"/>
+                                            <if-empty field="statusId"/>
                                         </not>
-                                        <if-compare-field field-name="operation.statusId" operator="equals" to-field-name="statusId"/>    
+                                        <if-compare-field field="operation.statusId" to-field="statusId" operator="equals"/>    
                                     </and>
                                 </or>
                             </condition>
@@ -544,16 +544,16 @@
 
                                 <!-- first check passed; now we test for the role membership(s) -->
                                 <iterate entry-name="thisPartyId" list-name="partyIdList">
-                                    <if-compare field-name="hasPermission" value="false" type="Boolean" operator="equals">
+                                    <if-compare field="hasPermission" value="false" type="Boolean" operator="equals">
                                         <set field="checkRoleTypeId" from-field="operation.roleTypeId"/>
                                         <set field="checkPartyId" from-field="thisPartyId"/>
                                         <!-- reset the checkId if needed -->
                                         <if>
                                             <condition>
                                                 <and>
-                                                    <if-empty field-name="checkId"/>
+                                                    <if-empty field="checkId"/>
                                                     <not>
-                                                        <if-empty field-name="toCheckContentId"/>
+                                                        <if-empty field="toCheckContentId"/>
                                                     </not>
                                                 </and>
                                             </condition>
@@ -567,9 +567,9 @@
                                         <if>
                                             <condition>
                                                 <and>
-                                                    <if-compare field-name="hasPermission" value="false" type="Boolean" operator="equals"/>
+                                                    <if-compare field="hasPermission" value="false" type="Boolean" operator="equals"/>
                                                     <not>
-                                                        <if-empty field-name="checkId"/>
+                                                        <if-empty field="checkId"/>
                                                     </not>
                                                 </and>
                                             </condition>
@@ -579,9 +579,9 @@
                                                     <condition>
                                                         <!-- iterate until either we have permission or there are no more parents -->
                                                         <and>
-                                                            <if-compare field-name="hasPermission" value="false" type="Boolean" operator="equals"/>
+                                                            <if-compare field="hasPermission" value="false" type="Boolean" operator="equals"/>
                                                             <not>
-                                                                <if-empty field-name="checkId"/>
+                                                                <if-empty field="checkId"/>
                                                             </not>
                                                         </and>
                                                     </condition>
@@ -592,7 +592,7 @@
                                                         <if>
                                                             <condition>
                                                                 <not>
-                                                                    <if-empty field-name="currentContent.ownerContentId"/>
+                                                                    <if-empty field="currentContent.ownerContentId"/>
                                                                 </not>
                                                             </condition>
                                                             <then>
@@ -624,10 +624,10 @@
         <!-- resetting the permission flag -->
         <set field="hasPermission" type="Boolean" value="false"/>
 
-        <if-empty field-name="checkId">
+        <if-empty field="checkId">
             <add-error><fail-message message="Required field 'checkId' is missing in simple method call [checkOwnership]"/></add-error>
         </if-empty>
-        <if-empty field-name="partyId">
+        <if-empty field="partyId">
             <set field="partyId" from-field="userLogin.partyId"/>
         </if-empty>
         <check-errors/>
@@ -643,7 +643,7 @@
             <if>
                 <condition>
                     <not>
-                        <if-compare field-name="hasPermission" value="true" operator="equals"/>
+                        <if-compare field="hasPermission" value="true" operator="equals"/>
                     </not>
                 </condition>
                 <then>
@@ -665,19 +665,19 @@
         <log level="verbose" message="checkRoleSecurity: just reset hasPermission value to false!"/>
 
         <!-- roleEntity is required to determine which content role table to look: ContentRole, DataResourceRole, etc -->
-        <if-empty field-name="roleEntity">
+        <if-empty field="roleEntity">
             <add-error><fail-message message="Required field 'roleEntity' is missing in simple method call [checkRoleSecurity]"/></add-error>
         </if-empty>
         <!-- roleEntityField is required to determine the pk field to check; contentId, dataResourceId, etc -->
-        <if-empty field-name="roleEntityField">
+        <if-empty field="roleEntityField">
             <add-error><fail-message message="Required field 'roleEntityField' is missing in simple method call [checkRoleSecurity]"/></add-error>
         </if-empty>
         <!-- setting the env field contentId is required for this simple method -->
-        <if-empty field-name="checkId">
+        <if-empty field="checkId">
             <add-error><fail-message message="Required field 'checkId' is missing in simple method call [checkRoleSecurity]"/></add-error>
         </if-empty>
         <!-- the party ID to check is required for this check -->
-        <if-empty field-name="checkPartyId">
+        <if-empty field="checkPartyId">
             <add-error><fail-message message="Required field 'checkPartyId' is missing in simple method call [checkRoleSecurity]"/></add-error>
         </if-empty>
         <check-errors/>
@@ -688,9 +688,9 @@
             <condition>
                 <and>
                     <not>
-                        <if-empty field-name="checkRoleTypeId"/>
+                        <if-empty field="checkRoleTypeId"/>
                     </not>
-                    <if-compare field-name="checkRoleTypeId" value="_NA_" operator="equals"/>
+                    <if-compare field="checkRoleTypeId" value="_NA_" operator="equals"/>
                 </and>
             </condition>
             <then>
@@ -703,7 +703,7 @@
                 <if>
                     <condition>
                         <not>
-                            <if-empty field-name="checkRoleTypeId"/>
+                            <if-empty field="checkRoleTypeId"/>
                         </not>
                     </condition>
                     <then>
@@ -742,7 +742,7 @@
                 <if>
                     <condition>
                         <not>
-                            <if-empty field-name="foundRoles"/>
+                            <if-empty field="foundRoles"/>
                         </not>
                     </condition>
                     <then>
@@ -756,7 +756,7 @@
 
     <!-- method to get the content purposes -->
     <simple-method method-name="findAllContentPurposes" short-description="Find all content purposes for the specified content">
-        <if-empty field-name="checkId">
+        <if-empty field="checkId">
             <add-error><fail-message message="Required field 'checkId' (contentId) is missing in simple method call [findAllContentPurposes]"/></add-error>
         </if-empty>
         <check-errors/>
@@ -778,7 +778,7 @@
 
     <!-- method to get content associations -->
     <simple-method method-name="findAllParentContent" short-description="Finds all associated parent content">
-        <if-empty field-name="contentId">
+        <if-empty field="contentId">
             <add-error><fail-message message="Required field 'contentId' is missing in simple method call [findAllParentContent]"/></add-error>
         </if-empty>
         <check-errors/>
@@ -789,4 +789,4 @@
         <filter-list-by-date list-name="assocs"/>
         <field-to-result field-name="assocs" result-name="contentAssocList"/>
     </simple-method>
-</simple-methods>
\ No newline at end of file
+</simple-methods>

Modified: ofbiz/trunk/applications/content/script/org/ofbiz/content/permission/DataResourcePermissionServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/script/org/ofbiz/content/permission/DataResourcePermissionServices.xml?rev=667748&r1=667747&r2=667748&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/script/org/ofbiz/content/permission/DataResourcePermissionServices.xml (original)
+++ ofbiz/trunk/applications/content/script/org/ofbiz/content/permission/DataResourcePermissionServices.xml Fri Jun 13 23:03:12 2008
@@ -32,14 +32,14 @@
         <if>
             <condition>
                 <not>
-                    <if-compare field-name="hasPermission" value="true" type="Boolean" operator="equals"/>
+                    <if-compare field="hasPermission" value="true" type="Boolean" operator="equals"/>
                 </not>
             </condition>
             <then>
                 <if>
                     <!-- view data resource -->
                     <condition>
-                        <if-compare field-name="parameters.mainAction" value="VIEW" operator="equals"/>
+                        <if-compare field="parameters.mainAction" value="VIEW" operator="equals"/>
                     </condition>
                     <then>
                         <call-simple-method method-name="viewDataResourcePermission"/>
@@ -47,7 +47,7 @@
                     <else-if>
                         <!-- create data resource -->
                         <condition>
-                            <if-compare field-name="parameters.mainAction" value="CREATE" operator="equals"/>
+                            <if-compare field="parameters.mainAction" value="CREATE" operator="equals"/>
                         </condition>
                         <then>
                             <call-simple-method method-name="createDataResourcePermission"/>
@@ -56,7 +56,7 @@
                     <else-if>
                         <!-- update data resource -->
                         <condition>
-                            <if-compare field-name="parameters.mainAction" value="UPDATE" operator="equals"/>
+                            <if-compare field="parameters.mainAction" value="UPDATE" operator="equals"/>
                         </condition>
                         <then>
                             <call-simple-method method-name="updateDataResourcePermission"/>
@@ -77,7 +77,7 @@
     <!-- DataResource View Permission -->
     <simple-method method-name="viewDataResourcePermission" short-description="Check user can view data resource">
         <!-- if called directly check the main permission -->
-        <if-empty field-name="hasPermission">
+        <if-empty field="hasPermission">
             <set field="primaryPermission" value="CONTENTMGR"/>
             <set field="mainAction" value="VIEW"/>
             <call-simple-method method-name="genericBasePermissionCheck"
@@ -93,7 +93,7 @@
     <!-- DataResource Create Permission -->
     <simple-method method-name="createDataResourcePermission" short-description="Check user can create new content">
         <!-- if called directly check the main permission -->
-        <if-empty field-name="hasPermission">
+        <if-empty field="hasPermission">
             <set field="primaryPermission" value="CONTENTMGR"/>
             <set field="mainAction" value="CREATE"/>
             <call-simple-method method-name="genericBasePermissionCheck"
@@ -111,7 +111,7 @@
     <!-- DataResource Update Permission -->
     <simple-method method-name="updateDataResourcePermission" short-description="Check user can update existing content">
         <!-- if called directly check the main permission -->
-        <if-empty field-name="hasPermission">
+        <if-empty field="hasPermission">
             <set field="primaryPermission" value="CONTENTMGR"/>
             <set field="mainAction" value="UPDATE"/>
             <call-simple-method method-name="genericBasePermissionCheck"
@@ -119,10 +119,10 @@
         </if-empty>
 
         <!-- dataResourceId is required for update checking -->
-        <if-empty field-name="dataResourceId">
+        <if-empty field="dataResourceId">
             <set field="dataResourceId" from-field="parameters.dataResourceId"/>
         </if-empty>
-        <if-empty field-name="dataResourceId">
+        <if-empty field="dataResourceId">
             <add-error><fail-message message="DataResource Permission Service UPDATE requires a dataResourceId!"/></add-error>
         </if-empty>
         <check-errors/>
@@ -135,7 +135,7 @@
         <!-- must have permission to continue -->
         <if>
             <condition>
-                <if-compare field-name="hasPermission" value="true" type="Boolean" operator="equals"/>
+                <if-compare field="hasPermission" value="true" type="Boolean" operator="equals"/>
             </condition>
             <then>
                 <log level="verbose" message="Found necessary ROLE permission: ${primaryPermission}_${mainAction}"/>
@@ -144,7 +144,7 @@
                 <entity-one entity-name="DataResource" value-name="thisDataResource">
                     <field-map field-name="dataResourceId"/>
                 </entity-one>
-                <if-empty field-name="thisDataResource">
+                <if-empty field="thisDataResource">
                     <add-error><fail-message message="DataResource record not found for ID [${dataResourceId}]"/></add-error>
                     <check-errors/>
                 </if-empty>
@@ -155,4 +155,4 @@
             </then>
         </if>
     </simple-method>
-</simple-methods>
\ No newline at end of file
+</simple-methods>

Modified: ofbiz/trunk/applications/content/script/org/ofbiz/content/survey/SurveyServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/script/org/ofbiz/content/survey/SurveyServices.xml?rev=667748&r1=667747&r2=667748&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/script/org/ofbiz/content/survey/SurveyServices.xml (original)
+++ ofbiz/trunk/applications/content/script/org/ofbiz/content/survey/SurveyServices.xml Fri Jun 13 23:03:12 2008
@@ -195,8 +195,8 @@
             <condition>
 
                 <and>
-                    <if-compare field-name="surveyQuestionTypeId" value="ENUMERATION" operator="equals"/>
-                    <if-empty field-name="enumTypeId"/>
+                    <if-compare field="surveyQuestionTypeId" value="ENUMERATION" operator="equals"/>
+                    <if-empty field="enumTypeId"/>
                 </and>
             </condition>
             <then>
@@ -206,8 +206,8 @@
         <if>
             <condition>
                 <and>
-                    <if-compare field-name="surveyQuestionTypeId" value="GEO" operator="equals"/>
-                    <if-empty field-name="geoId"/>
+                    <if-compare field="surveyQuestionTypeId" value="GEO" operator="equals"/>
+                    <if-empty field="geoId"/>
                 </and>
             </condition>
             <then>
@@ -229,8 +229,8 @@
         <if>
             <condition>
                 <and>
-                    <if-compare field-name="parameters.surveyQuestionTypeId" value="ENUMERATION" operator="equals"/>
-                    <if-empty field-name="parameters.enumTypeId"/>
+                    <if-compare field="parameters.surveyQuestionTypeId" value="ENUMERATION" operator="equals"/>
+                    <if-empty field="parameters.enumTypeId"/>
                 </and>
             </condition>
             <then>
@@ -240,8 +240,8 @@
         <if>
             <condition>
                 <and>
-                    <if-compare field-name="parameters.surveyQuestionTypeId" value="GEO" operator="equals"/>
-                    <if-empty field-name="parameters.geoId"/>
+                    <if-compare field="parameters.surveyQuestionTypeId" value="GEO" operator="equals"/>
+                    <if-empty field="parameters.geoId"/>
                 </and>
             </condition>
             <then>
@@ -312,7 +312,7 @@
         <set-pk-fields map-name="parameters" value-name="newEntity"/>
         <set-nonpk-fields map-name="parameters" value-name="newEntity"/>
 
-        <if-empty field-name="fromDate" map-name="newEntity">
+        <if-empty field="newEntity.fromDate">
             <now-timestamp-to-env env-name="nowTimestamp"/>
             <set field="newEntity.fromDate" from-field="nowTimestamp"/>
         </if-empty>
@@ -442,7 +442,7 @@
     <simple-method method-name="createSurveyResponse" short-description="Create Survey Response" login-required="false">
         <!-- lookup the survey -->
         <entity-one entity-name="Survey" value-name="survey" use-cache="true"/>
-        <if-empty field-name="survey">
+        <if-empty field="survey">
             <add-error><fail-message message="No survey found for survey ID: ${surveyLookup.surveyId}"/></add-error>
             <check-errors/>
         </if-empty>
@@ -451,27 +451,27 @@
         <entity-and entity-name="SurveyQuestionAndAppl" list-name="surveyQuestionAndApplList" use-cache="true">
             <field-map field-name="surveyId" env-name="survey.surveyId"/>
         </entity-and>
-        <if-empty field-name="surveyQuestionAndApplList">
+        <if-empty field="surveyQuestionAndApplList">
             <add-error><fail-message message="No questions found for survey ID: ${survey.surveyId}"/></add-error>
             <check-errors/>
         </if-empty>
 
         <!-- check if anonymous is allowed and if not that we have a partyId -->
-        <if-compare field-name="isAnonymous" map-name="survey" operator="not-equals" value="Y">
-            <if-empty field-name="parameters.partyId">
+        <if-compare field="survey.isAnonymous" operator="not-equals" value="Y">
+            <if-empty field="parameters.partyId">
                 <add-error><fail-message message="Anonymous response to this survey is not allowed (you must be logged in)"/></add-error>
                 <check-errors/>
             </if-empty>
         </if-compare>
 
         <!-- if this is a single use and we have a partyId check for existing responses -->
-        <if-compare field-name="survey.allowMultiple" operator="not-equals" value="Y">
-            <if-not-empty field-name="parameters.partyId">
+        <if-compare field="survey.allowMultiple" operator="not-equals" value="Y">
+            <if-not-empty field="parameters.partyId">
                 <entity-and entity-name="SurveyResponse" list-name="existingResponses">
                     <field-map field-name="partyId" env-name="parameters.partyId"/>
                     <field-map field-name="surveyId" env-name="survey.surveyId"/>
                 </entity-and>
-                <if-not-empty field-name="existingResponses">
+                <if-not-empty field="existingResponses">
                     <add-error><fail-message message="You have already responded to this survey; multiple responses are not allowed"/></add-error>
                     <check-errors/>
                 </if-not-empty>
@@ -479,7 +479,7 @@
         </if-compare>
 
         <!-- make sure we have answers to check -->
-        <if-empty field-name="parameters.answers">
+        <if-empty field="parameters.answers">
             <add-error><fail-message message="No answers were found"/></add-error>
             <check-errors/>
         </if-empty>
@@ -489,9 +489,9 @@
         <iterate entry-name="surveyQuestionAndAppl" list-name="surveyQuestionAndApplList">
             <!-- for validation get SurveyMultiResp and SurveyMultiRespColumn entries and if exist process for each surveyMultiRespColId -->
             <get-related-one value-name="surveyQuestionAndAppl" relation-name="SurveyMultiResp" to-value-name="surveyMultiResp" use-cache="true"/>
-            <if-not-empty field-name="surveyMultiResp">
+            <if-not-empty field="surveyMultiResp">
                 <!-- if the surveyQuestionAndAppl has a surveyMultiRespColId, then just look for one answer with that ID -->
-                <if-empty field-name="surveyQuestionAndAppl.surveyMultiRespColId">
+                <if-empty field="surveyQuestionAndAppl.surveyMultiRespColId">
                     <get-related value-name="surveyMultiResp" relation-name="SurveyMultiRespColumn" list-name="surveyMultiRespColumnList" use-cache="true"/>
                     <iterate entry-name="surveyMultiRespColumn" list-name="surveyMultiRespColumnList">
                         <set field="answerFieldName" value="answers.${surveyQuestionAndAppl.surveyQuestionId}_${surveyMultiRespColumn.surveyMultiRespColId}"/>
@@ -513,21 +513,21 @@
         <now-timestamp-to-env env-name="nowTimestamp"/>
 
         <!-- create/update the response -->
-        <if-compare field-name="survey.allowUpdate" operator="equals" value="Y">
-            <if-not-empty field-name="parameters.surveyResponseId">
+        <if-compare field="survey.allowUpdate" operator="equals" value="Y">
+            <if-not-empty field="parameters.surveyResponseId">
                 <set from-field="parameters.surveyResponseId" field="lookupRespMap.surveyResponseId"/>
                 <find-by-primary-key entity-name="SurveyResponse" map-name="lookupRespMap" value-name="surveyResponse"/>
             </if-not-empty>
         </if-compare>
 
-        <if-empty field-name="surveyResponse">
+        <if-empty field="surveyResponse">
             <make-value value-name="surveyResponse" entity-name="SurveyResponse"/>
             <sequenced-id-to-env sequence-name="SurveyResponse" env-name="surveyResponse.surveyResponseId"/>
             <set-nonpk-fields value-name="surveyResponse" map-name="parameters"/>
             <create-value value-name="surveyResponse"/>
         </if-empty>
 
-        <if-empty field-name="surveyResponse.responseDate">
+        <if-empty field="surveyResponse.responseDate">
             <set from-field="nowTimestamp" field="surveyResponse.responseDate"/>
         </if-empty>
         <set from-field="nowTimestamp" field="surveyResponse.lastModifiedDate"/>
@@ -536,7 +536,7 @@
         <field-to-result field-name="surveyResponse.surveyResponseId" result-name="surveyResponseId"/>
         
         <!-- if a dataResourceId was passed in use it to set DataResource.relatedDetailId to the surveyResponse.surveyResponseId -->
-        <if-not-empty field-name="parameters.dataResourceId">
+        <if-not-empty field="parameters.dataResourceId">
             <entity-one entity-name="DataResource" value-name="dataResource"/>
             <set field="dataResource.relatedDetailId" from-field="surveyResponse.surveyResponseId"/>
             <store-value value-name="dataResource"/>
@@ -550,9 +550,9 @@
                 <condition>
                     <and>
                         <not>
-                            <if-empty field-name="existingAnswer.surveyMultiRespColId"/>
+                            <if-empty field="existingAnswer.surveyMultiRespColId"/>
                         </not>
-                        <if-compare operator="not-equals" field-name="existingAnswer.surveyMultiRespColId" value="_NA_"/>
+                        <if-compare operator="not-equals" field="existingAnswer.surveyMultiRespColId" value="_NA_"/>
                     </and>
                 </condition>
                 <then>
@@ -566,9 +566,9 @@
         <iterate entry-name="surveyQuestionAndAppl" list-name="surveyQuestionAndApplList">
             <!-- for process inputs get SurveyMultiResp and SurveyMultiRespColumn entries and if exist process for each surveyMultiRespColId -->
             <get-related-one value-name="surveyQuestionAndAppl" relation-name="SurveyMultiResp" to-value-name="surveyMultiResp" use-cache="true"/>
-            <if-not-empty field-name="surveyMultiResp">
+            <if-not-empty field="surveyMultiResp">
                 <!-- if the surveyQuestionAndAppl has a surveyMultiRespColId, then just look for one answer with that ID -->
-                <if-empty field-name="surveyQuestionAndAppl.surveyMultiRespColId">
+                <if-empty field="surveyQuestionAndAppl.surveyMultiRespColId">
                     <get-related value-name="surveyMultiResp" relation-name="SurveyMultiRespColumn" list-name="surveyMultiRespColumnList" use-cache="true"/>
                     <iterate entry-name="surveyMultiRespColumn" list-name="surveyMultiRespColumnList">
                         <set field="currentFieldName" value="${surveyQuestionAndAppl.surveyQuestionId}_${surveyMultiRespColumn.surveyMultiRespColId}"/>
@@ -588,7 +588,7 @@
 
         <!-- run the survey response service (async) -->
         <set from-field="surveyResponse.surveyResponseId" field="respServiceCtx.surveyResponseId"/>
-        <if-not-empty field-name="responseService" map-name="survey">
+        <if-not-empty field="survey.responseService">
             <call-service-asynch service-name="${survey.responseService}" in-map-name="respServiceCtx" include-user-login="true"/>  
         </if-not-empty>
 
@@ -600,31 +600,31 @@
     <!-- =============== Inline method used by createSurveyResponse ============== -->
     <simple-method method-name="validateSurveyResponseInline" short-description="validateSurveyResponseInline" login-required="false">
         <!-- Is required? -->
-        <if-compare field-name="requiredField" map-name="surveyQuestionAndAppl" operator="equals" value="Y">
-            <if-empty field-name="${answerFieldName}">
+        <if-compare field="surveyQuestionAndAppl.requiredField" operator="equals" value="Y">
+            <if-empty field="${answerFieldName}">
                 <add-error><fail-message message="The question [${surveyQuestionAndAppl.question}] requires a response."/></add-error>
             </if-empty>
         </if-compare>
         
         <!-- validate the field -->
-        <if-compare field-name="surveyQuestionAndAppl.surveyQuestionTypeId" operator="equals" value="CREDIT_CARD">
+        <if-compare field="surveyQuestionAndAppl.surveyQuestionTypeId" operator="equals" value="CREDIT_CARD">
             <if-validate-method field-name="${answerFieldName}" method="isCreditCard">
                 <else>
                     <add-error><fail-message message="The question [${surveyQuestionAndAppl.question}] requires a valid credit-card number."/></add-error>
                 </else>
             </if-validate-method>
         </if-compare>
-        <if-compare field-name="surveyQuestionAndAppl.surveyQuestionTypeId" operator="equals" value="GIFT_CARD">
+        <if-compare field="surveyQuestionAndAppl.surveyQuestionTypeId" operator="equals" value="GIFT_CARD">
             <set field="finAccountMap.finAccountTypeId" value="GIFTCERT_ACCOUNT"/>
             <set field="finAccountMap.statusId" value="FNACT_ACTIVE"/>
             <set field="codeOk" value="false"/>            
             <find-by-and entity-name="FinAccount" map-name="finAccountMap" list-name="finAccountList"/>
             <iterate entry-name="finAccount" list-name="finAccountList">
-                <if-compare field-name="finAccount.finAccountCode" operator="equals" value="${${answerFieldName}}">
+                <if-compare field="finAccount.finAccountCode" operator="equals" value="${${answerFieldName}}">
                     <set field="codeOk" value="true"/>
                 </if-compare>
             </iterate>
-            <if-compare field-name="codeOk" value="true"  operator="not-equals">
+            <if-compare field="codeOk" value="true" operator="not-equals">
                 <if-validate-method field-name="${answerFieldName}" method="isGiftCard">
                     <else>
                         <add-error><fail-message message="The question [${surveyQuestionAndAppl.question}] requires a valid gift-card number."/></add-error>
@@ -632,42 +632,42 @@
                 </if-validate-method>
             </if-compare>
         </if-compare>
-        <if-compare field-name="surveyQuestionAndAppl.surveyQuestionTypeId" operator="equals" value="DATE">
+        <if-compare field="surveyQuestionAndAppl.surveyQuestionTypeId" operator="equals" value="DATE">
             <if-validate-method field-name="${answerFieldName}" method="isDate">
                 <else>
                     <add-error><fail-message message="The question [${surveyQuestionAndAppl.question}] requires a valid date string (mm/dd/yyyy)."/></add-error>
                 </else>
             </if-validate-method>
         </if-compare>
-        <if-compare field-name="surveyQuestionAndAppl.surveyQuestionTypeId" operator="equals" value="EMAIL">
+        <if-compare field="surveyQuestionAndAppl.surveyQuestionTypeId" operator="equals" value="EMAIL">
             <if-validate-method field-name="${answerFieldName}" method="isEmail">
                 <else>
                     <add-error><fail-message message="The question [${surveyQuestionAndAppl.question}] requires a valid email address."/></add-error>
                 </else>
             </if-validate-method>
         </if-compare>
-        <if-compare field-name="surveyQuestionAndAppl.surveyQuestionTypeId" operator="equals" value="NUMBER_CURRENCY">
+        <if-compare field="surveyQuestionAndAppl.surveyQuestionTypeId" operator="equals" value="NUMBER_CURRENCY">
             <if-validate-method field-name="${answerFieldName}" method="isSignedDouble">
                 <else>
                     <add-error><fail-message message="The question [${surveyQuestionAndAppl.question}] requires a valid currency amount."/></add-error>
                 </else>
             </if-validate-method>
         </if-compare>
-        <if-compare field-name="surveyQuestionAndAppl.surveyQuestionTypeId" operator="equals" value="NUMBER_FLOAT">
+        <if-compare field="surveyQuestionAndAppl.surveyQuestionTypeId" operator="equals" value="NUMBER_FLOAT">
             <if-validate-method field-name="${answerFieldName}" method="isSignedDouble">
                 <else>
                     <add-error><fail-message message="The question [${surveyQuestionAndAppl.question}] requires a valid decimal number."/></add-error>
                 </else>
             </if-validate-method>
         </if-compare>
-        <if-compare field-name="surveyQuestionAndAppl.surveyQuestionTypeId" operator="equals" value="NUMBER_LONG">
+        <if-compare field="surveyQuestionAndAppl.surveyQuestionTypeId" operator="equals" value="NUMBER_LONG">
             <if-validate-method field-name="${answerFieldName}" method="isSignedLong">
                 <else>
                     <add-error><fail-message message="The question [${surveyQuestionAndAppl.question}] requires a valid whole number."/></add-error>
                 </else>
             </if-validate-method>
         </if-compare>
-        <if-compare field-name="surveyQuestionAndAppl.surveyQuestionTypeId" operator="equals" value="URL">
+        <if-compare field="surveyQuestionAndAppl.surveyQuestionTypeId" operator="equals" value="URL">
             <if-validate-method field-name="${answerFieldName}" method="isUrl">
                 <else>
                     <add-error><fail-message message="The question [${surveyQuestionAndAppl.question}] requires a valid URL."/></add-error>
@@ -677,20 +677,20 @@
     </simple-method>
 
     <simple-method method-name="processSurveyResponseInline" short-description="processSurveyResponseInline" login-required="false">
-        <if-not-empty field-name="currentAnswers">
+        <if-not-empty field="currentAnswers">
             <set field="responseAnswer" from-field="currentAnswers.${currentFieldName}"/>
         </if-not-empty>
         
        <if>
             <condition>
                 <or>
-                    <if-empty field-name="responseAnswer"/>
-                    <if-compare-field field-name="responseAnswer.surveyQuestionId" operator="not-equals" to-field-name="surveyQuestionAndAppl.surveyQuestionId"/>
+                    <if-empty field="responseAnswer"/>
+                    <if-compare-field field="responseAnswer.surveyQuestionId" to-field="surveyQuestionAndAppl.surveyQuestionId" operator="not-equals"/>
                     <and>
                         <not>
-                            <if-empty field-name="surveyMultiRespColumn"/>
+                            <if-empty field="surveyMultiRespColumn"/>
                         </not>
-                        <if-compare-field field-name="responseAnswer.surveyMultiRespColId" operator="not-equals" to-field-name="surveyMultiRespColumn.surveyMultiRespColId" />
+                        <if-compare-field field="responseAnswer.surveyMultiRespColId" to-field="surveyMultiRespColumn.surveyMultiRespColId" operator="not-equals"/>
                     </and>
                 </or>
             </condition>
@@ -700,7 +700,7 @@
                 <set from-field="surveyQuestionAndAppl.surveyQuestionId" field="responseAnswer.surveyQuestionId"/>
                 
                 <!-- If this has a surveyMultiRespColumn then set surveyMultiRespId and surveyMultiRespColId otherwise set surveyMultiRespColId to _NA_ -->
-                <if-not-empty field-name="surveyMultiRespColumn">
+                <if-not-empty field="surveyMultiRespColumn">
                     <set field="responseAnswer.surveyMultiRespId" from-field="surveyMultiRespColumn.surveyMultiRespId"/>
                     <set field="responseAnswer.surveyMultiRespColId" from-field="surveyMultiRespColumn.surveyMultiRespColId"/>
                     <else>
@@ -711,56 +711,56 @@
                 <create-value value-name="responseAnswer"/>
             </then>
         </if>
-        <if-not-empty field-name="answers.${currentFieldName}">
-            <if-compare field-name="surveyQuestionAndAppl.surveyQuestionTypeId" operator="equals" value="BOOLEAN">
+        <if-not-empty field="answers.${currentFieldName}">
+            <if-compare field="surveyQuestionAndAppl.surveyQuestionTypeId" operator="equals" value="BOOLEAN">
                 <set field="responseAnswer.booleanResponse" from-field="answers.${currentFieldName}"/>
             </if-compare>
-            <if-compare field-name="surveyQuestionAndAppl.surveyQuestionTypeId" operator="equals" value="EMAIL">
+            <if-compare field="surveyQuestionAndAppl.surveyQuestionTypeId" operator="equals" value="EMAIL">
                 <set field="responseAnswer.textResponse" from-field="answers.${currentFieldName}"/>
             </if-compare>
-            <if-compare field-name="surveyQuestionAndAppl.surveyQuestionTypeId" operator="equals" value="DATE">
+            <if-compare field="surveyQuestionAndAppl.surveyQuestionTypeId" operator="equals" value="DATE">
                 <set field="responseAnswer.textResponse" from-field="answers.${currentFieldName}"/>
             </if-compare>
-            <if-compare field-name="surveyQuestionAndAppl.surveyQuestionTypeId" operator="equals" value="URL">
+            <if-compare field="surveyQuestionAndAppl.surveyQuestionTypeId" operator="equals" value="URL">
                 <set field="responseAnswer.textResponse" from-field="answers.${currentFieldName}"/>
             </if-compare>
-            <if-compare field-name="surveyQuestionAndAppl.surveyQuestionTypeId" operator="equals" value="CREDIT_CARD">
+            <if-compare field="surveyQuestionAndAppl.surveyQuestionTypeId" operator="equals" value="CREDIT_CARD">
                 <set field="responseAnswer.textResponse" from-field="answers.${currentFieldName}"/>
             </if-compare>
-            <if-compare field-name="surveyQuestionAndAppl.surveyQuestionTypeId" operator="equals" value="GIFT_CARD">
+            <if-compare field="surveyQuestionAndAppl.surveyQuestionTypeId" operator="equals" value="GIFT_CARD">
                 <set field="responseAnswer.textResponse" from-field="answers.${currentFieldName}"/>
             </if-compare>
-            <if-compare field-name="surveyQuestionAndAppl.surveyQuestionTypeId" operator="equals" value="PASSWORD">
+            <if-compare field="surveyQuestionAndAppl.surveyQuestionTypeId" operator="equals" value="PASSWORD">
                 <set field="responseAnswer.textResponse" from-field="answers.${currentFieldName}"/>
             </if-compare>
-            <if-compare field-name="surveyQuestionAndAppl.surveyQuestionTypeId" operator="equals" value="TEXT_SHORT">
+            <if-compare field="surveyQuestionAndAppl.surveyQuestionTypeId" operator="equals" value="TEXT_SHORT">
                 <set field="responseAnswer.textResponse" from-field="answers.${currentFieldName}"/>
             </if-compare>
-            <if-compare field-name="surveyQuestionAndAppl.surveyQuestionTypeId" operator="equals" value="TEXT_LONG">
+            <if-compare field="surveyQuestionAndAppl.surveyQuestionTypeId" operator="equals" value="TEXT_LONG">
                 <set field="responseAnswer.textResponse" from-field="answers.${currentFieldName}"/>
             </if-compare>
-            <if-compare field-name="surveyQuestionAndAppl.surveyQuestionTypeId" operator="equals" value="TEXTAREA">
+            <if-compare field="surveyQuestionAndAppl.surveyQuestionTypeId" operator="equals" value="TEXTAREA">
                 <set field="responseAnswer.textResponse" from-field="answers.${currentFieldName}"/>
             </if-compare>
-            <if-compare field-name="surveyQuestionAndAppl.surveyQuestionTypeId" operator="equals" value="NUMBER_CURRENCY">
+            <if-compare field="surveyQuestionAndAppl.surveyQuestionTypeId" operator="equals" value="NUMBER_CURRENCY">
                 <set field="responseAnswer.currencyResponse" from-field="answers.${currentFieldName}" type="Double"/>
             </if-compare>
-            <if-compare field-name="surveyQuestionAndAppl.surveyQuestionTypeId" operator="equals" value="NUMBER_FLOAT">
+            <if-compare field="surveyQuestionAndAppl.surveyQuestionTypeId" operator="equals" value="NUMBER_FLOAT">
                 <set field="responseAnswer.floatResponse" from-field="answers.${currentFieldName}" type="Double"/>
             </if-compare>
-            <if-compare field-name="surveyQuestionAndAppl.surveyQuestionTypeId" operator="equals" value="NUMBER_LONG">
+            <if-compare field="surveyQuestionAndAppl.surveyQuestionTypeId" operator="equals" value="NUMBER_LONG">
                 <set field="responseAnswer.numericResponse" from-field="answers.${currentFieldName}" type="Long"/>
             </if-compare>
-            <if-compare field-name="surveyQuestionAndAppl.surveyQuestionTypeId" operator="equals" value="OPTION">
+            <if-compare field="surveyQuestionAndAppl.surveyQuestionTypeId" operator="equals" value="OPTION">
                 <set from-field="answers.${currentFieldName}" field="responseAnswer.surveyOptionSeqId"/>
             </if-compare>
-            <if-compare field-name="surveyQuestionAndAppl.surveyQuestionTypeId" operator="equals" value="GEO">
+            <if-compare field="surveyQuestionAndAppl.surveyQuestionTypeId" operator="equals" value="GEO">
                 <set field="responseAnswer.textResponse" from-field="answers.${currentFieldName}"/>
             </if-compare>
-            <if-compare field-name="surveyQuestionAndAppl.surveyQuestionTypeId" operator="equals" value="ENUMERATION">
+            <if-compare field="surveyQuestionAndAppl.surveyQuestionTypeId" operator="equals" value="ENUMERATION">
                 <set field="responseAnswer.textResponse" from-field="answers.${currentFieldName}"/>
             </if-compare>
-            <if-compare field-name="surveyQuestionAndAppl.surveyQuestionTypeId" operator="equals" value="CONTENT">
+            <if-compare field="surveyQuestionAndAppl.surveyQuestionTypeId" operator="equals" value="CONTENT">
                 <!-- <log level="always" message="Found CONTENT type question"/> -->
                 <if-instance-of field-name="answers.${currentFieldName}" class="java.nio.ByteBuffer">
                     <set from-field="answers._${surveyQuestionAndAppl.surveyQuestionId}_contentType" field="partyContent._uploadedFile_contentType"/>
@@ -778,7 +778,7 @@
                 </if-instance-of>
             </if-compare>
 
-            <if-empty field-name="sequenceNum" map-name="responseAnswer">
+            <if-empty field="responseAnswer.sequenceNum">
                 <set from-field="surveyQuestionAndAppl.sequenceNum" field="responseAnswer.sequenceNum"/>
             </if-empty>      
             <set from-field="nowTimestamp" field="responseAnswer.answeredDate"/>

Modified: ofbiz/trunk/applications/content/script/org/ofbiz/content/website/WebSiteServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/script/org/ofbiz/content/website/WebSiteServices.xml?rev=667748&r1=667747&r2=667748&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/script/org/ofbiz/content/website/WebSiteServices.xml (original)
+++ ofbiz/trunk/applications/content/script/org/ofbiz/content/website/WebSiteServices.xml Fri Jun 13 23:03:12 2008
@@ -47,7 +47,7 @@
         <make-value value-name="newEntity" entity-name="WebSiteContent"/>
         <set-pk-fields value-name="newEntity" map-name="parameters"/>
         <set-nonpk-fields value-name="newEntity" map-name="parameters"/>
-        <if-empty field-name="newEntity.fromDate">
+        <if-empty field="newEntity.fromDate">
             <now-date-to-env env-name="nowTimestamp"/>
             <set field="newEntity.fromDate" from-field="nowTimestamp"/> 
         </if-empty>
@@ -72,7 +72,7 @@
         <make-value value-name="newEntity" entity-name="WebSiteContentType"/>
         <set-pk-fields value-name="newEntity" map-name="parameters"/>
         <set-nonpk-fields value-name="newEntity" map-name="parameters"/>
-        <if-empty field-name="newEntity.webSiteContentTypeId">
+        <if-empty field="newEntity.webSiteContentTypeId">
             <sequenced-id-to-env sequence-name="WebSiteContentTypeId" env-name="webSiteContentTypeId"/>
             <set field="newEntity.webSiteContentTypeId" from-field="webSiteContentTypeId"/>
         </if-empty>
@@ -125,7 +125,7 @@
         <set-pk-fields map-name="parameters" value-name="newEntity"/>
         <set-nonpk-fields map-name="parameters" value-name="newEntity"/>
         
-        <if-empty field-name="fromDate" map-name="newEntity">
+        <if-empty field="newEntity.fromDate">
             <now-timestamp-to-env env-name="nowTimestamp"/>
             <set field="newEntity.fromDate" from-field="nowTimestamp" />
         </if-empty>