分页链接断开来自post数据cakephp的搜索结果 [英] Pagination links breaking search results coming from post data cakephp
问题描述
当我搜索我的列表我得到一些结果分页,但当我去第二页我的搜索是
打破,因为它是一个获取请求,我通过post获取搜索结果
有没有办法获得满足上述条件的结果?
您希望实施 PRG模式。
Post / Redirect / Get(PRG)是一种web开发设计模式,
可防止某些重复表单提交,为用户代理(用户)创建一个更直观的
接口。 PRG以可预测的方式实现书签和
刷新按钮,不会创建重复的
表单提交。
CakeDC搜索插件可在CakePHP中轻松完成。
When I've Search my listing i'm getting some results with pagination, but when i go for second page my search is breaking as it was a get request where i'm getting the search results via post method.
Note: For getting search results I don't want to submit the form via get request (i.e. Query string params) and also don't want to store the form data in session
Is there any way to get the results which satisfy the above conditions ?
You want to implement the PRG Pattern.
Post/Redirect/Get (PRG) is a web development design pattern that prevents some duplicate form submissions, creating a more intuitive interface for user agents (users). PRG implements bookmarks and the refresh button in a predictable way that does not create duplicate form submissions.
The CakeDC Search plugin makes that pretty easy to do in CakePHP.
这篇关于分页链接断开来自post数据cakephp的搜索结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!