Problem with @ViewScope and the @PostConstruct [duplicate]

陌路散爱 提交于 2019-12-22 17:44:08

问题


My MBean is @ViewScope and the @PostConstruct is called when new instance is created and when made ajax request. this should happen?


回答1:


This behavior is a bug in JSF that will be fixed only in the (upcoming) version 2.2 of mojarra.

See the detailed answer here: stackoverflow.com/questions/8804317/...




回答2:


@ViewScope beans have problems with some tags. for example:

  • <ui:include/>
  • <ui:composition/>
  • <c:forEach/>

If your page has these tags, you may have a problem.



来源:https://stackoverflow.com/questions/5427766/problem-with-viewscope-and-the-postconstruct

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!