Hi,
Declare it in the Attributes tab, So that you can access in all the methods of View. You can declare in Attributes tab of Component Controller too to access in all the methods of all views using wd_comp_controller-><attr_name>.
Hope this helps u.,
Regards,
Kiran