Tapestry5之SSO

SSO Session State Object

SSOs are shared between the pages of your web session only, and not with other sessions using the same application.

SSO被你自己的一个web session所共享,不会被其他人的web session所影响。

To turn a field into an SSO, annotate it with @SessionState. If any other page or component in your web session declares a field of the same type and annotates it with @SessionState then it will share the same value.

想要创建一个SSO只需要给他一个@SessionState注解。

在你的web session中其他的页面或者组件有一个和你声明的SSO具有相同的类型的话,那么所有的SSO的属性就会被共享。

这个挺奇怪的,只要类型相同的SSO就会被当做一个东西。与名字没有任何关系。

原文地址:https://www.cnblogs.com/voctrals/p/2982820.html