Why does @PostConstruct callback fire every time even though bean is @ViewScoped? JSF

前端 未结 5 620
没有蜡笔的小新
没有蜡笔的小新 2020-11-30 01:19

I am using datatable on page and using binding attribute to bind it to my backing bean. This is my code :-


         


        
5条回答
  •  执念已碎
    2020-11-30 01:55

    The balusc's answer helped me a lot, i would like to say that i had that bug with mojarra version 2.1.7, i am currently using 2.1.29-01 released in january-2015 and this bug is fixed, my problem was binding a tabview to a viewscoped bean. With this version I dont have that bug and binding and postconstruct is working fine. I use Jboss 5.2 and i have to use mojarra 2.1.x so i hope this answer help other people in the same situation.

    http://mvnrepository.com/artifact/com.sun.faces/jsf-api/2.1.29-01 http://mvnrepository.com/artifact/com.sun.faces/jsf-impl/2.1.29-01

提交回复
热议问题