I would like to call within the View A the method of View B (after a button Event I want to check the data in View B, for this I have written a method checkdata). Both views are in a viewset.
Thanks for your help.
No way -- it is impossible to call methods in View Controller from outside (i.e. another View Controller)
What should be done for you particular case is the following:
1. Create custom controller.
2. Place your data inside custom controoler
3. Views context nodes should be mapped to custom controller context nodes.
4. Define your validation logic as a method in custom controller.
5. Now you can call this method from necessary view: all data entered via another view will be up2date in custom controller context due to mapping "magic"