on 05-17-2006 7:59 AM
Hi all,
We are using htmlb dropdowns in several places in our application. The code loooks like this:
<htmlb:dropdownListBox id = "ddLB_customer"
disabled = "<%= lv_disable1 %>"
table = "//my_appl/T_CUSTOMER"
selection = "//my_appl/s_test_st.cust_id"
nameOfKeyColumn = "SEL"
onSelect = "Customer"
nameOfValueColumn = "VALUE" />
The selection is not getting retained in the dropdown though values are populated from the table.
In the above code, when I debug, the CL_HTMLB_DROPDOWNLISTBOX class, the
me->resolve_model_binding( ) method is executed properly and the model class is resolved but finally, the value is not selected on the screen.
But this is the same code that is found in SBSPEXT_HTMLB application.
However, this code works fine but only some times. The combo values are populated always properly,
but the problem is with selection only.Sometimes, it works fine but this is not the case always.
The problem with selection exists here also.
<htmlb:dropdownListBox id = "ddLB_customer"
disabled = "<%= lv_disable1 %>"
table = "<%= my_appl->T_CUSTOMER%>"
selection = "<%= my_appl->s_test_st-cust_id%>"
nameOfKeyColumn = "SEL"
onSelect = "Customer"
nameOfValueColumn = "VALUE" />
In the above case, me->resolve_model_binding( ) method does not actually resolve the model because,
the variables, _selection, _table are empty.
Which of the above is correct code and why are the selection values not retained in the above codes?
Is there something which is missing?
Please help.
Thanks.
hi,
the upper one method is used to for model binding.
the syntax is correct.
you didnt wrote about the table type you used i.e T_CUSTOMER
for dropdown listbox the table should be a table type of name value pair.
so t_customer should be a table type of name value pair.
and just fill t_customer prior to its display by desired values.
regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Thanks for you reply. I tried the first method. But this code
data ?= cl_htmlb_manager=>get_data
(request = runtime->server->request
name = 'dropdownListBox'
id = 'ddLB_customer').
data->selection is not fetching any value. So, I am unable to capture the selected value in the
do handle event of the controller.
Any idea why this is happening?
hi,
just create a new table using table type TIHTTPNVP(name value pair table type).
and fill this using your values from your table.
now use this table.
since you are using model binding you need not require to catch event to get selected value.
in model binding the values are directly moved to and fro between model and page.but the server round trip is required. which can be made using attribute onSelect.
regards.
User | Count |
---|---|
93 | |
10 | |
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.