svn commit: r546757 - in /ofbiz/trunk/applications/product: webapp/facility/WEB-INF/ webapp/facility/WEB-INF/actions/group/ webapp/facility/group/ widget/facility/

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

svn commit: r546757 - in /ofbiz/trunk/applications/product: webapp/facility/WEB-INF/ webapp/facility/WEB-INF/actions/group/ webapp/facility/group/ widget/facility/

jacopoc
Author: jacopoc
Date: Tue Jun 12 23:48:58 2007
New Revision: 546757

URL: http://svn.apache.org/viewvc?view=rev&rev=546757
Log:
applied patch from Mario Cappellato (OFBIZ-1047): migration of the EditFacilityGroup ftl/bsh to the widgets.

Added:
    ofbiz/trunk/applications/product/webapp/facility/group/FacilityGroupForms.xml   (with props)
Removed:
    ofbiz/trunk/applications/product/webapp/facility/WEB-INF/actions/group/EditFacilityGroup.bsh
Modified:
    ofbiz/trunk/applications/product/webapp/facility/WEB-INF/controller.xml
    ofbiz/trunk/applications/product/webapp/facility/group/EditFacilityGroup.ftl
    ofbiz/trunk/applications/product/widget/facility/FacilityGroupScreens.xml

Modified: ofbiz/trunk/applications/product/webapp/facility/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/WEB-INF/controller.xml?view=diff&rev=546757&r1=546756&r2=546757
==============================================================================
--- ofbiz/trunk/applications/product/webapp/facility/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/applications/product/webapp/facility/WEB-INF/controller.xml Tue Jun 12 23:48:58 2007
@@ -324,13 +324,13 @@
         <security https="true" auth="true"/>
         <response name="success" type="view" value="EditFacilityGroup"/>
     </request-map>
-    <request-map uri="CreateFacilityGroup">
+    <request-map uri="createFacilityGroup">
         <security https="true" auth="true"/>
         <event type="service" path="" invoke="createFacilityGroup"/>
         <response name="success" type="view" value="EditFacilityGroup"/>
         <response name="error" type="view" value="EditFacilityGroup"/>
     </request-map>
-    <request-map uri="UpdateFacilityGroup">
+    <request-map uri="updateFacilityGroup">
         <security https="true" auth="true"/>
         <event type="service" path="" invoke="updateFacilityGroup"/>
         <response name="success" type="view" value="EditFacilityGroup"/>

Modified: ofbiz/trunk/applications/product/webapp/facility/group/EditFacilityGroup.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/group/EditFacilityGroup.ftl?view=diff&rev=546757&r1=546756&r2=546757
==============================================================================
--- ofbiz/trunk/applications/product/webapp/facility/group/EditFacilityGroup.ftl (original)
+++ ofbiz/trunk/applications/product/webapp/facility/group/EditFacilityGroup.ftl Tue Jun 12 23:48:58 2007
@@ -1,93 +0,0 @@
-<#--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-
-    <div class="head1">${uiLabelMap.ProductFacilityGroup}<span class="head2">&nbsp;<#if facilityGroup?exists>${(facilityGroup.facilityGroupName)?if_exists}</#if> [${uiLabelMap.CommonId}:${facilityGroupId?if_exists}]</span></div>
-    <a href="<@ofbizUrl>EditFacilityGroup</@ofbizUrl>" class="buttontext">[${uiLabelMap.ProductNewGroup}]</a>
-    
-    <#if !(facilityGroup?exists)>
-        <#if facilityGroupId?exists>
-            <form action="<@ofbizUrl>CreateFacilityGroup</@ofbizUrl>" method="post" style="margin: 0;">
-            <table border="0" cellpadding="2" cellspacing="0">
-            <h3>${uiLabelMap.ProductCouldNotFindFacilityWithId} "${facilityGroupId}".</h3>
-        <#else>
-            <form action="<@ofbizUrl>CreateFacilityGroup</@ofbizUrl>" method="post" style="margin: 0;">
-            <table border="0" cellpadding="2" cellspacing="0">
-        </#if>
-    <#else>
-        <form action="<@ofbizUrl>UpdateFacilityGroup</@ofbizUrl>" method="post" style="margin: 0;">
-        <table border="0" cellpadding="2" cellspacing="0">
-        <input type="hidden" name="facilityGroupId" value="${facilityGroupId?if_exists}">
-        <tr>
-            <td align="right"><div class="tabletext">${uiLabelMap.ProductFacilityGroupId}</div></td>
-            <td>&nbsp;</td>
-            <td>
-            <b>${facilityGroupId?if_exists}</b> ${uiLabelMap.ProductNotModificationRecrationFacilityGroup}
-            </td>
-        </tr>
-    </#if>
-    <tr>
-        <td width="26%" align="right"><div class="tabletext">${uiLabelMap.ProductFacilityGroupType}</div></td>
-        <td>&nbsp;</td>
-        <td width="74%">
-        <select name="facilityGroupTypeId" size="1" class="selectBox">
-            <option selected value="${(facilityGroupType.facilityGroupTypeId)?if_exists}">${(facilityGroupType.get("description",locale))?if_exists}</option>
-            <#list facilityGroupTypes as nextFacilityGroupType>
-            <option value="${(nextFacilityGroupType.facilityGroupTypeId)?if_exists}">${(nextFacilityGroupType.get("description",locale))?if_exists}</option>
-            </#list>
-        </select>
-        </td>
-    </tr>
-
-    <tr>
-        <td width="26%" align="right"><div class="tabletext">${uiLabelMap.ProductPrimaryParentGroup}</div></td>
-        <td>&nbsp;</td>
-        <td width="74%">
-        <select name="primaryParentGroupId" size="1" class="selectBox">
-            <#if facilityGroup?exists>
-                <#if (facilityGroup.getRelatedOne("PrimaryParentFacilityGroup"))?exists>
-                    <#assign currentPrimaryParent = facilityGroup.getRelatedOne("PrimaryParentFacilityGroup")>
-                    <option selected value="${(facilityGroup.primaryParentGroupId)?if_exists}">${(currentPrimaryParent.description)?if_exists}</option>
-                </#if>
-            </#if>
-            <option value="${(facilityGroup.primaryParentGroupId)?if_exists}"></option>            
-            <#list facilityGroups as nextFacilityGroup>
-            <#if !(nextFacilityGroup.facilityGroupId.equals("_NA_"))>
-                <option value="${(nextFacilityGroup.facilityGroupId)?if_exists}">${(nextFacilityGroup.facilityGroupName)?if_exists}</option>
-            </#if>
-            </#list>
-        </select>
-        </td>
-    </tr>
-
-    <tr>
-        <td width="26%" align="right"><div class="tabletext">${uiLabelMap.ProductName}</div></td>
-        <td>&nbsp;</td>
-        <td width="74%"><input type="text" class="inputBox" name="facilityGroupName" value="${(facilityGroup.facilityGroupName)?if_exists}" size="30" maxlength="60"></td>
-    </tr>    
-    <tr>
-        <td width="26%" align="right"><div class="tabletext">${uiLabelMap.CommonDescription}</div></td>
-        <td>&nbsp;</td>
-        <td width="74%"><input type="text" class="inputBox" name="description" value="${(facilityGroup.description)?if_exists}" size="60" maxlength="250"></td>
-    </tr>
-    <tr>
-        <td colspan="2">&nbsp;</td>
-        <td colspan="1" align="left"><input type="submit" name="Update" value="${uiLabelMap.CommonUpdate}"></td>
-    </tr>
-    </table>
-    </form>

Added: ofbiz/trunk/applications/product/webapp/facility/group/FacilityGroupForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/facility/group/FacilityGroupForms.xml?view=auto&rev=546757
==============================================================================
--- ofbiz/trunk/applications/product/webapp/facility/group/FacilityGroupForms.xml (added)
+++ ofbiz/trunk/applications/product/webapp/facility/group/FacilityGroupForms.xml Tue Jun 12 23:48:58 2007
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-form.xsd">
+    <!-- Forms for FacilityGroup    -->
+    <form name="EditFacilityGroup" type="single" target="updateFacilityGroup" title="" default-map-name="facilityGroup">
+        <alt-target use-when="facilityGroup==null" target="createFacilityGroup"/>
+        <auto-fields-service service-name="updateFacilityGroup"/>
+        <field name="facilityGroupId" use-when="facilityGroup!=null" tooltip="&amp;nbsp;${uiLabelMap.ProductNotModificationRecrationFacilityGroup}"><display/></field>
+        <field name="facilityGroupId" use-when="facilityGroup==null"><hidden/></field>
+        <field name="facilityGroupTypeId">
+            <drop-down allow-empty="false">
+                <entity-options entity-name="FacilityGroupType" key-field-name="facilityGroupTypeId" description="${description}">
+                </entity-options>
+            </drop-down>
+        </field>
+        <field name="primaryParentGroupId">
+            <drop-down allow-empty="true">
+                <entity-options entity-name="FacilityGroup" key-field-name="facilityGroupId" description="${facilityGroupName}">
+                </entity-options>
+            </drop-down>
+        </field>
+        <field name="submitButton" title="${uiLabelMap.CommonSubmit}"><submit button-type="button"/></field>
+    </form>
+</forms>

Propchange: ofbiz/trunk/applications/product/webapp/facility/group/FacilityGroupForms.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/applications/product/webapp/facility/group/FacilityGroupForms.xml
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/trunk/applications/product/webapp/facility/group/FacilityGroupForms.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: ofbiz/trunk/applications/product/widget/facility/FacilityGroupScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/facility/FacilityGroupScreens.xml?view=diff&rev=546757&r1=546756&r2=546757
==============================================================================
--- ofbiz/trunk/applications/product/widget/facility/FacilityGroupScreens.xml (original)
+++ ofbiz/trunk/applications/product/widget/facility/FacilityGroupScreens.xml Tue Jun 12 23:48:58 2007
@@ -74,15 +74,16 @@
                 <set field="titleProperty" value="PageTitleEditFacilityGroup"/>
                 <set field="headerItem" value="facilityGroup"/>
                 <set field="tabButtonItem" value="EditFacilityGroup"/>
-
-                <script location="component://product/webapp/facility/WEB-INF/actions/group/EditFacilityGroup.bsh"/>
+                <entity-one entity-name="FacilityGroup" value-name="facilityGroup"/>
             </actions>
             <widgets>
                 <decorator-screen name="CommonFacilityGroupDecorator">
                     <decorator-section name="body">
-                        <platform-specific>
-                            <html><html-template location="component://product/webapp/facility/group/EditFacilityGroup.ftl"/></html>
-                        </platform-specific>
+                        <label style="head1">${uiLabelMap.ProductFacilityGroup}</label>
+                        <container>
+                            <link target="EditFacilityGroup" text="${uiLabelMap.CommonNew}" style="buttontext"/>
+                        </container>
+                        <include-form name="EditFacilityGroup" location="component://product/webapp/facility/group/FacilityGroupForms.xml"/>
                     </decorator-section>
                 </decorator-screen>
             </widgets>