Functionality added for the refresh button in widget.