I am trying to create an examination web app, in my app I have a JSF wizard that has 3 tabs, the first tab let the exam creator create a new exam for a course that is already defined or to choose from a predefined exams in a data-table.
Only after adding a new exam to a course the wizard will go to the next step automatically, to add questions.
When I try to add questions I get this error:
object references an unsaved transient instance
- save the transient instance before flushing
But it does not occur if I choose from the data-table an existing exam. When choosing an existing one it will go to the next tab and let me add a question and after doing so it will go to the next tab.
After researching I found out that I should change my managed bean scope from viewScope to applicationScope or sessionScope, I tried both and they did not work for me.