有没有办法在 Wicket 中传递隐藏值?
如 Wicket 重定向:如何传递中所述参数并保持 URL“漂亮”?,Wicket 中有多种用于传递参数的选项。但是,该页面上列出的所有方法都使用 URL 来传输参数信息。
是否有类似于 PageParameters 类 除了它隐藏了正在传输的信息?我不关心可收藏性,但我确实关心网址,例如
http://www.example.com/example.html?uniqueId=309308&superSecretValue=42
As described in Wicket redirect: how to pass on parameters and keeps URLs "pretty"?, there are a variety of options for passing parameters in Wicket. However, all of the methods listed on that page use the URL to transmit parameter information.
Is there a class that's similar to the PageParameters class except that it hides the information it's transmitting? I don't care about bookmarkability, but I do care about URLs like
http://www.example.com/example.html?uniqueId=309308&superSecretValue=42
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
安装自定义 URL 编码策略就是这样。
请注意,通常 Wicket 无论如何都不会公开其内部状态,因此您只需要将其用于可添加书签的页面。
Installing a custom URL coding strategy is the way.
Note though that normally Wicket doesn't expose its internal state anyway, so you'll only need this for bookmarkable pages.