cancel
Showing results for 
Search instead for 
Did you mean: 

Value not showing up in OnEnter

former_member189058
Active Contributor
0 Kudos

Hi all,

I have a table with a toolbar and a right alligned toolbar input field UI element.

This input field is bound to a context attribute of type INT1.

I have created an action onEnter and in the event handler, read the value od the context atrribute.

However, if the previous value is 1 and I enter, say 5 in the input field and hit enter, the get_attribute still returns 1 instead of 5.

This is really problematic for me? Can anyone guide on why this is happening?

Regards,

Reema.

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member189058
Active Contributor
0 Kudos

IE

Former Member
0 Kudos

Hi Reema,

Can you paste the code you are using.

Ideally if you are reading the context element correctly, there is no reason why you shouldn't get the current value.

Have you used the WDP code wizard to generate code for reading the context attribute? Try doing that if you haven't

Regards

Wenonah

Former Member
0 Kudos

In the Event Handler Method, Every action returns WDEVENT type CL_WD_CUSTOM_EVENT.Mak use of this.

data lr_element type ref to if wd_context_element.

data :lo_value type string.

r_element = wdevent->get_context_element( 'CONTEXT_ELEMENT' ).

and use this elementto get the value.

lr_element->get_attribute( exporting = 'Attr_Name' importing = lo_value ).

Now this lo_value contains the selected value