开发者

JSF: Should I keep the data list of dataTable in SessionScoped bean or ViewScoped bean

Can you guys give me opinion on these scenario:

1. data list is large and update quite often

2. data list is small开发者_运维问答 and does not update that often

3. any other interesting case that you guys think a noob like me should know


Always prefer view scope to session scope. In the general case the data in a dataTable is not session-wide, it is for the current view.

You can use the session as some sort of cache, but that cache better be in another place - i.e. between your application and your storage.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜