Re: [appfuse-user] Spring MVC data binding

2007-04-14 Thread Ivan Garcia
Hi Jong, for this aproach to work you will need to re implement formBackingObject method, for ItemsForm to have items List instantiated an populated with Item objects and in proper order as spring will try to bind params with something equivalent to : form.getItems().get(0).setDescription(reques

Re: [appfuse-user] Spring MVC data binding

2007-04-13 Thread Jong Hian Zin
Jonathan, Thanks for your reply. I have another question. If my domain object has 3 fields, eg. id, name, description. These are the records in database: id | name | description 1 | Name 1 | Description 1 2 | Name 2 | Description 2 3 | Name 3 | Description 3 Now, if I only nee

Re: [appfuse-user] Spring MVC data binding

2007-04-13 Thread Jonathan Tse
Hi, I have done something like this before and i suggest that you should include an id when posting to SFC. In this way, you can guarantee that your dao will update the database with the correct id. Don't rely on the index of the list as the command object is not stored in the session. It

[appfuse-user] Spring MVC data binding

2007-04-12 Thread Jong Hian Zin
This is rather Spring MVC specific. Let say I'm using SimpleFormController and I have a command object that looks like this: public class ItemsForm { List items; } A domain object Item: public class Item { private String id; private String description; // getters and setters... }