Announcement Announcement Module
Collapse
No announcement yet.
RedirectView, url, expose Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • RedirectView, url, expose

    I just need someone to strengthen my belief

    I use a SimpleFormController subclass and I'm using it's doSubmitAction method, and after a successful submit I use a RedirectView to do the redirect_ after_post thing. But as RedirectView's documentation says "...exposing all model attributes as HTTP query parameters.", so after the redirect I see some parameters in the URL (my command object, org.springframework.validation.BindException, etc.) and I think it's annoying to see these things there.

    And finally the questions:
    Do I think right that I have to use one of the onSubmit methods with an empty model or with parameters I need?
    Or is there a better solution?
    Or is it totally unusal to see the aforementioned things in the URL?

    Thanks in advance.

  • #2
    You're right about the fact that using a lower level submit method to expose an empty model should clear the url.
    But you can also imagine (I'm not sure it is better solution) that you subclass (or reimplement, I'm not sure about the visibility of the methods) the RedirectView to use a ParameterEaterRedirectView which redirects while forgeting the parameter of the model. This way, you can keep using the hi level doSubmitAction while enjoying a clear url at the end.

    HTH

    Olivier

    Comment


    • #3
      Thank you Olivier.

      Comment

      Working...
      X