Hi Everybody
Iam new to Ofbiz as well as this mailing list. I have a question.... I want to diaplay a page in which there are few fields in it like employee_id emp_name and his desination and a create button for creating this new employee data. I want to use a form for this. Is Service required for this?? <form name="Main" type="single" default-entity-name="MyAppEntity" default-map-name="myappmap" target="createMyApp"> <auto-fields-entity entity-name="MyAppEntity"></auto-fields-entity> <field name="submit" title="Create" ><submit button-type="button"></submit></field> </form> This form displays the fields and the submit buton..but idont know how to save this data to database. I want to save this data and display the stored data in next page. so which page should i map the "createMyApp" which I have given as target. (MyAppEntity is the entity in entity model.xml, in which I have specified all the fields ) Please help me in learning.. Thankyou Adithi |
hello Adithi,
I am also new to Ofbiz. I think you can get better solution in Practice Application and you can also learn alot from it. here is the link for Practice Application. http://docs.ofbiz.org/display/OFBIZ/OFBiz+Beginner%27s+Development+Guide+Using+Practice+Application Regards Kirti Dhakad HotWax Media Inc. |
In reply to this post by myofbiz
i am assuming you are using widgets.
so all the fields will be displayed for this entity using the auto-fields-entity when they are filled in they will be processed. if you look at some of the Edit pages you will see that the same form is used to create, Edit and display. Where the forms goes is based on the target(controller Request-map) the success and error then direct the next view for the page. Unless you put in some conditions, you will get all the data. you can best learn about those by looking at code of some of the find pages you might also want to review the video http://docs.ofbiz.org/display/OFBTECH/Framework+Introduction+Videos+and+Diagrams #7 as a side note the Entity engine takes care of actually putting in and extracting data into and from the DB. adithi agarwal sent the following on 9/24/2008 6:37 AM: > Hi Everybody > Iam new to Ofbiz as well as this mailing list. > I have a question.... > I want to diaplay a page in which there are few fields in it like employee_id emp_name and his desination and a create button for creating this new employee data. > I want to use a form for this. Is Service required for this?? > <form name="Main" type="single" default-entity-name="MyAppEntity" default-map-name="myappmap" target="createMyApp"> > <auto-fields-entity entity-name="MyAppEntity"></auto-fields-entity> > <field name="submit" title="Create" ><submit button-type="button"></submit></field> > </form> > > > This form displays the fields and the submit buton..but idont know how to save this data to database. > I want to save this data and display the stored data in next page. so which page should i map the "createMyApp" which I have given as target. > (MyAppEntity is the entity in entity model.xml, in which I have specified all the fields ) > > Please help me in learning.. > Thankyou > Adithi > > > |
Hello Adithi,
For storing and retrieving data you need to write services. For more details you can take help from PracticeApplication. http://docs.ofbiz.org/display/OFBIZ/OFBiz+Beginner%27s+Development+Guide+Using+Practice+Application On Wed, Sep 24, 2008 at 7:43 PM, BJ Freeman <[hidden email]> wrote: > i am assuming you are using widgets. > so all the fields will be displayed for this entity using the > auto-fields-entity > when they are filled in they will be processed. > if you look at some of the Edit pages you will see that the same form is > used to create, Edit and display. > Where the forms goes is based on the target(controller Request-map) > the success and error then direct the next view for the page. > Unless you put in some conditions, you will get all the data. > you can best learn about those by looking at code of some of the find pages > you might also want to review the video > > http://docs.ofbiz.org/display/OFBTECH/Framework+Introduction+Videos+and+Diagrams > #7<http://docs.ofbiz.org/display/OFBTECH/Framework+Introduction+Videos+and+Diagrams#7> > > as a side note the Entity engine takes care of actually putting in and > extracting data into and from the DB. > > > adithi agarwal sent the following on 9/24/2008 6:37 AM: > > Hi Everybody > > Iam new to Ofbiz as well as this mailing list. > > I have a question.... > > I want to diaplay a page in which there are few fields in it like > employee_id emp_name and his desination and a create button for creating > this new employee data. > > I want to use a form for this. Is Service required for this?? > > <form name="Main" type="single" default-entity-name="MyAppEntity" > default-map-name="myappmap" target="createMyApp"> > > <auto-fields-entity > entity-name="MyAppEntity"></auto-fields-entity> > > <field name="submit" title="Create" ><submit > button-type="button"></submit></field> > > </form> > > > > > > This form displays the fields and the submit buton..but idont know how to > save this data to database. > > I want to save this data and display the stored data in next page. so > which page should i map the "createMyApp" which I have given as target. > > (MyAppEntity is the entity in entity model.xml, in which I have > specified all the fields ) > > > > Please help me in learning.. > > Thankyou > > Adithi > > > > > > > > |
Free forum by Nabble | Edit this page |