svn commit: r1649482 [4/26] - in /ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23: ./ applications/accounting/src/org/ofbiz/accounting/invoice/ applications/accounting/src/org/ofbiz/accounting/payment/ applications/accounting/src/org/ofbiz/acc...

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

svn commit: r1649482 [4/26] - in /ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23: ./ applications/accounting/src/org/ofbiz/accounting/invoice/ applications/accounting/src/org/ofbiz/accounting/payment/ applications/accounting/src/org/ofbiz/acc...

jleroux@apache.org
Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/webapp/content/WEB-INF/actions/website/WebSitePublishPoint.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/webapp/content/WEB-INF/actions/website/WebSitePublishPoint.groovy?rev=1649482&r1=1649481&r2=1649482&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/webapp/content/WEB-INF/actions/website/WebSitePublishPoint.groovy (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/webapp/content/WEB-INF/actions/website/WebSitePublishPoint.groovy Mon Jan  5 08:50:30 2015
@@ -20,10 +20,7 @@
 import org.ofbiz.entity.condition.*
 import org.ofbiz.entity.util.*
 
-pplookupMap = [webSiteId : webSiteId, webSiteContentTypeId : 'PUBLISH_POINT'];
-webSiteContents = delegator.findList("WebSiteContent", EntityCondition.makeCondition(pplookupMap), null, ['-fromDate'], null, false);
-webSiteContents = EntityUtil.filterByDate(webSiteContents);
-webSiteContent = EntityUtil.getFirst(webSiteContents);
+webSiteContent = from("WebSiteContent").where("webSiteId", webSiteId, "webSiteContentTypeId", "PUBLISH_POINT").orderBy("-fromDate").filterByDate().queryFirst();
 if (webSiteContent) {
     content = webSiteContent.getRelatedOne("Content", false);
     contentRoot = content.contentId;
@@ -31,13 +28,11 @@ if (webSiteContent) {
     context.contentRoot = contentRoot;
 
     // get all sub content for the publish point
-    subsites = delegator.findList("ContentAssoc", EntityCondition.makeCondition([contentId : contentRoot]), null, null, null, false);
+    subsites = from("ContentAssoc").where("contentId", contentRoot).queryList();
     context.subsites = subsites;
 }
 
-mnlookupMap = [webSiteId : webSiteId, webSiteContentTypeId : 'MENU_ROOT'];
-webSiteMenus = delegator.findList("WebSiteContent", EntityCondition.makeCondition(mnlookupMap), null, ['-fromDate'], null, false);
-webSiteMenu = EntityUtil.getFirst(webSiteMenus);
+webSiteMenu = from("WebSiteContent").where("webSiteId", webSiteId, "webSiteContentTypeId", "MENU_ROOT").orderBy("-fromDate").queryFirst();
 if (webSiteMenu) {
     menu = webSiteMenu.getRelatedOne("Content", false);
     menuRoot = menu.contentId;
@@ -45,13 +40,11 @@ if (webSiteMenu) {
     context.menuRoot = menuRoot;
 
     // get all sub content for the menu root
-    menus = delegator.findList("ContentAssoc", EntityCondition.makeCondition([contentId : menuRoot]), null, null, null, false);
+    menus = from("ContentAssoc").where("contentId", menuRoot).queryList();
     context.menus = menus;
 }
 
-erlookupMap = [webSiteId : webSiteId, webSiteContentTypeId : 'ERROR_ROOT'];
-webSiteErrors = delegator.findList("WebSiteContent", EntityCondition.makeCondition(erlookupMap), null, ['-fromDate'], null, false);
-webSiteError = EntityUtil.getFirst(webSiteErrors);
+webSiteError = from("WebSiteContent").where("webSiteId", webSiteId, "webSiteContentTypeId", "ERROR_ROOT").orderBy("-fromDate").queryFirst();
 if (webSiteError) {
     error = webSiteError.getRelatedOne("Content", false);
     errorRoot = error.contentId;
@@ -59,6 +52,6 @@ if (webSiteError) {
     context.errorRoot = errorRoot;
 
     // get all sub content for the error root
-    errors = delegator.findList("ContentAssoc", EntityCondition.makeCondition([contentId : errorRoot]), null, null, null, false);
+    errors = from("ContentAssoc").where("contentId", errorRoot).queryList();
     context.errors = errors;
 }

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/webapp/content/fonts.fo.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/webapp/content/fonts.fo.ftl?rev=1649482&r1=1649481&r2=1649482&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/webapp/content/fonts.fo.ftl (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/webapp/content/fonts.fo.ftl Mon Jan  5 08:50:30 2015
@@ -1302,17 +1302,281 @@ Courier
 </fo:table-body>
 </fo:table>
   </fo:block>
-
-  <fo:block font-family="Helvetica"  font-size="12pt">
- Some special characters:
+  
+  
+  <fo:block font-family="Helvetica"  font-size="14pt">
+NotoSans
   </fo:block>
-  <fo:block space-after.optimum="10pt" font-family="Helvetica">
-Euro ( dec 8364, hex 20AC): &#x20AC;
+  <fo:block space-after.optimum="10pt" font-family="NotoSans" font-size="10pt">
+<fo:table>
+<fo:table-column column-width="65pt"/>
+<fo:table-column column-width="30pt"/>
+<fo:table-column column-width="65pt"/>
+<fo:table-column column-width="30pt"/>
+<fo:table-column column-width="65pt"/>
+<fo:table-column column-width="30pt"/>
+<fo:table-column column-width="65pt"/>
+<fo:table-body>
+<fo:table-row>
+<fo:table-cell>
+  <fo:block>
+&amp;#x21; : &#x21;
+&amp;#x22; : &#x22;
+&amp;#x23; : &#x23;
+&amp;#x24; : &#x24;
+&amp;#x25; : &#x25;
+&amp;#x26; : &#x26;
+&amp;#x27; : &#x27;
+&amp;#x28; : &#x28;
+&amp;#x29; : &#x29;
+&amp;#x2A; : &#x2A;
+&amp;#x2B; : &#x2B;
+&amp;#x2C; : &#x2C;
+&amp;#x2D; : &#x2D;
+&amp;#x2E; : &#x2E;
+&amp;#x2F; : &#x2F;
+&amp;#x30; : &#x30;
+&amp;#x31; : &#x31;
+&amp;#x32; : &#x32;
+&amp;#x33; : &#x33;
+&amp;#x34; : &#x34;
+&amp;#x35; : &#x35;
+&amp;#x36; : &#x36;
+&amp;#x37; : &#x37;
+&amp;#x38; : &#x38;
+&amp;#x39; : &#x39;
+&amp;#x3A; : &#x3A;
+&amp;#x3B; : &#x3B;
+&amp;#x3C; : &#x3C;
+&amp;#x3D; : &#x3D;
+&amp;#x3E; : &#x3E;
+&amp;#x3F; : &#x3F;
+&amp;#x40; : &#x40;
+&amp;#x41; : &#x41;
+&amp;#x42; : &#x42;
+&amp;#x43; : &#x43;
+&amp;#x44; : &#x44;
+&amp;#x45; : &#x45;
+&amp;#x46; : &#x46;
+&amp;#x47; : &#x47;
+&amp;#x48; : &#x48;
+&amp;#x49; : &#x49;
+&amp;#x4A; : &#x4A;
+&amp;#x4B; : &#x4B;
+&amp;#x4C; : &#x4C;
+&amp;#x4D; : &#x4D;
+&amp;#x4E; : &#x4E;
+&amp;#x4F; : &#x4F;
+&amp;#x50; : &#x50;
+&amp;#x51; : &#x51;
+&amp;#x52; : &#x52;
+&amp;#x53; : &#x53;
+&amp;#x54; : &#x54;
+&amp;#x55; : &#x55;
+  </fo:block>
+</fo:table-cell>
+<fo:table-cell>
+  <fo:block>
+  </fo:block>
+</fo:table-cell>
+<fo:table-cell>
+  <fo:block>
+&amp;#x56; : &#x56;
+&amp;#x57; : &#x57;
+&amp;#x58; : &#x58;
+&amp;#x59; : &#x59;
+&amp;#x5A; : &#x5A;
+&amp;#x5B; : &#x5B;
+&amp;#x5C; : &#x5C;
+&amp;#x5D; : &#x5D;
+&amp;#x5E; : &#x5E;
+&amp;#x5F; : &#x5F;
+&amp;#x60; : &#x60;
+&amp;#x61; : &#x61;
+&amp;#x62; : &#x62;
+&amp;#x63; : &#x63;
+&amp;#x64; : &#x64;
+&amp;#x65; : &#x65;
+&amp;#x66; : &#x66;
+&amp;#x67; : &#x67;
+&amp;#x68; : &#x68;
+&amp;#x69; : &#x69;
+&amp;#x6A; : &#x6A;
+&amp;#x6B; : &#x6B;
+&amp;#x6C; : &#x6C;
+&amp;#x6D; : &#x6D;
+&amp;#x6E; : &#x6E;
+&amp;#x6F; : &#x6F;
+&amp;#x70; : &#x70;
+&amp;#x71; : &#x71;
+&amp;#x72; : &#x72;
+&amp;#x73; : &#x73;
+&amp;#x74; : &#x74;
+&amp;#x75; : &#x75;
+&amp;#x76; : &#x76;
+&amp;#x77; : &#x77;
+&amp;#x78; : &#x78;
+&amp;#x79; : &#x79;
+&amp;#x7A; : &#x7A;
+&amp;#x7B; : &#x7B;
+&amp;#x7C; : &#x7C;
+&amp;#x7D; : &#x7D;
+&amp;#x7E; : &#x7E;
+&amp;#xA1; : &#xA1;
+&amp;#xA2; : &#xA2;
+&amp;#xA3; : &#xA3;
+&amp;#xA4; : &#xA4;
+&amp;#xA5; : &#xA5;
+&amp;#xA6; : &#xA6;
+&amp;#xA7; : &#xA7;
+&amp;#xA8; : &#xA8;
+&amp;#xA9; : &#xA9;
+&amp;#xAA; : &#xAA;
+&amp;#xAB; : &#xAB;
+&amp;#xAC; : &#xAC;
+  </fo:block>
+</fo:table-cell>
+<fo:table-cell>
+  <fo:block>
+  </fo:block>
+</fo:table-cell>
+<fo:table-cell>
+  <fo:block>
+&amp;#xAE; : &#xAE;
+&amp;#xAF; : &#xAF;
+&amp;#xB0; : &#xB0;
+&amp;#xB1; : &#xB1;
+&amp;#xB2; : &#xB2;
+&amp;#xB3; : &#xB3;
+&amp;#xB4; : &#xB4;
+&amp;#xB5; : &#xB5;
+&amp;#xB6; : &#xB6;
+&amp;#xB7; : &#xB7;
+&amp;#xB8; : &#xB8;
+&amp;#xB9; : &#xB9;
+&amp;#xBA; : &#xBA;
+&amp;#xBB; : &#xBB;
+&amp;#xBC; : &#xBC;
+&amp;#xBD; : &#xBD;
+&amp;#xBE; : &#xBE;
+&amp;#xBF; : &#xBF;
+&amp;#xC0; : &#xC0;
+&amp;#xC1; : &#xC1;
+&amp;#xC2; : &#xC2;
+&amp;#xC3; : &#xC3;
+&amp;#xC4; : &#xC4;
+&amp;#xC5; : &#xC5;
+&amp;#xC6; : &#xC6;
+&amp;#xC7; : &#xC7;
+&amp;#xC8; : &#xC8;
+&amp;#xC9; : &#xC9;
+&amp;#xCA; : &#xCA;
+&amp;#xCB; : &#xCB;
+&amp;#xCC; : &#xCC;
+&amp;#xCD; : &#xCD;
+&amp;#xCE; : &#xCE;
+&amp;#xCF; : &#xCF;
+&amp;#xD0; : &#xD0;
+&amp;#xD1; : &#xD1;
+&amp;#xD2; : &#xD2;
+&amp;#xD3; : &#xD3;
+&amp;#xD4; : &#xD4;
+&amp;#xD5; : &#xD5;
+&amp;#xD6; : &#xD6;
+&amp;#xD7; : &#xD7;
+&amp;#xD8; : &#xD8;
+&amp;#xD9; : &#xD9;
+&amp;#xDA; : &#xDA;
+&amp;#xDB; : &#xDB;
+&amp;#xDC; : &#xDC;
+&amp;#xDD; : &#xDD;
+&amp;#xDE; : &#xDE;
+&amp;#xDF; : &#xDF;
+&amp;#xE0; : &#xE0;
+&amp;#xE1; : &#xE1;
+&amp;#xE2; : &#xE2;
+  </fo:block>
+</fo:table-cell>
+<fo:table-cell>
+  <fo:block>
+  </fo:block>
+</fo:table-cell>
+<fo:table-cell>
+  <fo:block>
+&amp;#xE3; : &#xE3;
+&amp;#xE4; : &#xE4;
+&amp;#xE5; : &#xE5;
+&amp;#xE6; : &#xE6;
+&amp;#xE7; : &#xE7;
+&amp;#xE8; : &#xE8;
+&amp;#xE9; : &#xE9;
+&amp;#xEA; : &#xEA;
+&amp;#xEB; : &#xEB;
+&amp;#xEC; : &#xEC;
+&amp;#xED; : &#xED;
+&amp;#xEE; : &#xEE;
+&amp;#xEF; : &#xEF;
+&amp;#xF0; : &#xF0;
+&amp;#xF1; : &#xF1;
+&amp;#xF2; : &#xF2;
+&amp;#xF3; : &#xF3;
+&amp;#xF4; : &#xF4;
+&amp;#xF5; : &#xF5;
+&amp;#xF6; : &#xF6;
+&amp;#xF7; : &#xF7;
+&amp;#xF8; : &#xF8;
+&amp;#xF9; : &#xF9;
+&amp;#xFA; : &#xFA;
+&amp;#xFB; : &#xFB;
+&amp;#xFC; : &#xFC;
+&amp;#xFD; : &#xFD;
+&amp;#xFE; : &#xFE;
+&amp;#xFF; : &#xFF;
+&amp;#x0152; : &#x0152;
+&amp;#x0153; : &#x0153;
+&amp;#x0160; : &#x0160;
+&amp;#x0161; : &#x0161;
+&amp;#x0178; : &#x0178;
+&amp;#x017D; : &#x017D;
+&amp;#x017E; : &#x017E;
+&amp;#x0192; : &#x0192;
+&amp;#x02DC; : &#x02DC;
+&amp;#x2013; : &#x2013;
+&amp;#x2014; : &#x2014;
+&amp;#x2018; : &#x2018;
+&amp;#x2019; : &#x2019;
+&amp;#x201A; : &#x201A;
+&amp;#x201C; : &#x201C;
+&amp;#x201D; : &#x201D;
+&amp;#x201E; : &#x201E;
+&amp;#x2020; : &#x2020;
+&amp;#x2021; : &#x2021;
+&amp;#x2022; : &#x2022;
+&amp;#x2026; : &#x2026;
+&amp;#x2030; : &#x2030;
+&amp;#x2039; : &#x2039;
+&amp;#x203A; : &#x203A;
+&amp;#x2122; : &#x2122;
+  </fo:block>
+</fo:table-cell>
+</fo:table-row>
+</fo:table-body>
+</fo:table>
   </fo:block>
 
+  
 
-  <fo:block space-after.optimum="10pt" font-family="Helvetica">
-
+  <fo:block font-family="Helvetica" font-size="12pt">
+Some special characters:
+  </fo:block>
+  <fo:block font-family="Helvetica"  font-size="12pt">
+Euro symbol in Helvetica 12 ( dec 8364, hex 20AC): &#x20AC;
+  </fo:block>
+  <fo:block font-family="NotoSans"  font-size="12pt">
+Ruppe symbol in NotoSans 12 (dec 8377, hex 20B9): &#x20B9;
+  </fo:block>
+  <fo:block font-family="NotoSans"  font-size="12pt">
+I &#x2665; NotoSans!
   </fo:block>
 
 </fo:flow>

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/widget/LookupForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/widget/LookupForms.xml?rev=1649482&r1=1649481&r2=1649482&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/widget/LookupForms.xml (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/widget/LookupForms.xml Mon Jan  5 08:50:30 2015
@@ -38,7 +38,7 @@ under the License.
 
     <form name="lookupDataResourceContent" default-entity-name="DataResourceContentView" target="LookupSubContent" title="" type="single"
         header-row-style="header-row" default-table-style="basic-table">
-        <field name="dataResourceId">
+        <field name="dataResourceId" title="${uiLabelMap.ContentDataResourceId}">
             <text-find/>
         </field>
         <field name="coContentId">

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/widget/cms/CMSForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/widget/cms/CMSForms.xml?rev=1649482&r1=1649481&r2=1649482&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/widget/cms/CMSForms.xml (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/widget/cms/CMSForms.xml Mon Jan  5 08:50:30 2015
@@ -27,7 +27,7 @@ under the License.
         <field name="caContentAssocTypeId"><text-find/></field>
         <field name="caFromDate" title="${uiLabelMap.CommonFromDate}"><date-find/></field>
         <field name="contentId"><text-find/></field>
-        <field name="dataResourceId"><text-find/></field>
+        <field name="dataResourceId" title="${uiLabelMap.ContentDataResourceId}"><text-find/></field>
         <field name="contentName"><text-find/></field>
         <field name="submitButton" title="${uiLabelMap.CommonFind}" widget-style="smallSubmit"><submit button-type="button"/></field>
     </form>
@@ -68,7 +68,7 @@ under the License.
         <field name="caMapKey"><display/></field>
         <field name="caFromDate" title="${uiLabelMap.CommonFromDate}"><display/></field>
         <field name="contentId"><display/></field>
-        <field name="dataResourceId"><display/></field>
+        <field name="dataResourceId" title="${uiLabelMap.ContentDataResourceId}"><display/></field>
         <field name="contentName"><display/></field>
     </form>
 
@@ -77,7 +77,7 @@ under the License.
         <field name="imageData" >
             <file />
         </field>
-        <field name="dataResourceId" >
+        <field name="dataResourceId" title="${uiLabelMap.ContentDataResourceId}" >
             <drop-down allow-empty="false" no-current-selected-key="TEMPLATE_TEXT_ONLY">
                 <option key="TEMPLATE_TEXT_ONLY" description="${uiLabelMap.ContentTemplateTextOnly}"/>
                 <option key="TEMPLATE_IMAGE_CENTERED" description="${uiLabelMap.ContentTemplateImageCentered}"/>
@@ -498,7 +498,7 @@ under the License.
         <field name="dataResourceTitle" title-style="h1" map-name="dummy">
             <display description=""/>
         </field>
-        <field name="dataResourceId">
+        <field name="dataResourceId" title="${uiLabelMap.ContentDataResourceId}">
             <lookup target-form-name="LookupDataResource">
             <sub-hyperlink use-when="&quot;${currentValue.dataResourceId}&quot;.length()>0" link-style="buttontext" target-type="intra-app" target="gotoDataResource" description="${uiLabelMap.ContentGoToDataResource}">
                 <parameter param-name="dataResourceId" from-field="currentValue.dataResourceId"/>

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/widget/compdoc/CompDocTemplateTree.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/widget/compdoc/CompDocTemplateTree.xml?rev=1649482&r1=1649481&r2=1649482&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/widget/compdoc/CompDocTemplateTree.xml (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/widget/compdoc/CompDocTemplateTree.xml Mon Jan  5 08:50:30 2015
@@ -19,7 +19,7 @@ under the License.
 -->
 <trees xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-tree.xsd">
-    <tree name="CompDocTemplateTree" root-node-name="node-root"
+    <tree name="CompDocTemplateTree" entity-name="Content" root-node-name="node-root"
         default-render-style="simple" default-wrap-style="treeWrapper">
         <node name="node-root" wrap-style="treeWrapper">
             <entity-one entity-name="Content" use-cache="false">
@@ -87,7 +87,7 @@ under the License.
         </node>
     </tree>
 
-    <tree name="CompDocInstanceTree" root-node-name="node-root"
+    <tree name="CompDocInstanceTree" entity-name="Content" root-node-name="node-root"
         default-render-style="simple" default-wrap-style="treeWrapper">
         <node name="node-root">
             <entity-one entity-name="Content" use-cache="false">

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/widget/content/ContentForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/widget/content/ContentForms.xml?rev=1649482&r1=1649481&r2=1649482&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/widget/content/ContentForms.xml (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/widget/content/ContentForms.xml Mon Jan  5 08:50:30 2015
@@ -42,7 +42,7 @@ under the License.
                 </entity-options>
             </drop-down>
         </field>
-        <field name="dataResourceId" position="1">
+        <field name="dataResourceId" title="${uiLabelMap.ContentDataResourceId}" position="1">
             <lookup target-form-name="LookupDataResource"/>
         </field>
         <field name="ownerContentId" position="2">
@@ -95,8 +95,8 @@ under the License.
         <field name="localeString" sort-field="true"><display-entity entity-name="CountryCode" key-field-name="countryCode" description="${countryName}[${countryCode}]"></display-entity></field>
         <field name="contentTypeId" sort-field="true"><display-entity entity-name="ContentType"></display-entity></field>
         <field name="mimeTypeId" sort-field="true"><display-entity entity-name="MimeType"></display-entity></field>
-        <field name="dataResourceId" use-when="dataResourceId==null" sort-field="true"><display/></field>
-        <field name="dataResourceId" use-when="dataResourceId!=null" sort-field="true">
+        <field name="dataResourceId" title="${uiLabelMap.ContentDataResourceId}" use-when="dataResourceId==null" sort-field="true"><display/></field>
+        <field name="dataResourceId" title="${uiLabelMap.ContentDataResourceId}" use-when="dataResourceId!=null" sort-field="true">
             <display-entity entity-name="DataResource" description="${dataResourceName}">
                 <sub-hyperlink target="EditDataResource" link-style="buttontext" description="[${dataResourceId}]">
                     <parameter param-name="dataResourceId"/>
@@ -151,14 +151,14 @@ under the License.
                 </entity-options>
             </drop-down>
         </field>
-        <field name="dataResourceId" use-when="dataResourceId != null">
+        <field name="dataResourceId" title="${uiLabelMap.ContentDataResourceId}" use-when="dataResourceId != null">
             <lookup target-form-name="LookupDataResource">
                 <sub-hyperlink link-style="buttontext" target="EditDataResource" description="${uiLabelMap.ContentGoToDataResource}">
                     <parameter param-name="dataResourceId" from-field="currentValue.dataResourceId"/>
                 </sub-hyperlink>
             </lookup>
         </field>
-        <field name="dataResourceId" use-when="dataResourceId == null ">
+        <field name="dataResourceId" title="${uiLabelMap.ContentDataResourceId}" use-when="dataResourceId == null ">
             <lookup target-form-name="LookupDataResource">
                 <sub-hyperlink link-style="buttontext" target="AddDataResourceFromContent" description="${uiLabelMap.FormFieldTitle_newDataResourceId}">
                     <parameter param-name="contentId" from-field="currentValue.contentId"/>

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/widget/content/DataResourceForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/widget/content/DataResourceForms.xml?rev=1649482&r1=1649481&r2=1649482&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/widget/content/DataResourceForms.xml (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/widget/content/DataResourceForms.xml Mon Jan  5 08:50:30 2015
@@ -24,7 +24,7 @@ under the License.
     <form name="FindDataResource" target="findDataResource" type="single"
         header-row-style="header-row" default-table-style="basic-table">
         <field name="noConditionFind"><hidden value="Y"/><!-- if this isn't there then with all fields empty no query will be done --></field>
-        <field name="dataResourceId"><text-find ignore-case="true"/></field>
+        <field name="dataResourceId" title="${uiLabelMap.ContentDataResourceId}"><text-find ignore-case="true"/></field>
         <field name="dataResourceName"><text-find ignore-case="true"/></field>
         <field name="dataResourceTypeId">
             <drop-down allow-empty="true">
@@ -140,7 +140,7 @@ under the License.
                 <field-map field-name="viewSize" from-field="viewSize"/>
             </service>
         </actions>
-        <field name="dataResourceId">
+        <field name="dataResourceId" title="${uiLabelMap.ContentDataResourceId}">
             <hyperlink also-hidden="false" target-type="plain" description="${dataResourceId}" target="javascript:set_value('${dataResourceId}')"/>
         </field>
         <field name="dataResourceName"><display/></field>
@@ -238,7 +238,7 @@ under the License.
     <form name="DataResourceMaster" target="createDataResource" title="" type="single" default-map-name="currentValue"
         header-row-style="header-row" default-table-style="basic-table">
         <auto-fields-entity entity-name="DataResource" default-field-type="edit"/>
-        <field name="dataResourceId"></field>
+        <field name="dataResourceId" title="${uiLabelMap.ContentDataResourceId}"></field>
         <field name="dataResourceTypeId">
             <drop-down allow-empty="true">
                 <entity-options description="${description}" entity-name="DataResourceType" key-field-name="dataResourceTypeId"/>
@@ -287,14 +287,14 @@ under the License.
 -->
     <form name="AddDataResource" target="createDataResource" title="" type="single" extends="DataResourceMaster"
         header-row-style="header-row" default-table-style="basic-table">
-        <field name="dataResourceId"><text/></field>
+        <field name="dataResourceId" title="${uiLabelMap.ContentDataResourceId}"><text/></field>
         <field name="submitButton" title="${uiLabelMap.CommonCreate}" widget-style="smallSubmit"><submit button-type="button"/></field>
         <field name="objectInfo" title="${uiLabelMap.ContentUrl}"/>
         <field name="mode"><hidden value="CREATE"/></field>
     </form>
     <form name="AddDataResourceText" target="createDataResourceAndText" title="" type="single" extends="DataResourceMaster"
         header-row-style="header-row" default-table-style="basic-table">
-        <field name="dataResourceId"><text/></field>
+        <field name="dataResourceId" title="${uiLabelMap.ContentDataResourceId}"><text/></field>
         <field name="dataResourceTypeId"><hidden value="ELECTRONIC_TEXT"/></field>
         <field name="dataResourceTypeIdDisplay" title="${uiLabelMap.CommonType}" field-name="dataResourceTypeId">
             <display description="ELECTRONIC_TEXT" also-hidden="false"/>
@@ -304,7 +304,7 @@ under the License.
     </form>
     <form name="AddDataResourceUrl" target="createDataResourceUrl" title="" type="single" extends="DataResourceMaster"
         header-row-style="header-row" default-table-style="basic-table">
-        <field name="dataResourceId"><text/></field>
+        <field name="dataResourceId" title="${uiLabelMap.ContentDataResourceId}"><text/></field>
         <field name="objectInfo" title="${uiLabelMap.ContentUrl}"><text/></field>
         <field name="dataResourceTypeId"><hidden value="URL_RESOURCE"/></field>
         <field name="dataResourceTypeIdDisplay" title="${uiLabelMap.CommonType}" field-name="dataResourceTypeId">
@@ -348,17 +348,17 @@ under the License.
     </form>
     <form name="ImageUpload" target="uploadImage" title="" type="upload"  default-map-name="currentValue"
         header-row-style="header-row" default-table-style="basic-table">
-        <field name="dataResourceId"><display/></field>
+        <field name="dataResourceId" title="${uiLabelMap.ContentDataResourceId}"><display/></field>
         <field name="dataResourceTypeId" ><hidden/></field>
-        <field name="objectInfo"><display /></field>
-        <field name="imageData" entity-name="ImageDataResource"><file/></field>
+        <field name="objectInfo" title="${uiLabelMap.ContentUploadedFile}"><display /></field>
+        <field name="imageData" entity-name="ImageDataResource" title="${uiLabelMap.ContentFile}"><file/></field>
         <field name="submitButton" title="${uiLabelMap.CommonUpload}" widget-style="smallSubmit"><submit button-type="button"/></field>
     </form>
     <!-- DataResourceAttribute forms -->
     <form name="AddDataResourceAttribute" target="addDataResourceAttribute" title="" type="single"
         header-row-style="header-row" default-table-style="basic-table">
         <auto-fields-service service-name="createDataResourceAttribute"/>
-        <field name="dataResourceId" title=" " map-name="currentValue"><display/></field>
+        <field name="dataResourceId" title="${uiLabelMap.ContentDataResourceId}" map-name="currentValue"><display/></field>
         <field name="submitButton" title="${uiLabelMap.CommonAdd}" widget-style="smallSubmit"><submit button-type="button"/></field>
     </form>
     <form name="ListDataResourceAttribute" list-name="dataResourceAttribute" target="updateDataResourceAttribute" title="" type="list"
@@ -386,7 +386,7 @@ under the License.
     <form name="AddDataResourceRole" target="addDataResourceRole" title="" type="single"
         header-row-style="header-row" default-table-style="basic-table">
         <auto-fields-entity entity-name="DataResourceRole"/>
-        <field name="dataResourceId" title=" " map-name="currentValue"><display/></field>
+        <field name="dataResourceId" title="${uiLabelMap.ContentDataResourceId}" map-name="currentValue"><display/></field>
         <field name="partyId" title=" "><lookup target-form-name="LookupPerson"/></field>
         <field name="roleTypeId">
             <drop-down allow-empty="true">
@@ -422,7 +422,7 @@ under the License.
     <form name="AddDataResourceProductFeature" target="createDataResourceProductFeature" title="" type="single"
         header-row-style="header-row" default-table-style="basic-table">
         <auto-fields-service service-name="createProductFeatureDataResource"/>
-        <field name="dataResourceId" map-name="currentValue"><display/></field>
+        <field name="dataResourceId" title="${uiLabelMap.ContentDataResourceId}" map-name="currentValue"><display/></field>
         <field name="productFeatureId" widget-style="buttontext"><lookup target-form-name="LookupProductFeature"/></field>
         <field name="submitButton" title="${uiLabelMap.CommonAdd}" widget-style="smallSubmit"><submit button-type="button"/></field>
     </form>
@@ -487,7 +487,7 @@ under the License.
             <entity-one entity-name="ElectronicText" value-field="electronicText"/>
         </actions>
         <alt-target use-when="electronicText==null" target="addElectronicText"/>
-        <field name="dataResourceId" title=" " widget-style="buttontext"><display also-hidden="true"/></field>
+        <field name="dataResourceId" title="${uiLabelMap.ContentDataResourceId}" widget-style="buttontext"><display also-hidden="true"/></field>
         <field name="textData" widget-style="buttontext"><textarea cols="120" rows="24"/></field>
         <field name="submitButton"  use-when="electronicText!=null" title="${uiLabelMap.CommonUpdate}" widget-style="smallSubmit"><submit button-type="button"/></field>
         <field name="submitButton" use-when="electronicText==null" title="${uiLabelMap.CommonAdd}" widget-style="smallSubmit"><submit button-type="button"/></field>
@@ -497,7 +497,7 @@ under the License.
     <form name="AddHtmlText" target="addHtmlText" title="" type="single"
         header-row-style="header-row" default-table-style="basic-table">
         <auto-fields-entity entity-name="ElectronicText"/>
-        <field name="dataResourceId" title=" " widget-style="buttontext" map-name="currentValue"><display/></field>
+        <field name="dataResourceId" title="${uiLabelMap.ContentDataResourceId}" widget-style="buttontext" map-name="currentValue"><display/></field>
         <field name="textData" id-name="textData"><textarea rows="24" cols="120"/></field>
         <field name="submitButton" title="${uiLabelMap.CommonAdd}" widget-style="smallSubmit"><submit button-type="button"/></field>
     </form>
@@ -508,7 +508,7 @@ under the License.
         </actions>
         <alt-target use-when="electronicText==null" target="addHtmlText"/>
         <auto-fields-entity entity-name="ElectronicText"/>
-        <field name="dataResourceId" title=" " widget-style="buttontext"><display/></field>
+        <field name="dataResourceId" title="${uiLabelMap.ContentDataResourceId}" widget-style="buttontext"><display/></field>
         <field name="textData" id-name="textData" encode-output="true"><textarea cols="120" rows="20" visual-editor-enable="true" /></field>
         <field name="submitButton" title="${uiLabelMap.CommonUpdate}" widget-style="smallSubmit"><submit button-type="button"/></field>
     </form>

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/widget/content/DataResourceScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/widget/content/DataResourceScreens.xml?rev=1649482&r1=1649481&r2=1649482&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/widget/content/DataResourceScreens.xml (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/widget/content/DataResourceScreens.xml Mon Jan  5 08:50:30 2015
@@ -214,8 +214,15 @@ under the License.
                 <decorator-screen name="commonDataResourceDecorator" location="${parameters.mainDecoratorLocation}">
                     <decorator-section name="body">
                         <include-form name="ImageUpload" location="component://content/widget/content/DataResourceForms.xml"/>
-                        <content dataresource-id="${currentValue.dataResourceId}" border="false"/>
-                    </decorator-section>
+                        <!-- Commented out the following snippet because the behaviour is too random (does not depend on browser)-->
+<!--                        <content dataresource-id="${currentValue.dataResourceId}" border="false"/>
+                        <horizontal-separator></horizontal-separator>
+                        <label>${uiLabelMap.ContentContentShow}:</label>
+                        <container>
+                            <content dataresource-id="${currentValue.dataResourceId}" border="false"/>
+                            <horizontal-separator></horizontal-separator>
+                        </container>
+-->                    </decorator-section>
                 </decorator-screen>
             </widgets>
         </section>

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/widget/forum/ForumTrees.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/widget/forum/ForumTrees.xml?rev=1649482&r1=1649481&r2=1649482&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/widget/forum/ForumTrees.xml (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/widget/forum/ForumTrees.xml Mon Jan  5 08:50:30 2015
@@ -23,7 +23,7 @@ under the License.
 
 <!--    <tree name="MessageTree" root-node-name="node-root"
         default-render-style="expand-collapse" expand-collapse-request="findForumThreads?forumId=${parameters.forumId}"> -->
-    <tree name="MessageTree" root-node-name="node-root" default-render-style="simple">
+    <tree name="MessageTree" entity-name="Content" root-node-name="node-root" default-render-style="simple">
         <node name="node-root">
             <entity-one entity-name="Content" use-cache="false" value-field="rsp">
                 <field-map field-name="contentId" from-field="parameters.forumId"/>

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/widget/website/WebSiteForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/widget/website/WebSiteForms.xml?rev=1649482&r1=1649481&r2=1649482&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/widget/website/WebSiteForms.xml (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/content/widget/website/WebSiteForms.xml Mon Jan  5 08:50:30 2015
@@ -153,7 +153,7 @@ under the License.
             <sort-field name="deleteLink"/>
         </sort-order>
     </form>
-    <form name="CreateWebSiteContent" type="single" target="CreateWebSiteContent" title="" default-map-name="webSite"
+    <form name="CreateWebSiteContent" type="single" target="CreateWebSiteContent" title=""
         header-row-style="header-row" default-table-style="basic-table">
         <auto-fields-service service-name="createWebSiteContent"/>
         <field name="webSiteId" map-name="webSite"><display also-hidden="true"/></field>
@@ -291,4 +291,4 @@ under the License.
             </hyperlink>
         </field>
     </form>
-</forms>
\ No newline at end of file
+</forms>

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/humanres/webapp/humanres/WEB-INF/actions/category/CategoryTree.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/humanres/webapp/humanres/WEB-INF/actions/category/CategoryTree.groovy?rev=1649482&r1=1649481&r2=1649482&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/humanres/webapp/humanres/WEB-INF/actions/category/CategoryTree.groovy (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/humanres/webapp/humanres/WEB-INF/actions/category/CategoryTree.groovy Mon Jan  5 08:50:30 2015
@@ -23,6 +23,7 @@
  */
 import org.ofbiz.entity.util.EntityUtil;
 import org.ofbiz.base.util.*;
+import org.ofbiz.party.party.PartyHelper;
 import org.ofbiz.product.catalog.*;
 import org.ofbiz.product.category.*;
 import javolution.util.FastMap;
@@ -41,20 +42,19 @@ existParties =  FastList.newInstance();
 subtopLists =  FastList.newInstance();
 
 //internalOrg list
-partyRelationships = EntityUtil.filterByDate(delegator.findByAnd("PartyRelationship", [partyIdFrom : partyId, partyRelationshipTypeId : "GROUP_ROLLUP"], null, false));
+partyRelationships = from("PartyRelationship").where("partyIdFrom", partyId, "partyRelationshipTypeId", "GROUP_ROLLUP").filterByDate().queryList();
 if (partyRelationships) {
     //root
-    partyRoot = delegator.findOne("PartyGroup", [partyId : partyId], false);
+    partyRoot = from("PartyGroup").where("partyId", partyId).queryOne();
     partyRootMap = FastMap.newInstance();
     partyRootMap.put("partyId", partyId);
     partyRootMap.put("groupName", partyRoot.getString("groupName"));
 
     //child
     for(partyRelationship in partyRelationships) {
-        partyGroup = delegator.findOne("PartyGroup", [partyId : partyRelationship.getString("partyIdTo")], false);
-        partyGroupMap = FastMap.newInstance();
-        partyGroupMap.put("partyId", partyGroup.getString("partyId"));
-        partyGroupMap.put("groupName", partyGroup.getString("groupName"));
+        partyGroupMap = [:];
+        partyGroupMap.put("partyId", partyRelationship.getString("partyIdTo"));
+        partyGroupMap.put("groupName", PartyHelper.getPartyName(delegator, partyRelationship.getString("partyIdTo"), false));
         completedTreeContext.add(partyGroupMap);
 
         subtopLists.addAll(partyRelationship.getString("partyIdTo"));

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/humanres/widget/PersonTrainingScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/humanres/widget/PersonTrainingScreens.xml?rev=1649482&r1=1649481&r2=1649482&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/humanres/widget/PersonTrainingScreens.xml (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/humanres/widget/PersonTrainingScreens.xml Mon Jan  5 08:50:30 2015
@@ -139,7 +139,7 @@
                                     <if-compare field="workEffort.currentStatusId" operator="not-equals" value="CAL_CANCELLED"/>
                                 </and>
                                 <if-empty field="workEffort"/>
-                                <if-has-permission permission="WORKEFFORTMGR" action="ADMIN"/>
+                                <if-has-permission permission="WORKEFFORTMGR" action="_ADMIN"/>
                             </or>
                             <if-compare field="parameters.form" operator="equals" value="edit"/>
                         </and>

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/config/ManufacturingUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/config/ManufacturingUiLabels.xml?rev=1649482&r1=1649481&r2=1649482&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/config/ManufacturingUiLabels.xml (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/config/ManufacturingUiLabels.xml Mon Jan  5 08:50:30 2015
@@ -1630,7 +1630,7 @@
         <value xml:lang="de">Abhängige Produktionsaufträge</value>
         <value xml:lang="en">Succeeding Production Run(s)</value>
         <value xml:lang="es">Esfuerzos de trabajo dependientes</value>
-        <value xml:lang="fr">Exécution de production dépendantes</value>
+        <value xml:lang="fr">Exécution d'ordre de fabrication/s suivant/s</value>
         <value xml:lang="it">Ordini di produzione successivi</value>
         <value xml:lang="ja">依存する生産実行</value>
         <value xml:lang="nl">Opvolgende productierun(s)</value>
@@ -2675,7 +2675,7 @@
         <value xml:lang="de">Erforderliche Produktionsaufträge</value>
         <value xml:lang="en">Preceding Production Run(s)</value>
         <value xml:lang="es">Órdenes de producción obligatorias</value>
-        <value xml:lang="fr">Cadences de production obligatoires</value>
+        <value xml:lang="fr">Exécution d'ordre de fabrication/s précédent/s</value>
         <value xml:lang="it">Cicli Produzione Precedenti</value>
         <value xml:lang="ja">生産強制実行</value>
         <value xml:lang="nl">Voorafgaande productierun(s)</value>

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/bom/BomSimulation.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/bom/BomSimulation.groovy?rev=1649482&r1=1649481&r2=1649482&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/bom/BomSimulation.groovy (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/bom/BomSimulation.groovy Mon Jan  5 08:50:30 2015
@@ -44,7 +44,7 @@ if (tree) {
         try {
             outMap = [:];
             if (currencyUomId) {
-                outMap = dispatcher.runSync("getProductCost", [productId : node.getProduct().productId,
+                outMap = runService('getProductCost', [productId : node.getProduct().productId,
                                                                              currencyUomId : currencyUomId,
                                                                              costComponentTypePrefix : "EST_STD",
                                                                              userLogin : userLogin]);
@@ -53,7 +53,7 @@ if (tree) {
                 grandTotalCost = grandTotalCost + totalCost ?: 0;
             }
             if (facilityId) {
-                outMap = dispatcher.runSync("getInventoryAvailableByFacility", [productId : node.getProduct().productId,
+                outMap = runService('getInventoryAvailableByFacility', [productId : node.getProduct().productId,
                                                                                               facilityId : facilityId,
                                                                                               userLogin : userLogin]);
                 qoh = outMap.quantityOnHandTotal;

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/bom/EditProductBom.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/bom/EditProductBom.groovy?rev=1649482&r1=1649481&r2=1649482&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/bom/EditProductBom.groovy (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/bom/EditProductBom.groovy Mon Jan  5 08:50:30 2015
@@ -44,7 +44,7 @@ Timestamp fromDate = null;
 if (fromDateStr) fromDate = Timestamp.valueOf(fromDateStr) ?: (Timestamp)request.getAttribute("ProductAssocCreateFromDate");;
 context.fromDate = fromDate;
 
-productAssoc = delegator.findOne("ProductAssoc", [productId : productId, productIdTo : productIdTo, productAssocTypeId : productAssocTypeId, fromDate : fromDate], false);
+productAssoc = from("ProductAssoc").where("productId", productId, "productIdTo", productIdTo, "productAssocTypeId", productAssocTypeId, "fromDate", fromDate).queryOne();
 if (updateMode) {
     productAssoc = [:];
     context.remove("productIdTo");
@@ -58,10 +58,10 @@ if (!productAssoc) useValues = false;
 
 context.useValues = useValues;
 
-Collection assocTypes = delegator.findByAnd("ProductAssocType", [parentTypeId : "PRODUCT_COMPONENT"], ["productAssocTypeId", "description"], false);
+Collection assocTypes = from("ProductAssocType").where("parentTypeId", "PRODUCT_COMPONENT").orderBy("productAssocTypeId", "description").queryList();
 context.assocTypes = assocTypes;
 
-Collection formulae = delegator.findByAnd("CustomMethod", [customMethodTypeId : "BOM_FORMULA"], ["customMethodId", "description"], false);
+Collection formulae = from("CustomMethod").where("customMethodTypeId", "BOM_FORMULA").orderBy("customMethodId", "description").queryList();
 context.formulae = formulae;
 
 if (product) {

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/bom/FindProductBom.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/bom/FindProductBom.groovy?rev=1649482&r1=1649481&r2=1649482&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/bom/FindProductBom.groovy (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/bom/FindProductBom.groovy Mon Jan  5 08:50:30 2015
@@ -20,9 +20,6 @@
 import org.ofbiz.entity.util.*;
 import org.ofbiz.entity.condition.*;
 
-fieldToSelect = ["productId", "internalName", "productAssocTypeId"] as Set;
-orderBy = ["productId", "productAssocTypeId"];
-
 condList = [];
 if (parameters.productId) {
     cond = EntityCondition.makeCondition("productId", EntityOperator.EQUALS, parameters.productId);
@@ -41,8 +38,12 @@ if (parameters.productAssocTypeId) {
                                           ], EntityOperator.OR);
     condList.add(cond);
 }
-cond =  EntityCondition.makeCondition(condList, EntityOperator.AND);
-findOpts = new EntityFindOptions(true, EntityFindOptions.TYPE_SCROLL_INSENSITIVE, EntityFindOptions.CONCUR_READ_ONLY, true);
-bomListIterator = delegator.find("ProductAndAssoc", cond, null, fieldToSelect, orderBy, findOpts);
+bomListIterator = select("productId", "internalName", "productAssocTypeId")
+                    .from("ProductAndAssoc")
+                    .where(condList)
+                    .orderBy("productId", "productAssocTypeId")
+                    .cursorScrollInsensitive()
+                    .cache(true)
+                    .queryIterator();
 
 context.ListProductBom = bomListIterator;

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunActualComponents.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunActualComponents.groovy?rev=1649482&r1=1649481&r2=1649482&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunActualComponents.groovy (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunActualComponents.groovy Mon Jan  5 08:50:30 2015
@@ -22,9 +22,9 @@ import org.ofbiz.widget.html.HtmlFormWra
 productionRunId = parameters.productionRunId ?: parameters.workEffortId;
 
 taskInfos = [];
-tasks = delegator.findByAnd("WorkEffort", [workEffortParentId : productionRunId, workEffortTypeId : "PROD_ORDER_TASK"], ["workEffortId"], false);
+tasks = from("WorkEffort").where("workEffortParentId", productionRunId, "workEffortTypeId", "PROD_ORDER_TASK").orderBy("workEffortId").queryList();
 tasks.each { task ->
-    records = delegator.findByAnd("InventoryItemDetail", [workEffortId : task.workEffortId], null, false);
+    records = from("InventoryItemDetail").where("workEffortId", task.workEffortId).queryList();
     HtmlFormWrapper taskForm = new HtmlFormWrapper("component://manufacturing/widget/manufacturing/ProductionRunForms.xml", "ProductionRunTaskActualComponents", request, response);
     taskForm.putInContext("records", records);
     taskInfos.add([task : task, taskForm : taskForm]);

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunComponents.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunComponents.groovy?rev=1649482&r1=1649481&r2=1649482&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunComponents.groovy (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunComponents.groovy Mon Jan  5 08:50:30 2015
@@ -22,9 +22,9 @@ import org.ofbiz.widget.html.HtmlFormWra
 productionRunId = parameters.productionRunId ?: parameters.workEffortId;
 
 taskInfos = [];
-tasks = delegator.findByAnd("WorkEffort", [workEffortParentId : productionRunId, workEffortTypeId : "PROD_ORDER_TASK"], ["workEffortId"], false);
+tasks = from("WorkEffort").where("workEffortParentId", productionRunId, "workEffortTypeId", "PROD_ORDER_TASK").orderBy("workEffortId").queryList();
 tasks.each { task ->
-    records = delegator.findByAnd("WorkEffortGoodStandard", [workEffortId : task.workEffortId], null, false);
+    records = from("WorkEffortGoodStandard").where("workEffortId", task.workEffortId).queryList();
     HtmlFormWrapper taskForm = new HtmlFormWrapper("component://manufacturing/widget/manufacturing/ProductionRunForms.xml", "ProductionRunTaskComponents", request, response);
     taskForm.putInContext("records", records);
     taskInfos.add([task : task, taskForm : taskForm]);

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunContent.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunContent.groovy?rev=1649482&r1=1649481&r2=1649482&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunContent.groovy (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunContent.groovy Mon Jan  5 08:50:30 2015
@@ -19,16 +19,17 @@
 
 import org.ofbiz.content.content.ContentWorker;
 import org.ofbiz.entity.util.EntityUtil;
+import org.ofbiz.entity.GenericValue;
 
 productionRunId = parameters.productionRunId ?: parameters.workEffortId;
 context.productionRunId = productionRunId;
 
-delivGoodStandard = EntityUtil.getFirst(delegator.findByAnd("WorkEffortGoodStandard", [workEffortId : productionRunId, workEffortGoodStdTypeId : "PRUN_PROD_DELIV", statusId : "WEGS_CREATED"], ["-fromDate"], false));
+delivGoodStandard = from("WorkEffortGoodStandard").where("workEffortId", productionRunId, "workEffortGoodStdTypeId", "PRUN_PROD_DELIV", "statusId", "WEGS_CREATED").orderBy("-fromDate").queryFirst();
 if (delivGoodStandard) {
     context.delivProductId = delivGoodStandard.productId;
 }
 if (context.delivProductId && (parameters.partyId || parameters.contentLocale)) {
-    delivProductContents = EntityUtil.filterByDate(delegator.findByAnd("ProductContentAndInfo", [productId : context.delivProductId], ["-fromDate"], false));
+    delivProductContents = from("ProductContentAndInfo").where("productId", context.delivProductId).orderBy("-fromDate").filterByDate().queryList();
     context.delivProductContents = delivProductContents;
 
     Locale contentLocale = null;
@@ -38,7 +39,7 @@ if (context.delivProductId && (parameter
     delivProductContentsForLocaleAndUser = [];
     delivProductContents.each { delivProductContent ->
         GenericValue content = ContentWorker.findContentForRendering(delegator, delivProductContent.contentId, contentLocale, parameters.partyId, parameters.roleTypeId, true);
-        delivProductContentsForLocaleAndUser.add(EntityUtil.getFirst(delegator.findByAnd("ContentDataResourceView", [contentId : content.contentId], null, false)));
+        delivProductContentsForLocaleAndUser.add(from("ContentDataResourceView").where("contentId", content.contentId).queryFirst());
     }
     context.delivProductContentsForLocaleAndUser = delivProductContentsForLocaleAndUser;
 }

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunCosts.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunCosts.groovy?rev=1649482&r1=1649481&r2=1649482&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunCosts.groovy (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunCosts.groovy Mon Jan  5 08:50:30 2015
@@ -22,16 +22,16 @@ import org.ofbiz.widget.html.HtmlFormWra
 
 productionRunId = parameters.productionRunId ?: parameters.workEffortId;
 taskCosts = [];
-tasks = delegator.findByAnd("WorkEffort", [workEffortParentId : productionRunId, workEffortTypeId : "PROD_ORDER_TASK"], ["workEffortId"], false);
+tasks = from("WorkEffort").where("workEffortParentId", productionRunId, "workEffortTypeId", "PROD_ORDER_TASK").orderBy("workEffortId").queryList();
 tasks.each { task ->
-    costs = EntityUtil.filterByDate(delegator.findByAnd("CostComponent", [workEffortId : task.workEffortId], null, false));
+    costs = from("CostComponent").where("workEffortId", task.workEffortId).filterByDate().queryList();
     HtmlFormWrapper taskCostsForm = new HtmlFormWrapper("component://manufacturing/widget/manufacturing/ProductionRunForms.xml", "ProductionRunTaskCosts", request, response);
     taskCostsForm.putInContext("taskCosts", costs);
     taskCosts.add([task : task ,costsForm : taskCostsForm]);
 }
 // get the costs directly associated to the production run (e.g. overhead costs)
-productionRun = delegator.findOne("WorkEffort", [workEffortId: productionRunId], true);
-costs = EntityUtil.filterByDate(delegator.findByAnd("CostComponent", [workEffortId : productionRunId], null, false));
+productionRun = from("WorkEffort").where("workEffortId", productionRunId).cache(true).queryOne();
+costs = from("CostComponent").where("workEffortId", productionRunId).filterByDate().queryList();
 HtmlFormWrapper taskCostsForm = new HtmlFormWrapper("component://manufacturing/widget/manufacturing/ProductionRunForms.xml", "ProductionRunTaskCosts", request, response);
 taskCostsForm.putInContext("taskCosts", costs);
 taskCosts.add([task : productionRun ,costsForm : taskCostsForm]);

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunDeclaration.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunDeclaration.groovy?rev=1649482&r1=1649481&r2=1649482&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunDeclaration.groovy (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunDeclaration.groovy Mon Jan  5 08:50:30 2015
@@ -36,7 +36,7 @@ if (productionRunId) {
         context.productionRun = productionRun.getGenericValue();
 
         // Find all the order items to which this production run is linked.
-        orderItems = delegator.findByAnd("WorkOrderItemFulfillment", [workEffortId : productionRunId], null, false);
+        orderItems = from("WorkOrderItemFulfillment").where("workEffortId", productionRunId).queryList();
         if (orderItems) {
             context.orderItems = orderItems;
         }
@@ -44,7 +44,7 @@ if (productionRunId) {
         quantityToProduce = productionRun.getGenericValue().get("quantityToProduce") ?: 0.0;
 
         // Find the inventory items produced
-        inventoryItems = delegator.findByAnd("WorkEffortInventoryProduced", [workEffortId : productionRunId], null, false);
+        inventoryItems = from("WorkEffortInventoryProduced").where("workEffortId", productionRunId).queryList();
         context.inventoryItems = inventoryItems;
         if (inventoryItems) {
             lastWorkEffortInventoryProduced = (GenericValue)inventoryItems.get(inventoryItems.size() - 1);
@@ -95,7 +95,7 @@ if (productionRunId) {
         // routingTask update sub-screen
         routingTaskId = parameters.routingTaskId;
         if (routingTaskId && (actionForm.equals("UpdateRoutingTask") || actionForm.equals("EditRoutingTask"))) {
-            routingTask = delegator.findOne("WorkEffort", [workEffortId : routingTaskId], false);
+            routingTask = from("WorkEffort").where("workEffortId", routingTaskId).queryOne();
             Map routingTaskData = routingTask.getAllFields();
             routingTaskData.estimatedSetupMillis = routingTask.getDouble("estimatedSetupMillis");
             routingTaskData.estimatedMilliSeconds = routingTask.getDouble("estimatedMilliSeconds");
@@ -105,7 +105,7 @@ if (productionRunId) {
             // Get the list of deliverable products, i.e. the WorkEffortGoodStandard entries
             // with workEffortGoodStdTypeId = "PRUNT_PROD_DELIV":
             // first of all we get the template task (the routing task)
-            templateTaskAssoc = EntityUtil.getFirst(EntityUtil.filterByDate(delegator.findByAnd("WorkEffortAssoc", [workEffortIdTo : routingTask.workEffortId, workEffortAssocTypeId : "WORK_EFF_TEMPLATE"], null, false)));
+            templateTaskAssoc = from("WorkEffortAssoc").where("workEffortIdTo", routingTask.workEffortId, "workEffortAssocTypeId", "WORK_EFF_TEMPLATE").filterByDate().queryFirst();
             templateTask = [:];
             if (templateTaskAssoc) {
                 templateTask = templateTaskAssoc.getRelatedOne("FromWorkEffort", false);
@@ -116,7 +116,7 @@ if (productionRunId) {
             }
             context.delivProducts = delivProducts;
             // Get the list of delivered products, i.e. inventory items
-            prunInventoryProduced = delegator.findByAnd("WorkEffortAndInventoryProduced", [workEffortId : routingTaskId], null, false);
+            prunInventoryProduced = from("WorkEffortAndInventoryProduced").where("workEffortId", routingTaskId).queryList();
             context.prunInventoryProduced = prunInventoryProduced;
         }
 
@@ -130,9 +130,8 @@ if (productionRunId) {
             if ("PRUN_RUNNING".equals(task.currentStatusId)) {
                 // Use WorkEffortGoodStandard to figure out if there are products which are needed for this task (PRUNT_PRODNEEDED) and which have not been issued (ie, WEGS_CREATED).
                 // If so this task should have products issued
-                components = delegator.findByAnd("WorkEffortGoodStandard", [workEffortId : task.workEffortId, workEffortGoodStdTypeId : "PRUNT_PROD_NEEDED"], null, false);
-                List notIssued = EntityUtil.filterByAnd(components, [statusId : "WEGS_CREATED"]);
-                if (components && notIssued) {
+                components = from("WorkEffortGoodStandard").where("workEffortId", task.workEffortId, "workEffortGoodStdTypeId", "PRUNT_PROD_NEEDED", "statusId", "WEGS_CREATED").queryList();
+                if (components) {
                     issueTaskId = task.workEffortId;
                 }
                 if (!issueTaskId) {
@@ -170,7 +169,7 @@ if (productionRunId) {
                 componentData.internalName = componentName;
                 componentData.workEffortName = workEffortName;
                 componentData.facilityId = productionRunTask.facilityId;
-                issuances = delegator.findByAnd("WorkEffortAndInventoryAssign", [workEffortId : component.workEffortId, productId : product.productId], null, false);
+                issuances = from("WorkEffortAndInventoryAssign").where("workEffortId", component.workEffortId, "productId", product.productId).queryList();
                 totalIssued = 0.0;
                 issuances.each { issuance ->
                     issued = issuance.quantity;
@@ -178,10 +177,10 @@ if (productionRunId) {
                         totalIssued += issued;
                     }
                 }
-                returns = delegator.findByAnd("WorkEffortAndInventoryProduced", [workEffortId : component.workEffortId , productId : product.productId], null, false);
+                returns = from("WorkEffortAndInventoryProduced").where("workEffortId", component.workEffortId , "productId", product.productId).queryList();
                 totalReturned = 0.0;
                 returns.each { returned ->
-                    returnDetail = EntityUtil.getFirst(delegator.findByAnd("InventoryItemDetail", [inventoryItemId : returned.inventoryItemId], ["inventoryItemDetailSeqId"], false));
+                    returnDetail = from("InventoryItemDetail").where("inventoryItemId", returned.inventoryItemId).orderBy("inventoryItemDetailSeqId").queryFirst();
                     if (returnDetail) {
                         qtyReturned = returnDetail.quantityOnHandDiff;
                         if (qtyReturned) {
@@ -206,7 +205,7 @@ if (productionRunId) {
             }
         }
         // Content
-        productionRunContents = EntityUtil.filterByDate(delegator.findByAnd("WorkEffortContentAndInfo", [workEffortId : productionRunId], ["-fromDate"], false));
+        productionRunContents = from("WorkEffortContentAndInfo").where("workEffortId", productionRunId).orderBy("-fromDate").filterByDate().queryList();
         context.productionRunContents = productionRunContents;
         context.productionRunComponentsData = productionRunComponentsData;
         context.productionRunComponentsDataReadyForIssuance = productionRunComponentsDataReadyForIssuance;

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunFixedAssets.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunFixedAssets.groovy?rev=1649482&r1=1649481&r2=1649482&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunFixedAssets.groovy (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ProductionRunFixedAssets.groovy Mon Jan  5 08:50:30 2015
@@ -22,7 +22,7 @@ import org.ofbiz.widget.html.HtmlFormWra
 productionRunId = parameters.productionRunId ?: parameters.workEffortId;
 
 taskInfos = [];
-tasks = delegator.findByAnd("WorkEffort", [workEffortParentId : productionRunId, workEffortTypeId : "PROD_ORDER_TASK"], ["workEffortId"], false);
+tasks = from("WorkEffort").where("workEffortParentId", productionRunId, "workEffortTypeId", "PROD_ORDER_TASK").orderBy("workEffortId").queryList();
 tasks.each { task ->
     records = task.getRelated("WorkEffortFixedAssetAssign", null, null, false);
     HtmlFormWrapper taskForm = new HtmlFormWrapper("component://manufacturing/widget/manufacturing/ProductionRunForms.xml", "ProductionRunTaskFixedAssets", request, response);

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ViewProductionRun.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ViewProductionRun.groovy?rev=1649482&r1=1649481&r2=1649482&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ViewProductionRun.groovy (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/ViewProductionRun.groovy Mon Jan  5 08:50:30 2015
@@ -44,7 +44,7 @@ if (productionRunId) {
         context.productionRunData = productionRunData;
 
         // Find all the order items to which this production run is linked.
-        orderItems = delegator.findByAnd("WorkOrderItemFulfillment", [workEffortId : productionRunId], null, false);
+        orderItems = from("WorkOrderItemFulfillment").where("workEffortId", productionRunId).queryList();
         if (orderItems) {
             context.orderItems = orderItems;
         }
@@ -55,7 +55,7 @@ if (productionRunId) {
         context.productionRunComponents = productionRun.getProductionRunComponents();;
 
         // Find all the notes linked to this production run.
-        productionRunNoteData = delegator.findByAnd("WorkEffortNoteAndData", [workEffortId : productionRunId], null, false);
+        productionRunNoteData = from("WorkEffortNoteAndData").where("workEffortId", productionRunId).queryList();
         if (productionRunNoteData) {
             context.productionRunNoteData = productionRunNoteData;
         }

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/WorkWithShipmentPlans.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/WorkWithShipmentPlans.groovy?rev=1649482&r1=1649481&r2=1649482&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/WorkWithShipmentPlans.groovy (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/jobshopmgt/WorkWithShipmentPlans.groovy Mon Jan  5 08:50:30 2015
@@ -25,7 +25,7 @@ import org.ofbiz.manufacturing.jobshopmg
 shipmentPlans = [];
 rows = [];
 if (shipment && shipment.shipmentId) {
-    shipmentPlans = delegator.findByAnd("OrderShipment", [shipmentId : shipment.shipmentId], null, false);
+    shipmentPlans = from("OrderShipment").where("shipmentId", shipment.shipmentId).queryList();
 }
 if (shipmentPlans) {
     workInProgress = "false";
@@ -67,7 +67,7 @@ if (shipmentPlans) {
         // Total quantity planned not issued
         plannedQuantity = 0.0;
         qtyPlannedInShipment = [:];
-        plans = delegator.findByAnd("OrderShipment", [orderId : orderItem.orderId ,orderItemSeqId : orderItem.orderItemSeqId], null, false);
+        plans = from("OrderShipment").where("orderId", orderItem.orderId ,"orderItemSeqId", orderItem.orderItemSeqId).queryList();
         plans.each { plan ->
             if (plan.quantity) {
                 netPlanQty = plan.quantity;
@@ -120,7 +120,7 @@ if (shipmentPlans) {
         }
         oneRow.weight = weight;
         if (product.weightUomId) {
-            weightUom = delegator.findOne("Uom", [uomId : product.weightUomId], true);
+            weightUom = from("Uom").where("uomId", product.weightUomId).cache(true).queryOne();
             oneRow.weightUom = weightUom.abbreviation;
         }
         volume = 0.0;
@@ -138,16 +138,16 @@ if (shipmentPlans) {
             product.widthUomId &&
             product.depthUomId) {
 
-            heightUom = delegator.findOne("Uom", [uomId : product.heightUomId], true);
-            widthUom = delegator.findOne("Uom", [uomId : product.widthUomId], true);
-            depthUom = delegator.findOne("Uom", [uomId : product.depthUomId], true);
+            heightUom = from("Uom").where("uomId", product.heightUomId).cache(true).queryOne();
+            widthUom = from("Uom").where("uomId", product.widthUomId).cache(true).queryOne();
+            depthUom = from("Uom").where("uomId", product.depthUomId).cache(true).queryOne();
             oneRow.volumeUom = heightUom.abbreviation + "x" +
                                     widthUom.abbreviation + "x" +
                                     depthUom.abbreviation;
         }
         rows.add(oneRow);
         // Select the production runs, if available
-        productionRuns = delegator.findByAnd("WorkOrderItemFulfillment", [orderId : shipmentPlan.orderId, orderItemSeqId : shipmentPlan.orderItemSeqId, shipGroupSeqId : shipmentPlan.shipGroupSeqId],["workEffortId"], null, false); // TODO: add shipmentId
+        productionRuns = from("WorkOrderItemFulfillment").where("orderId", shipmentPlan.orderId, "orderItemSeqId", shipmentPlan.orderItemSeqId, "shipGroupSeqId", shipmentPlan.shipGroupSeqId).orderBy("workEffortId").queryList();
         if (productionRuns) {
             workInProgress = "true";
             productionRunsId = "";

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/mrp/FindInventoryEventPlan.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/mrp/FindInventoryEventPlan.groovy?rev=1649482&r1=1649481&r2=1649482&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/mrp/FindInventoryEventPlan.groovy (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/mrp/FindInventoryEventPlan.groovy Mon Jan  5 08:50:30 2015
@@ -60,7 +60,7 @@ if (lookupFlag) {
 
     if ( mainCond) {
     // do the lookup
-        inventoryList = delegator.findList("MrpEvent", mainCond, null, ["productId", "eventDate"], null, false);
+        inventoryList = from("MrpEvent").where(mainCond).orderBy("productId", "eventDate").queryList();
     }
 
     context.inventoryList = inventoryList;

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/PRunsComponentsByFeature.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/PRunsComponentsByFeature.groovy?rev=1649482&r1=1649481&r2=1649482&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/PRunsComponentsByFeature.groovy (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/PRunsComponentsByFeature.groovy Mon Jan  5 08:50:30 2015
@@ -24,15 +24,15 @@ import org.ofbiz.entity.util.EntityUtil;
 import org.ofbiz.product.category.CategoryWorker;
 
 if (productCategoryIdPar) {
-    category = delegator.findOne("ProductCategory", [productCategoryId : productCategoryIdPar], false);
+    category = from("ProductCategory").where("productCategoryId", productCategoryIdPar).queryOne();
     context.category = category;
 }
 if (productFeatureTypeIdPar) {
-    featureType = delegator.findOne("ProductFeatureType", [productFeatureTypeId : productFeatureTypeIdPar], false);
+    featureType = from("ProductFeatureType").where("productFeatureTypeId", productFeatureTypeIdPar).queryOne();
     context.featureType = featureType;
 }
 
-allProductionRuns = delegator.findByAnd("WorkEffortAndGoods", [workEffortName : planName],["productId"], false);
+allProductionRuns = from("WorkEffortAndGoods").where("workEffortName", planName).orderBy("productId").queryList();
 productionRuns = [];
 features = [:]; // each entry is a productFeatureId|{productFeature,products}
 products = [:]; // each entry is a productId|{product,quantity}
@@ -43,15 +43,14 @@ if (!productFeatureTypeIdPar) {
 if (allProductionRuns) {
     allProductionRuns.each { productionRun ->
         // select the production run's task of a given name (i.e. type) if any (based on the report's parameter)
-        productionRunTasks = delegator.findByAnd("WorkEffort", [workEffortParentId : productionRun.workEffortId, workEffortName : taskNamePar], null, false);
-        productionRunTask = EntityUtil.getFirst(productionRunTasks);
+        productionRunTask = from("WorkEffort").where("workEffortParentId", productionRun.workEffortId, "workEffortName", taskNamePar).queryFirst();
         if (!productionRunTask) {
             // the production run doesn't include the given task, skip it
             return;
         }
 
         // select the task's components, if any
-        allProductionRunComponents = delegator.findByAnd("WorkEffortGoodStandard", [workEffortId : productionRunTask.workEffortId,workEffortGoodStdTypeId : "PRUNT_PROD_NEEDED"], null, false);
+        allProductionRunComponents = from("WorkEffortGoodStandard").where("workEffortId", productionRunTask.workEffortId, "workEffortGoodStdTypeId", "PRUNT_PROD_NEEDED").queryList();
         allProductionRunComponents.each { productionRunComponent ->
             // verify if the product is a member of the given category (based on the report's parameter)
             if (productCategoryIdPar) {
@@ -60,19 +59,16 @@ if (allProductionRuns) {
                     return;
                 }
             }
-            productionRunProduct = delegator.findOne("Product", [productId : productionRunComponent.productId], false);
+            productionRunProduct = from("Product").where("productId", productionRunComponent.productId).queryOne();
 
             location = null;
             if (productionRunProduct) {
-                locations = delegator.findByAnd("ProductFacilityLocation", [facilityId : productionRun.facilityId, productId : productionRunProduct.productId], null, false);
-                location = EntityUtil.getFirst(locations);
+                location = from("ProductFacilityLocation").where("facilityId", productionRun.facilityId, "productId", productionRunProduct.productId).queryFirst();
             }
 
             // group by standard feature of type productFeatureTypeIdPar
             if (productFeatureTypeIdPar) {
-                standardFeatures = delegator.findByAnd("ProductFeatureAndAppl", [productFeatureTypeId : productFeatureTypeIdPar, productId : productionRunComponent.productId, productFeatureApplTypeId : "STANDARD_FEATURE"], null, false);
-                standardFeatures = EntityUtil.filterByDate(standardFeatures);
-                standardFeature = EntityUtil.getFirst(standardFeatures);
+                standardFeature = from("ProductFeatureAndAppl").where("productFeatureTypeId", productFeatureTypeIdPar, "productId", productionRunComponent.productId, "productFeatureApplTypeId", "STANDARD_FEATURE").filterByDate().queryFirst();
                 standardFeatureId = null;
                 if (standardFeature) {
                     standardFeatureId = standardFeature.productFeatureId;

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/PRunsInfoAndOrder.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/PRunsInfoAndOrder.groovy?rev=1649482&r1=1649481&r2=1649482&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/PRunsInfoAndOrder.groovy (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/PRunsInfoAndOrder.groovy Mon Jan  5 08:50:30 2015
@@ -25,11 +25,11 @@ import org.ofbiz.manufacturing.jobshopmg
 import org.ofbiz.order.order.OrderReadHelper;
 
 if (productCategoryIdPar) {
-    category = delegator.findOne("ProductCategory", [productCategoryId : productCategoryIdPar], false);
+    category = from("ProductCategory").where("productCategoryId", productCategoryIdPar).queryOne();
     context.category = category;
 }
 
-allProductionRuns = delegator.findByAnd("WorkEffortAndGoods", [workEffortName : planName, statusId : "WEGS_CREATED", workEffortGoodStdTypeId : "PRUN_PROD_DELIV"], ["productId"], false);
+allProductionRuns = from("WorkEffortAndGoods").where("workEffortName", planName, "statusId", "WEGS_CREATED", "workEffortGoodStdTypeId", "PRUN_PROD_DELIV").orderBy("productId").queryList();
 productionRuns = [];
 
 if (allProductionRuns) {
@@ -41,16 +41,14 @@ if (allProductionRuns) {
                 return;
             }
         }
-        productionRunProduct = delegator.findOne("Product", [productId : productionRun.productId], false);
+        productionRunProduct = from("Product").where("productId", productionRun.productId).queryOne();
         String rootProductionRunId = ProductionRunHelper.getRootProductionRun(delegator, productionRun.workEffortId);
 
-        productionRunOrders = delegator.findByAnd("WorkOrderItemFulfillment", [workEffortId : rootProductionRunId], null, false);
-        productionRunOrder = EntityUtil.getFirst(productionRunOrders);
+        productionRunOrder = from("WorkOrderItemFulfillment").where("workEffortId", rootProductionRunId).queryFirst();
         OrderReadHelper orh = new OrderReadHelper(delegator, productionRunOrder.orderId);
 
         // select the production run's task of a given name (i.e. type) if any (based on the report's parameter)
-        productionRunTasks = delegator.findByAnd("WorkEffort", [workEffortParentId : productionRun.workEffortId, workEffortName : taskNamePar], null, false);
-        productionRunTask = EntityUtil.getFirst(productionRunTasks);
+        productionRunTask = from("WorkEffort").where("workEffortParentId", productionRun.workEffortId, "workEffortName", taskNamePar).queryFirst();
         if (!productionRunTask) {
             // the production run doesn't include the given task, skip it
             return;
@@ -62,12 +60,13 @@ if (allProductionRuns) {
                                           productionRunOrder : productionRunOrder,
                                           customer : orh.getPlacingParty(),
                                           address : orh.getShippingAddress()];
-        allProductionComponents = delegator.findByAnd("WorkEffortAndGoods", [workEffortId : productionRunTask.workEffortId, statusId : "WEGS_CREATED", workEffortGoodStdTypeId : "PRUNT_PROD_NEEDED"], ["productId"], false);
+        allProductionComponents = from("WorkEffortAndGoods").where("workEffortId", productionRunTask.workEffortId, "statusId", "WEGS_CREATED", "workEffortGoodStdTypeId", "PRUNT_PROD_NEEDED").orderBy("productId").queryList();
+        
         componentList = [];
 
         if (allProductionComponents) {
             allProductionComponents.each { productionComponent ->
-                productionRunProductComp = delegator.findOne("Product", [productId : productionComponent.productId], false);
+                productionRunProductComp = from("Product").where("productId", productionComponent.productId).queryOne();
                 productionRunProductMap = [component : productionComponent,componentProduct : productionRunProductComp];
                 componentList.add(productionRunProductMap);
             }

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/PRunsProductsAndOrder.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/PRunsProductsAndOrder.groovy?rev=1649482&r1=1649481&r2=1649482&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/PRunsProductsAndOrder.groovy (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/PRunsProductsAndOrder.groovy Mon Jan  5 08:50:30 2015
@@ -25,11 +25,11 @@ import org.ofbiz.manufacturing.jobshopmg
 import org.ofbiz.order.order.OrderReadHelper;
 
 if (productCategoryIdPar) {
-    category = delegator.findOne("ProductCategory", [productCategoryId : productCategoryIdPar], false);
+    category = from("ProductCategory").where("productCategoryId", productCategoryIdPar).queryOne();
     context.category = category;
 }
 
-allProductionRuns = delegator.findByAnd("WorkEffortAndGoods", UtilMisc.toMap("workEffortName", planName, "statusId", "WEGS_CREATED", "workEffortGoodStdTypeId", "PRUN_PROD_DELIV"), UtilMisc.toList("productId"), false);
+allProductionRuns = from("WorkEffortAndGoods").where("workEffortName", planName, "statusId", "WEGS_CREATED", "workEffortGoodStdTypeId", "PRUN_PROD_DELIV").orderBy("productId").queryList();
 productionRuns = [];
 
 if (allProductionRuns) {
@@ -41,14 +41,12 @@ if (allProductionRuns) {
                 return;
             }
         }
-        productionRunProduct = delegator.findOne("Product", [productId : productionRun.productId], false);
+        productionRunProduct = from("Product").where("productId", productionRun.productId).queryOne();
         String rootProductionRunId = ProductionRunHelper.getRootProductionRun(delegator, productionRun.workEffortId);
 
-        productionRunOrders = delegator.findByAnd("WorkOrderItemFulfillment", [workEffortId : rootProductionRunId], null, false);
-        productionRunOrder = EntityUtil.getFirst(productionRunOrders);
+        productionRunOrder = from("WorkOrderItemFulfillment").where("workEffortId", rootProductionRunId).queryFirst();
         OrderReadHelper orh = new OrderReadHelper(delegator, productionRunOrder.orderId);
-        locations = delegator.findByAnd("ProductFacilityLocation", [productId : productionRun.productId, facilityId : productionRun.facilityId], null, false);
-        location = EntityUtil.getFirst(locations);
+        location = from("ProductFacilityLocation").where("productId", productionRun.productId, "facilityId", productionRun.facilityId).queryFirst();
 
         productionRunMap = [productionRun : productionRun,
                                           product : productionRunProduct,

Modified: ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/PRunsProductsByFeature.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/PRunsProductsByFeature.groovy?rev=1649482&r1=1649481&r2=1649482&view=diff
==============================================================================
--- ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/PRunsProductsByFeature.groovy (original)
+++ ofbiz/branches/OFBIZ-5312-ofbiz-ecommerce-seo-2013-10-23/applications/manufacturing/webapp/manufacturing/WEB-INF/actions/reports/PRunsProductsByFeature.groovy Mon Jan  5 08:50:30 2015
@@ -23,15 +23,15 @@
 import org.ofbiz.entity.util.EntityUtil;
 
 if (productCategoryIdPar) {
-    category = delegator.findOne("ProductCategory", [productCategoryId : productCategoryIdPar], false);
+    category = from("ProductCategory").where("productCategoryId", productCategoryIdPar).queryOne();
     context.category = category;
 }
 if (productFeatureTypeIdPar) {
-    featureType = delegator.findOne("ProductFeatureType", [productFeatureTypeId : productFeatureTypeIdPar], false);
+    featureType = from("ProductFeatureType").where("productFeatureTypeId", productFeatureTypeIdPar).queryOne();
     context.featureType = featureType;
 }
 
-allProductionRuns = delegator.findByAnd("WorkEffortAndGoods", [workEffortName : planName], ["productId"], false);
+allProductionRuns = from("WorkEffortAndGoods").where("workEffortName", planName).orderBy("productId").queryList();
 productionRuns = [:];
 features = [];
 if (!productFeatureTypeIdPar) {
@@ -47,13 +47,11 @@ if (allProductionRuns) {
                 return;
             }
         }
-        productionRunProduct = delegator.findOne("Product", [productId : productionRun.productId], false);
+        productionRunProduct = from("Product").where("productId", productionRun.productId).queryOne();
 
         // group by standard feature of type productFeatureTypeIdPar
         if (productFeatureTypeIdPar) {
-            standardFeatures = delegator.findByAnd("ProductFeatureAndAppl", [productFeatureTypeId : productFeatureTypeIdPar, productId : productionRun.productId, productFeatureApplTypeId : "STANDARD_FEATURE"], null, false);
-            standardFeatures = EntityUtil.filterByDate(standardFeatures);
-            standardFeature = EntityUtil.getFirst(standardFeatures);
+            standardFeature = from("ProductFeatureAndAppl").where("productFeatureTypeId", productFeatureTypeIdPar, "productId", productionRun.productId, "productFeatureApplTypeId", "STANDARD_FEATURE").filterByDate().queryFirst();
             standardFeatureId = null;
             if (standardFeature) {
                 standardFeatureId = standardFeature.productFeatureId;
@@ -66,8 +64,7 @@ if (allProductionRuns) {
         }
 
         // select the production run's task of a given name (i.e. type) if any (based on the report's parameter)
-        productionRunTasks = delegator.findByAnd("WorkEffort", [workEffortParentId : productionRun.workEffortId, workEffortName : taskNamePar], null, false);
-        productionRunTask = EntityUtil.getFirst(productionRunTasks);
+        productionRunTask = from("WorkEffort").where("workEffortParentId", productionRun.workEffortId, "workEffortName", taskNamePar).queryFirst();
         if (!productionRunTask) {
             // the production run doesn't include the given task, skip it
             return;