Hello,
I am new to ofbiz and trying to get CRUD operation run. I have completed insert and delete operation. Issue: The update operation is taking me to a new page. 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"> <!-- <container style="h1"><label>Update Supplier</label></container> --> <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> ========================================================== My issue: When 'Update' button is clicked, Database is getting updated but the landing page is going to a new page. I need to get it back to the calling page which is findSuppliers. Pls. help me where I am getting mistaken. Thank you and regards Avijit Bose 9874833933 Kolkata India. |
Hi Avijit,
Please update your success response, you need to use findSuppliers instead updateSupplier view. ` <request-map uri="updateSupplier"> <security https="true" auth="true"/> <event type="service" invoke="updateSupplier"/> * <response name="success" type="view" value="updateSupplier"/>* </request-map> ` Kind Regards, Deepak Dixit DIRECTOR OF PRODUCT ENGINEERING mobile: +91 9826754548 email: [hidden email] *www.hotwax.co <http://www.hotwax.co/>* On Thu, Dec 17, 2020 at 4:14 PM Avijit Bose <[hidden email]> wrote: > Hello, > > I am new to ofbiz and trying to get CRUD operation run. I have > completed insert and delete operation. > > Issue: The update operation is taking me to a new page. > > 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"> > <!-- > <container style="h1"><label>Update > Supplier</label></container> > --> > <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> > ========================================================== > > My issue: When 'Update' button is clicked, Database is getting updated > but the landing page is going to a new page. I need to get it back to > the calling page which is findSuppliers. > > Pls. help me where I am getting mistaken. > > Thank you and regards > Avijit Bose > 9874833933 Kolkata India. > |
In reply to this post by Avijit Bose
Hi Avijit,
Your message has been moderated, else it would not have reached this Mailing List. Please subscribe to the user ML for such questions and then use your email client. See why here http://ofbiz.apache.org/mailing-lists.html. You will get a better support, people can answer you on the ML. The wider the audience the better the answers you might get. Also it's more work for moderators who have to accept your messages as long as you have not subscribed. I'll personally no longer accept them (other moderators still could). This said Deepak Dixit answered you on the ML, so next step: subscribe :) Thanks Jacques Le 17/12/2020 à 08:03, Avijit Bose a écrit : > Hello, > > I am new to ofbiz and trying to get CRUD operation run. I have > completed insert and delete operation. > > Issue: The update operation is taking me to a new page. > > 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"> > <!-- > <container style="h1"><label>Update > Supplier</label></container> > --> > <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> > ========================================================== > > My issue: When 'Update' button is clicked, Database is getting updated > but the landing page is going to a new page. I need to get it back to > the calling page which is findSuppliers. > > Pls. help me where I am getting mistaken. > > Thank you and regards > Avijit Bose > 9874833933 Kolkata India. |
Free forum by Nabble | Edit this page |