function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Kirill_YunussovKirill_Yunussov 

A variable not showing up in View State

I have encountered this before but now want to know what's going on: 

A boolean class-level variable, declared as follows, and initialized on page load, is not showing up in the View State's list of variables.

 

public boolean isChecked {get;set;}

.....

   isChecked = true;

 

Why is it not showing up in there?   A bunch of other booleans I have are in the View State, and I don't see any differences in declaration or usage.

 

 

Kirill_YunussovKirill_Yunussov

A developer here suggested that possibly the variable DOES show up in the View State, but it is not labeled correctly.   He has noticed that some class-level variable names were duplicated in the list.  So it could be that the names (and possibly the values) are not mapped correctly.