on 12-12-2008 6:34 AM
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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.