Does anyone know if there's common way of displaying a list of objects and allowing the user to add new entry to the list via a form, for example something like adding comments to a page? Is there a standard way of doing this?
I've got an object that has a list of 'Note' objects. I display the object and the notes on the page no problem, but I want to allow the user to add a new note on that page and save it, and then return the page with the new note. I also need to validate the note and the way it's looking at the moment I've ended up adding two properties to my backing form:
newNote is used to bind to an input fieldCode:class MyObject { List<Note> notes; String name; } class Note { String username; Date insertionDate; String note; } MyObjectBackingForm{ Note newNote; List<Note> noteList; }
noteList is simplY looped through and displayed on the page as text, it's not bound to any inputs
Is there a standard way of displaying the current notes as text on the page when I view 'MyObject', but also provide an input field for a new note to be added without having to add two properties?
Thanks in advance


Reply With Quote