I am confused by how to bind to complex objects!!
Take for example, I have a form for editing private messages in between users.
So, lets assume
id Long
User from
User to
String subject
String message
How exactly would I go about dealing with the user objects? ie. I want a User submitting to be able to enter in a string representation of the Username. If they submit, and the user doesn't exist in the database, I'd obviously like to let them know the user doesn't exist and repost the error with all the form data entered. I've read through the forum and read something about PropertyEditors, but there doesn't seem to be a real guide anywhere to go about doing this.
I would imagine, I need to grab the username, call a lowerlevel method checking if the username exists in the database,but I'm at a loss for what to put in my jsps and where to put this logic in the FormController.
Any help would be greatly appretiated.
..jordan willms


Reply With Quote