30 Mar 2012 6:05 AM #1
Record edited by 3 forms (in three tabs) and sent back to DB
In a MVC Architecture, I have a view which is basically a window with three tabs in it. This view (an "edit record" view) is called by a click on a grid cell on my main page. What I would like to do is to edit the record of my grid in my window/view. This technique is well described in the MVC Architecture guide. My problem is that I would like to edit (virtually, to "spread") my record in the three forms of the three tabs in my Window. For example:
record (from grid in my main page): username, address, zipcode, phone, fax, ...
edit: username and address
edit: phone and fax
And then, after the record is edited, I would like to update it and send it to my database.
What is the simplest way to achieve this?
Thank you very much in advance.
30 Mar 2012 9:28 AM #2
- Join Date
- May 2010
- Guatemala, Central America
- Vote Rating
You should put teh tabs INSIDE just one form and POST to your server code using form.getForm().submit().
Another way is, allways putting all tabs inside one form, move from input components to model instance with form.getForm().updateRecord(modelInstance) then send using model's proxy or store's proxy.
Look API docs for Ext.form.Panel, Proxy and Store.
Regards.UI: Sencha Architect 3.x / ExtJS 4 & 5
Server side: JEE / EJB 3.x / CDI / JPA 2.x/ JAX-RS / JasperReports
Application Server: Glassfish / WildFly
Databases: Oracle / DB2 / MySQL / Firebird
If you like my answer please vote!
31 Mar 2012 11:32 PM #3
Thank you very much! It worked like a charm.