0

I am working on one old application which is developed in JSF. In that, there is first page on which user fills details and clicks on next button. One filled values, it displays values on second page.

Here one bean is created who is holding first page values and it's request scoped. The page having bean of session scoped. I'm trying to access it using below code:

try {
            if (obj == null) {
                Application application = FacesContext.getCurrentInstance().getApplication();
                appReqDetails = (ClassName) application.createValueBinding("#{obj}")
                        .getValue(FacesContext.getCurrentInstance());
            }
        } catch (Exception e) {
            logger.error("Error/Exception occured:", e);
        }

But approx. out of 100 users, 2-3 users are facing issue of values are not populating.

How to resolve this? Can I change scope of obj? Or any other way to get request scoped object into session scoped class?

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
Aasif Solkar
  • 81
  • 1
  • 12
  • 2
    This seemes relevant: https://stackoverflow.com/questions/8459903/creating-master-detail-pages-for-entities-how-to-link-them-and-which-bean-scope – Selaron Dec 19 '19 at 07:10
  • 1
    It's an 'old' application but using jsf-2.2? While using pre-jsf 2 ways of retrieving objects... hmmmm – Kukeltje Dec 19 '19 at 07:44
  • Please do not use version tags for sake of getting attention. Certainly not when you're actually not using these versions. – BalusC Dec 19 '19 at 11:29

0 Answers0