cancel
Showing results for 
Search instead for 
Did you mean: 

Facing problem in accessing global attribute inside an action in WDA

Former Member
0 Kudos

Dear all,

I am facing problem when accessing a global attribute inside an action which is declared in component controller.

The Global attribute I have created of type DataElement which is of type int.

I am able to access this Global attribute inside WDDOINIT method.Inside WDDOINIT method I am setting a value to

this global attribute which I am expecting to carry this value to a action.

But Inside action it is not carrying the value from WDDODOINT

instead it is holding value 0(ZERO).Pls suggest where It is going wrong.

Thanks,

Reddy.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

The way you described seems everything is right. Probably you need to cross check

1. Created a attribute in Component controller and marked it as public.

2. You set this attribute in the view doinit method.

wd_comp_controller->gv_mydata = 10.

3.You access the gv_mydata the same was in step 2.

Former Member
0 Kudos

kris/bhaskaran

Thanks Problem Solved.I am doing mistake when setting the value to the global attribute in WDDOINIT method.

wd_comp_controller->VAR = '10'.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Sudhir,

Try like this...

create attribute in Comp controller and make it as public( check check box ).

You can write code to initial in wddoinit of comp controller using

WD_THIS->VAR = '10'.

or

Go to wddoint method of view and assaign some value to this..

like..

wd_comp_controller->VAR = '10'.

And in your another method call this by using wd_comp_controller->

you will get. It is working for me i checked.

Cheers,

Kris.