Added javascript function to handle marking state changes
Updated view rjs files to call js function created to handle state changes