on 01-23-2006 9:01 PM
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.