cancel
Showing results for 
Search instead for 
Did you mean: 

CL_HTMLB_MANAGER=>GET_DATA

Former Member
0 Kudos

Hi,

In my view (myView) I created an imput field like this:

<htmlb:inputField id= "<%= lv_high_value_id %>" value = "<%= lv_value %>" size="20"/>

where lv_high_value_id = 'HIGHFD_1'.

in my controller I added this code to get the value of my field:

lv_field_high ?= CL_HTMLB_MANAGER=>GET_DATA( request = runtime->server->request

name = 'inputField'

id = lv_high_value_id ).

IF lv_field_high IS NOT INITIAL.

lv_value = lv_field_high->value.

ENDIF.

The problem is lv_value is empty because the generated id in the view when you see the "view source" is equal to 'V1_V21_MyView_HIGHFD_1' not what I give 'HIGHFD_1'.

Is there any method to get the value using my id 'HIGHFD_1', or is there a method to get what the framework have added "V1_V21_MyView_"?

Thanks for your help and Best regards,

Djamal

Accepted Solutions (0)

Answers (2)

Answers (2)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

I would highly recommend going with MVC Binding and then avoiding having to code any data retreival logic at all. However if you do use the GET_DATA, you will need the full name of the field on the client (this includes the controller prefixes). An easy way to get the controller prefixes is to use the controller attribute: COMPONENT_ID. For any view that is at the same level as the current controller, this should have the correct full prefix.

athavanraja
Active Contributor
0 Kudos

you can simply try

<value var> = request->GET_FORM_FIELD( name = 'HIGHFD_1' ).

Regards

Raja

you could also try Model Data Binding expalined in this weblog .

/people/sergio.ferrari2/blog/2006/08/28/bsp-in-depth-model-data-binding