-
Apr 12th, 2005, 08:36 AM
#1
Pre and Post form controllers
If im understanding Spring correctly all requests to do something go through the DispatcherServlet and are handled by a controller before a response comes back (as a jsp in my case) .
So say I want to display a list of objects in a page I need to write a controller and then a page to view the data. Now if that page has an option to change something on that page (such as server side sorting) which doesnt require display of further pages just an update of some sort to the current page should that be handled by the same controller or a different controller.
Similarly if the page has another option to do something which results in another page such as 'edit object' should that be handled by this controller or another controller and if it should be handled by another controller would that be the same one that dealt with validation of the changes the user makes to the form when they actually edit it.
Should the same controller be used for:
displaying a page the first time
redisplaying the current page
tasks on that page
leaving the page.
In essence, what I am asking is:
1. Are Controllers related to Pages or Actions
2. Is PreDisplay and PostDisplay handled by the same controller
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules