Welcome to the new Spring.io forums!
If this is your first visit, be sure to check out the
by clicking the link above, and for security reasons, use the
forgot password link to reset your password..
You may have to register before you can post: click the register
link above to proceed. To start viewing messages, select the forum that you want to visit
from the selection below.
No announcement yet.
Is there a way to prevent querystring parameter binding toPage Title Module
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
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.
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.