Skip to Content

htmlb dropdownListBox with data binding

Hello all,

After read the excellent artile "BSP Model Data Binding Made Easy" from Sergio Ferrari and Craig Cmehil I thought such a nice thing this, then I tried to use it.

I created a dropdownlistbox for country but It is not working, I mean the automatic load that data binding should do is not happening.

I inserted the following HTMLB tag in my view:

<htmlb:dropdownListBox id = "COUNTRY"

selection = "//ar_model/"

helpValues = "//ar_model/"


My country field inside my model is declared as following:

Data element LAND1

Search help name H_T005_LAND

Origin of the input help: X Explicit search help attached to the field

I compared every single line of code with the article and the only difference I noticed was that for CARRID the search help does not have a Text table, but for COUNTRY there is of course the Text Table T005T.

Could be this the reason it does not work?



Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Best Answer
    Posted on Oct 05, 2005 at 07:17 AM


    since I never used the helpvalues I tried to get your example working. Unfortunately it seems that the search help configured for land1 does not work with the mvc framework. I debugged the dropdownlist extension class and got the exception "CX_BSP_SERVICES_SHLP=>CX_NO_VALUES_FOUND" during the following method call:

        m_valuelist = metadata_s->get_valuelist( ).
        get reference of m_valuelist into table.   
      catch cx_bsp_services_shlp. "#EC NO_HANDLER  

    Just set a breakpoint in the class CL_HTMLB_DROPDOWNLISTBOX method resolve_model_binding. If you look further into the coding you will notice that there is no f4help for land1 and that is the reason for the exception.



    Add a comment
    10|10000 characters needed characters exceeded

    • Hello all,

      Thanks for everybody.

      With Thomas Ritter help I understood the reasons.

      I found that it only recognize search helps that are attached to the data element.

      So I created a new data element and then I found another interest behavior, the dropdownlist call function F4UT_VISUALIZATION_GET.

      Then the dropdown class check if there is an entry "L" in table VALUE_TAB that is returned by that funtion.

      The function F4UT_VISUALIZATION_GET only returns L in VALUE_TAB if the search help contains only two fields.

      If there is an L entry, the program accept the search help as valid for dropdownlist, otherwise it raises an exception CX_BSP_SERVICES_SHLP=>CX_HELP_NOT_SUITABLE.

      So as Shiva said it is not all search helps that data binding accepts, and now we know why it accepts only search helps with 2 fields.

      Unfortunatelly I will have to code my dropdown list manually, or better I will create a new data element that points to a valid country search help.



  • Posted on Oct 05, 2005 at 07:16 AM

    Hi Mauricio,

    could you state the WebAS version and SP level for your system?

    Also, do you use the controlRendering attribute for the htmlb:content element?

    I remember having data binding issues with the dropdown as well at a certain SP level.


    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 05, 2005 at 07:28 AM

    Hi ,

    Actually for your COUNTRY field model binding doesn't work , becaue it has external search help.

    I also faced this problem , for dropdownlist boxes model binding is possible only for search help types 'FIXED VALUES, and 'CHECK TABLE'

    it is not possible for search help types 'check table with text table' and 'external search help'.

    and one more thing if ur external search help contains only 2 fields then data binding for dropdown list box might be possible .As u said in sflight table 'CARRID' field can get dropdownlist box directly using data binding but not 'CONNID' field.

    I have 6.20 web applicatio server with service pack 53 . i dont know in 6.40 .

    Message was edited by: Shiva

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.