Updating the bean value jsf
One of the nicest feature of Prime Faces is you can add some parameters to your ajax calls ( callbacks ) and can decide on what to update while executing your actions on your managed beans.Think of following common scenario, we want to create a new user object with a dialog and show it in a datatable when user clicks on save button and do all these stuff with Ajax.
what happens if user just clicks save button w/o entering any data?
Problems caused by wrong Bean Scopes are often hard to trace and require profound knowledge of the JSF framework (and the fundamental principles of web applications in general).
This is why particularly developers new to JSF get easily in trouble by excessively using Session Scoped Beans.
So let’s define the requirement more precisely and try to implement it.
We want to open a dialog when we want to create a new user for the system, the username and password are required fields and when user does not enter any data to these fields and click save, the dialog should stay visible and messages shown inside the dialog.
There are a few simple questions to consider when dealing with Session Scope: With these considerations about session pollution and the resulting risks let’s take a look at common scenarios in JSF development.