added another case for button object in update method to observe the change in button state.Wrote a method to assign the default state to Preview button as false.
Created the setDefaultState method to be accessed from toolbar.as to set the default state of any button object. setButtonState methods to be accessed from anywhere to change the state of button to enable/disable.