Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-12303

Let @ModelAttribute work according with one or many specific @RequestMapping

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: 4.0.7
    • Fix Version/s: None
    • Component/s: Web
    • Labels:

      Description

      The link shared above is going to be used to ask for many "improvements"

      Here the summary of my request: I want to know if is possible add a new annotation or perhaps a new attribute for @ModelAttribute to only be executed according of a specific @RequestMapping.

      I could have many @RequestMapping's (creation GET/POST, search GET/POST, edit or update GET/POST, reports GET, JSON GET/POST, etc).

      Therefore for each potential call for any of these @RequestMapping's, a possible unneccessary call to a @ModelAttribute is going to be happen

      A @Controller could has 10 @RequestMapping's and few @ModelAttribute's (to create an object model and collections) and they should be executed according to only 1 or 2 @RequestMapping's.

      Therefore for the rest, the others 8 @RequestMapping, the @ModelAttribute's are going to be executed unneccessarily.

      I want avoid create many @Controller's

        Attachments

          Activity

            People

            Assignee:
            rstoya05-aop Rossen Stoyanchev
            Reporter:
            dr_pompeii Manuel Jordan
            Last updater:
            Spring Issues Spring Issues
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              3 years, 37 weeks, 5 days ago