Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Passing variable value from one controlller class to another

Former Member
0 Likes
400

Hi All,

We ve written a method under one controller class, want to call this method in another controller class, what type of method should we define so that we can call it in the second controller class. We want avoid defining a static method as in this case we cant define a global variable in this method.

the whole objective here is to pass one variable value from one controller to another controller class in the runtime.. any other ways to meet this. Pls help us out.

thanks in advance

Rahul pawar

Hi All,

We ve written a method under one controller class, want to call this method in another controller class, what type of method should we define so that we can call it in the second controller class. We want avoid defining a static method as in this case we cant define a global variable in this method.

the whole objective here is to pass one variable value from one controller to another controller class in the runtime.. any other ways to meet this. Pls help us out.

thanks in advance

Rahul pawar

1 REPLY 1
Read only

Former Member
0 Likes
375

I am not sure if I get your point but if there is no relationship between those two classes why don't you declare a public method (or private or protected if you can set them as 'friends') in class A and in class B declare a method that will have a parameter 'object1 ref to A' so that you can call in that method a call to class A method.