In this example, I'd care to the management of a tabPanel by a Session Managed Bean versus a Request Managed Bean. My function is switch tabs.
Switch tabs, which binding with Request Managed Beans’s property, it show normal results:
Switch tabs, which binding with Session Managed Beans’s property, it show error results:
As a result, Manage Session Bean to render error results as shown. As for Request Management Bean is perfectly normal. I can’t explain why cause this problem, because I think I was correctly in programmed.
Application: I also sent my application project (opened by net beans IDE) to get along with this question. You can concentrate in 3 items:
- The faces-config.xml file in Web/Web-INF folder, which defined TestCase3SessionBean and TestCase3RequestBean managed Bean
- The testcase3 folder in web folder (which have changeTabBySessionProblem.xhtml and changeTabByRequestProblem,xhtml).
- The beans package and utils package to save managed bean (in testcase3 we concens in TestCase3SessionBean and TestCase3RequestBean managed Bean).
You can download my archive project in my wordpress (please check testcase3):
- Please add JSF2.0 and richFaces framework to run application (https://community.jboss.org/wiki/HowToAddRichFaces4xToProjectsNotBasedOnMaven)
Message was edited by: Hung Phan