开发者

JSF2 f:ajax ajax requests without query string?

开发者 https://www.devze.com 2023-03-20 07:31 出处:网络
Right now on each f:ajax (or a4j:ajax) request I\'m making, the POST includes the query string which I don\'t want.Is there a way to not have it pass them on?I don\'t understand why it does this anywa

Right now on each f:ajax (or a4j:ajax) request I'm making, the POST includes the query string which I don't want. Is there a way to not have it pass them on? I don't understand why it does this anyways.

Example: Request page

GET /mypage.xhtml?zipcode=10101

Then any ajax calls fired by f:ajax on that page does a post like so:

POST /mypage.xhtml?zipcode=10101

This causes a lot of problems because if i changed the form element for zip on the page with ajax, any other ajax post will actually cause the original zip code passed into the page to get re-read and reset on my backing bean.

I really want to tell all f:ajax calls to STOP putting the request parameters in the URL, like so:

POST /mypage开发者_Go百科.xhtml (regardless of what request paremteres were on the original page GET).


This may happen if you have view params defined.

0

精彩评论

暂无评论...
验证码 换一张
取 消