Author: taher
Date: Fri May 29 10:43:41 2015 New Revision: 1682415 URL: http://svn.apache.org/r1682415 Log: Provide a fix for OFBIZ-6229 and allow creation of new Geos Fix the following problems: - The search screen results take you to the link geos. it should go directly to create / edit instead - You cannot edit a geo because the parameter is not passed across the tabs link and edit / create. The menus should be redefined to pass the parameter around - The primary key is enforced in the service definition when it should be optional to create new geos - finally, the geoId should not be a lookup field as an entity cannot lookup itself Refs https://issues.apache.org/jira/browse/OFBIZ-6229 Modified: ofbiz/trunk/framework/common/servicedef/services.xml ofbiz/trunk/framework/webtools/widget/GeoManagementForms.xml ofbiz/trunk/framework/webtools/widget/Menus.xml Modified: ofbiz/trunk/framework/common/servicedef/services.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/servicedef/services.xml?rev=1682415&r1=1682414&r2=1682415&view=diff ============================================================================== --- ofbiz/trunk/framework/common/servicedef/services.xml (original) +++ ofbiz/trunk/framework/common/servicedef/services.xml Fri May 29 10:43:41 2015 @@ -708,7 +708,7 @@ under the License. <service name="createGeo" default-entity-name="Geo" engine="entity-auto" invoke="create" auth="true"> <description>Create a Geo</description> <permission-service service-name="commonGenericPermission" main-action="CREATE"/> - <auto-attributes include="pk" mode="INOUT"/> + <auto-attributes include="pk" mode="INOUT" optional="true"/> <auto-attributes include="nonpk" mode="IN" optional="true"/> <override name="geoName" optional="false"/> <override name="geoTypeId" optional="false"/> Modified: ofbiz/trunk/framework/webtools/widget/GeoManagementForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/widget/GeoManagementForms.xml?rev=1682415&r1=1682414&r2=1682415&view=diff ============================================================================== --- ofbiz/trunk/framework/webtools/widget/GeoManagementForms.xml (original) +++ ofbiz/trunk/framework/webtools/widget/GeoManagementForms.xml Fri May 29 10:43:41 2015 @@ -42,7 +42,7 @@ <form name="ListGeos" extends-resource="component://common/widget/LookupForms.xml" extends="listLookupGeo" paginate-target="${currentUrl}" odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="basic-table hover-bar" separate-columns="true" > <field name="geoId" widget-style="buttontext" title="${uiLabelMap.CommonGeoId}"> - <hyperlink also-hidden="false" target-type="plain" description="${geoId}" target="LinkGeos"> + <hyperlink also-hidden="false" target-type="plain" description="${geoId}" target="EditGeo"> <parameter param-name="geoId"/> </hyperlink> </field> @@ -80,7 +80,7 @@ <form name="EditGeo" type="single" target="updateGeo" title="" default-map-name="geo" header-row-style="header-row" default-table-style="basic-table"> <alt-target use-when="geo==null" target="createGeo"/> - <field name="geoId" title="${uiLabelMap.CommonId}"><lookup target-form-name="LookupGeo"/></field> + <field name="geoId" title="${uiLabelMap.CommonId}"><text/></field> <field name="geoTypeId" title="${uiLabelMap.CommonType}"> <drop-down allow-empty="true"> <entity-options key-field-name="geoTypeId" entity-name="GeoType" description="${description}"> Modified: ofbiz/trunk/framework/webtools/widget/Menus.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webtools/widget/Menus.xml?rev=1682415&r1=1682414&r2=1682415&view=diff ============================================================================== --- ofbiz/trunk/framework/webtools/widget/Menus.xml (original) +++ ofbiz/trunk/framework/webtools/widget/Menus.xml Fri May 29 10:43:41 2015 @@ -265,10 +265,14 @@ under the License. <link target="FindGeo"/> </menu-item> <menu-item name="EditGeo" title="${uiLabelMap.WebtoolsGeoCreateNew}"> - <link target="EditGeo"/> + <link target="EditGeo"> + <parameter param-name="geoId" from-field="parameters.geoId"/> + </link> </menu-item> <menu-item name="LinkGeos" title="${uiLabelMap.WebtoolsGeosLink}"> - <link target="LinkGeos"/> + <link target="LinkGeos"> + <parameter param-name="geoId" from-field="parameters.geoId"/> + </link> </menu-item> <menu-item name="GeoPoints" title="${uiLabelMap.WebtoolsGeoPoints}"> <link target="geoPoints"/> |
Free forum by Nabble | Edit this page |