Announcement Announcement Module
Collapse
No announcement yet.
Is there a way to prevent querystring parameter binding to Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Is there a way to prevent querystring parameter binding to

    the command object on POST requests?

  • #2
    Is overriding isFormSubmission what you want?

    Comment


    • #3
      I don't think overriding isFormSubmission will help me. Because my POST request IS a form submission and I still want to bind the form values to my command but not the query string parameters. The functionality I am looking for is

      if(request == GET)
      bind querystring parameters to my command
      if(request == POST)
      bind ONLY post parametes to my commnd

      Comment


      • #4
        I guess katentim meant that isFormSubmission would be exactly where you could put the branch logic you just described.

        Comment


        • #5
          Unless I am missing something. As far as I know overriding isFormSubmission is not going to work.

          1) isFormSubmission does not take a (Object command) argument so I cannot do the binding myself in isFormSubmission as it was suggested.

          2) Overriding it to return a false when I recieve a POST request will cause BOTH post and querystring parameters not to be binded to the command object. I do want the post parameters to be binded to the command object just NOT the querystring parameters.

          Any other ideas out there?

          Comment


          • #6
            Because my POST request IS a form submission
            I think I know what you mean.

            AFAIK, this can't be done out of the box. Why not change the query string?

            Comment


            • #7
              I was able to get around this problem by specifying an "action" attribute for my form that does not include the querystring parameters <form action="/path/file.html">. So now the request object resulting from the POST does not include the querystring parameters.

              I had not included an action attribute before because I was using tiles. So the requestUrl defaulted to the current URL which included the querystring parameters.

              Comment

              Working...
              X