I’ll clarify a few. Jsf is very painful to work from a design point of view, to some extent in an attempt to draw a picture with hands tied to the back, but it is good for chewing forms and listing a lot of data. Thus, the sites we create in my company are jsf admin pages and jsp user pages. The problem occurs when custom pages have some complex forms and stuff, and jsf starts up.
Here's the question: I'm on a clean jsp page. I need to access some jsf page that uses a bean session. How can i initialize this bean? If I were on the jsf page, I could have a commandLink command that prepared the data. The only thing I can think of is to have a dummy jsf page that will do the job and redirect me to the desired jsf page, but it is so ugly and I don't want to end up with 50 dummy pages. I would prefer to find a mechanism to reinitialize a bean that is already in a session with some desired parameters.
Edit: some details. In this particular situation, I have tests that are either complete or filtered. This is the same test with the same logic and everything, except when the test is filtered, it should eliminate some questions depending on the answers. After clicking the link, it should run the requested test in one of two modes. Links are part of the main menu tree and are visible on many sibling jsp pages. My task is to have 4 links: testA full, testA filter, testB full, testB is filtered, that all lead to the same jsf page and TestFormBean should be reinitialized accordingly.
Edit: I researched the chips a bit, and until this helps me, I will definitely take this into account for the next project.
source share