If you are making a simple attempt to declare an instance variable in a converter, you will notice that you can't store the variable state over time. This may look like a strange behavior, but the truth is that the
getAsString are called on different instances. This is the simple explanation of why the instance variable doesn't have persistence over these methods calls.
We can fix this using
UIComponent set/getAttribute or using a session variable instead. In this recipe, we will use a session variable to simulate an instance variable of a converter. For this, let's suppose that we have two numbers, one inserted by the user and one is selected by the user from a
selectOneMenu component. The inserted ...