Hi,
I am very new to Spring and I have been given some basic instructions to move some code into a new project that uses Spring and I am having trouble with the SimpleFormController (which I was instructed to user).
I have a page and when it loads it has a drop down with data populated from the DB. A list of "messages" is retrieved from the DB and passed as an attribute to the JSP and then the drop down is populated. When one of these "messages" is selected a form appears below the drop down and is populated with the appropriate data. No DB call is done as all the data is returned when the page is loaded. This is all done with jQuery. The form elements can be changed and saved to the DB when the update button is clicked.
At the moment the code is a portlet and the doView method contains the logic to retrieve the messages and pass them to the JSP. The processAction method saves the changes.
I cannot figure out which methods of the SimpleFormController. I have been told to use onSubmitAction for the update but the person who showed me what to do wasn't' sure what method I use to get the data when the page first loads, to save that data/model and to retrieve it in the JSP. I will be using the Spring command/form to save the changes a message but I will not be using it to populate the drop down and the form fields.
Apologies if this sounds like a stupid question. I have been looking up tutorials but I'm not finding the answers I need - possible because I am unsure what the question is.
Thanks in advance for any help Caroline