cancel
Showing results for 
Search instead for 
Did you mean: 

Passing Vlues To A View Method

Former Member
0 Kudos

Hi Experts,

Could some one please tell me how to pass values between 2 methods of the same view. In one of my view methods i have declared an importing parameter in the declaration level and on click of a button i need to pass some value to this parameter kindly let me know how this can happen.1

Thanks In Advance,

Chaitanya.

Accepted Solutions (1)

Accepted Solutions (1)

uday_gubbala2
Active Contributor
0 Kudos

Hi Chaitanya,

Try declare the parameter that you want to share data in between methods of the same view in the "Attribute" tab of your view. So in the action handler for your button you would be just setting the attribute value like:

" suppose you have defined your attribute as gv_attr1 in the Attributes tab

wd_this->gv_attr1 = <your value>.

And you can directly access the value of gv_attr1 within any of your methods views by referring to it as wd_this->gv_attr1.

Suppose you want to share an value between different views of the component then try declare this attribute in the Attributes tab of the Component Controller instead of view level.

Regards,

Uday

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello Chaitanya Raju,

Though i don't fully understand your question, i assume that this is your problem!

You want to pass the data between two methods?

Solution:

If you want to share the data across the component(By all methods), you can create global attributes in the component controller or

If you want to access the data only at view level(All the methods that are located at the view level), you can define attributes in the view level. So that data can be accessed only within that particular view.

To pass some value to this parameter on click of a button

You can define Importing parameters at calling method or define exporting paramters at caller method.

Thanks,

Bharath.K