Need Help - New to Spring MVC
Hello everyone,
I'm basically a server side developer with some knowledge of struts. With the help of "Spring Live", i developed a simple web application. In this each form will take input that corresponds to one object.
As i add more complexity into this form, i ran into a very real time situation, where i got stuck and need help on how to do this.
Here's my requirement. I've an object Project object which has one-to-many relationship with object Resource. In my form "editProject.html" i would like to add a button to "Add Resources to this Project". Hence i added the following line to my "projectForm.jsp".
Code:
<button onclick="location.href='editResource.html'"</button>
I already have a form "editResource.html" which works fine separately. When i click this button, this link takes me to 'editProject.html' NOT 'editResource.html' page. Could someone point out what is that i'm missing?
In my urlMappings in action-servlet.xml file, 'editResource.html' points to ResourceFormController.
When i get to this page, i would like the ability to add new resource to "the project from which i clicked the add resource button".
Could some one tell me how do i do that? Any code sample would be great.
Thanks in advance!