开发者

JSF 2.0: StateHolder vs. Serializable?

JSF has a special state-saving code that expects objects to implement StateHolder apart from the common Serializable approach. However, I just had a开发者_运维知识库 look at AjaxBehaviorListenerImpl class bundled with Mojarra 2.0.2. Instead using StateHolder, it is simply implementing Serializable and this works ok.

The thread at http://old.nabble.com/Serializable-UIcomponents-td19471884.html seems to state that going with Serializable should be avoided, but what are the detailed rules with this? It seems that, when object doesn't have any children (to notify of state changes), implementing Serializable is ok.

When is it ok to use Serializable and when not? It takes less code with Serializable as it is automated...

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜