I have a bean class as follows:
static int variable_static;
public RestaurantBean() {
variable_static = 0;
}
//...
//value of variable_static changes throughout the code
//...
public string button() {
//firing this button causes the variable_static value to change back to 0
return null;
}
I have a static variable which its value undergoes changes throughout the code (I know it by printing out its value), but when the button is fired, its value automatically changes back to the default value which is what not I want. Is this a postback in JSF? how can I prevent this from happening?