on 11-27-2014 4:34 AM
Hi Gurus,
in my wd component , in the componebt controller i have 1 attribute name lv_guid.
in my componet 4 view are designed along with 4 buttons(each view 1 button is allocated).
let us take lv_guid = "00012345".
if i click on view 1 = button 1,in action i need to change the value of lv_guid to "000678".
my question is : am i update the value of lv_guid(new value) in the component controller attribute i.e lv_guid.
i want to use the new lv_guid in another view action method.
2. when we write the code in the component controller methods why not in view level methods.what is the major difference between the two scenarios.
Any ideas on this.
Regards,
Sudheer.
Hi Sudheer,
You can access component controller attribute in any views within component as below
wd_comp_controller->lv_guid
Make sure that lv_guid attribute is set as PUBLIC in component controller.
Sample:
on click of button1 in view 1
wd_comp_controller->lv_guid = '000678'.
on click of button 2 in view 2
wd_comp_controller->lv_guid = '000679'.
Whenever there is a common logic to be used by all views, we create a method in component controller and can be used in any view
If any logic is for only particular view, then we create method in view
Hope this helps you.
Regards,
Rama
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rama ,
Thanks for your quick reply ,
let us take lv_guid = '00678'.(globally)
in my view1 it is changed to lv_guid = '123'...
is this lv_guid(new value = 123) is globally is updated /available in component controller.
We can access this via wd_comp_controller.
for view 4 lv_guid will be '123' as per my requirment .
Is it updated globally.
Regards,
Sudheer
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
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.