Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Complete
    • Affects Version/s: 3.1 RC2
    • Fix Version/s: 3.1.1
    • Component/s: Web
    • Last commented by a User:
      false

      Description

      Hi !

      In a controller method, i'm trying to put flash attributes while using a instance of RedirectView, and it doesn't seems to work.

      In ViewNameMethodReturnValueHandler, we have the following code to handle a redirect scenario (an also handle flash attributes):

      if (isRedirectViewName(viewName)) {
      	mavContainer.setRedirectModelScenario(true);
      }
      

      I think it's possible to add into ModelAndViewMethodReturnValueHandler something like

      if (mav.getView() instanceof RedirectView) {
      	mavContainer.setRedirectModelScenario(true);
      }
      

      Then we could write

      redirectAttributes.addFlashAttribute("flashMessage", "the message"));
      
      return new ModelAndView(new RedirectView("myview"));
      

        Attachments

          Activity

            People

            • Assignee:
              rstoya05-aop Rossen Stoyanchev
              Reporter:
              r1b2 R1B2
              Last updater:
              Trevor Marshall
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                6 years, 25 weeks, 6 days ago

                Time Tracking

                Estimated:
                Original Estimate - 10m
                10m
                Remaining:
                Remaining Estimate - 10m
                10m
                Logged:
                Time Spent - Not Specified
                Not Specified