Results 1 to 7 of 7

Thread: Is there a way to prevent querystring parameter binding to

  1. #1

    Default Is there a way to prevent querystring parameter binding to

    the command object on POST requests?
    cheers,
    Lili

  2. #2
    Join Date
    Aug 2004
    Location
    Melbourne, Australia
    Posts
    1,104

    Default

    Is overriding isFormSubmission what you want?

  3. #3

    Default

    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
    cheers,
    Lili

  4. #4
    Join Date
    Oct 2004
    Location
    Herndon, VA, US
    Posts
    648

    Default

    I guess katentim meant that isFormSubmission would be exactly where you could put the branch logic you just described.
    --Jing Xue

  5. #5

    Default

    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?
    cheers,
    Lili

  6. #6
    Join Date
    Aug 2004
    Location
    Melbourne, Australia
    Posts
    1,104

    Default

    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?

  7. #7

    Default

    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.
    cheers,
    Lili

Similar Threads

  1. Replies: 7
    Last Post: Sep 30th, 2005, 07:41 AM
  2. Replies: 7
    Last Post: Sep 13th, 2005, 01:45 AM
  3. Transaction Management
    By caverns in forum Data
    Replies: 3
    Last Post: Mar 8th, 2005, 06:38 AM
  4. Replies: 0
    Last Post: Jan 6th, 2005, 08:19 AM
  5. Replies: 2
    Last Post: Aug 17th, 2004, 04:16 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •