|
Hello,
I am new to Ofbiz. My update service is called twice. First when landing on the page and second when clicking the update button. Database is getting updated in both the call. Pls help me resolving this. Details are as follows: Services.xml ----------------- <service name="updateSupplier" default-entity-name="AkmSupplier" engine="entity-auto" invoke="update" auth="true"> <description>Update Supplier</description> <auto-attributes include="pk" mode="IN" optional="false"/> <auto-attributes include="nonpk" mode="IN" optional="false"/> </service> </services> =================================================== Controller.xml ------------------ <request-map uri="updateSupplier"> <security https="true" auth="true"/> <event type="service" invoke="updateSupplier"/> <response name="success" type="view" value="updateSupplier"/> </request-map> <view-map name="updateSupplier" type="screen" page="component://import/widget/ImportScreens.xml#updateSupplier"/> =================================================== ImportScreens.xml ------------------------- <screen name="updateSupplier"> <section> <condition> <if-has-permission permission="IMPORT" action="_VIEW"/> </condition> <widgets> <decorator-section name="body"> <screenlet title="Update Supplier"> <include-form name="updateSupplier" location="component://import/widget/ImportForms.xml"/> </screenlet> </decorator-section> </widgets> </section> </screen> ====================================================== ImportForms.xml ---------------------- <form name="updateSupplier" type="single" target="updateSupplier" title="" default-map-name="updateSupplierMap"> <auto-fields-service service-name="updateSupplier"/> <field name="supplierTypeId" title="Supplier Type"> <drop-down allow-empty="false" current-description=""> <entity-options description="${description}" key-field-name="supplierTypeId" entity-name="AkmSupplierType"> <entity-order-by field-name="description"/> </entity-options> </drop-down> </field> <field name="supplierId" title=""><display/></field> <field name="supplierCategoryId" title="Supplier Category"> <drop-down allow-empty="false" current-description=""> <entity-options description="${description}" key-field-name="supplierCategoryId" entity-name="AkmSupplierCategory"> <entity-order-by field-name="description"/> </entity-options> </drop-down> </field> <field name="updateButton" title="Update" widget-style="smallSubmit"> <submit button-type="button" image-location="/images/favicon.png"/> </field> </form> ========================================================== |
| Free forum by Nabble | Edit this page |
