无状态Apache Wicket无状态页面/请求

编程入门 行业动态 更新时间:2024-10-26 16:34:42
本文介绍了无状态Apache Wicket无状态页面/请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

所以我正在阅读Wicket标签下的另一个问题,比较 Apache Wicket 和 Apache Click 。在我看来,这是一个简明的解释。我比Wicket世界更熟悉Click世界。

So I was reading another question under the Wicket tag comparing Apache Wicket and Apache Click. A concise explanation, in my opinion. I am more familiar with the Wicket world than the Click world.

我读到的一条评论是你可以制作无状态的Wicket页面。我开始考虑这个问题,无法找到一种方法来为无状态的东西发出请求或页面请求。在某些情况下,这肯定会派上用场。那么如何在没有状态的情况下开始使用Wicket?

One of the comments I read was that you can make stateless Wicket pages. I started to think about this and couldn't figure out a way to make a request or a page request for something stateless. This could certainly come in handy in some situations. So how does one start to use Wicket without state?

推荐答案

如果页面是可收藏的且不包含任何非无状态页面组件/行为然后页面自动无状态,不存储在会话中。我认为只要用户只访问无状态页面,就不会创建会话。在大多数情况下,如果关于如何显示页面的所有内容都可以仅通过no-args构造函数或采用PageParameters参数的构造函数来确定。普通的Link和Form类不是无状态的,所以你需要使用StatelessForm和StatelessLink。

If a page is bookmarkable and doesn't contain any non-stateless components/behaviors then the page is automatically stateless and not stored in the session. I think that as long as a user visits only stateless pages, a session will not be created. For the most part, if everything about how the page is displayed can be determined solely from a no-args constructor or a constructor taking a PageParameters argument. The normal Link and Form classes are not stateless, so you'll need to use StatelessForm and StatelessLink instead.

更多推荐

无状态Apache Wicket无状态页面/请求

本文发布于:2023-11-09 03:13:21,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1571239.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:状态   页面   Apache   Wicket

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!