How to pass boolean value to all setters in a java bean
Hello,
I have a java bean as a part of a JSF application which is controlling the rendering of the view components.
With time, now we have a ton of setters and getters in the bean. So for every component to be rendered, we can either record which view the action is coming from and then set false only to that views boolean (renderer) or we just set false to all booleans and true only to the one in question.
The question really is, if my pojo has lets say 10 setter methods which will set a boolean to variables in the class. Is there a way I can pass a boolean parameter to 9 out of 10 setters (since the 10th one will be true)?
Or to all setters is also fine I can then set the one I am interested to true.
Cheers,