Announcement Announcement Module
Collapse
No announcement yet.
using a List as a form object Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • using a List as a form object

    I was seeing a pattern in my current application where basically all data entry is over grid or tabular data (a list of objects). The old tried-n-true way was to wrap the list of data objects in a "form object" in an object that literally did nothing else but provide getter/setters to the data I wanted. That's a lot of overhead. Is there a way around this? (I tried searching but didn't find what I wanted).

    I haven't done any coding experimentation b/c of time constraints so I thought I'd throw this out to the community. I'm guessing if I did it w/o the wrapper form object I'd have to maybe jstl-loop my list of data and then bind things the old way using the bind tag?

    To me even doing it that way seems a bit cleaner than having useless objects created like below...

    public class CustomerForm {
    private List<Customer> customers;

    getCustomers/setCustomers.
    }
Working...
X