Skip to Content
author's profile photo Former Member
Former Member

Problem with Data-binding

Hi there,

hopefully somebody can help me out because I'm having some strange problem with Databinding in one of my MVC-BSPs.

When executing I am running into an "SAP Internal Server Error" telling me that there is a parameter missing for a dynamic function call.

After some debugging and testing the code triggering this is within my view:

<htmlb:dropdownListBox id              = "x_y_ddb"
                       table     = "<%=w_table%>" 
                       selection = "//mymodel/my_table[1].w"
                       nameOfKeyColumn   = "name"
                       nameOfValueColumn = "value"
                       disabled          = "<%=flag%>" >

This code was running ok last week. After some modifications in the model- and the controllerclass it is not running anymore. The strange thing is that I did not change anything regarding the used table or the attributes...

When debugging I found out that the method causing the error is "selection_model->get_attribute( attribute_path = selection_path )."

The attribute selection_path is correctly filled with "my_table[1].w". So all needed parameters are filled as this is the only one passed.

The method is called from "RESOLVE_MODEL_BINDING" of class "CL_HTMLB_DROPDOWNLISTBOX".

After trying a few things I have no more ideas. The error only occurs when binding to the table. Upon binding to a structure or to a field ev erything works fine.

Thing is, Im am 99% sure this worked last week and I can't remember having changed anything directly connected to this. I am still able to see the data that was created during testing last week.

Any ideas for me?



Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Nov 23, 2004 at 02:35 PM

    Hi again,

    I finally found the solution to my problem.

    First of all I really like to credit Thomas Jung for his answers in this thread:

    Function calls in BSP

    I didn't realize that there is a shortdump generated in the system in case of a RABAX_STATE. This definitly saved my day because I was able to track my problem down to this:

    As stated above I have an attribute named "my_table" defined in the modelclass. This attribute is called via databinding from within the view.

    Something else I have is a method within the model which is called "get_my_table". This method was meant to read some more informations from other databasetables to achieve a more user-friendly output in a tableview (via iterator).

    The shortdump told me that it is not the "selection_model->get_attribute( ... )" method which misses a parameter but "get_my_table".

    After renaming my method to sth. like "get_my_table_text" everything works fine - no more shortdumps.

    My conclusion is that during runtime a method called "get_my_table" is created dynamically for the databinding. Because I allready defined this method the wrong one gets called.

    Only remainig question: is it my fault because one should never name a method "get_<i>attributename</i>" which is not returning the parameter itself but something else or is this some sort of bug?

    For the record: we are on 620 SP41 with some fixes from note 616900.

    Any information/documentation on this?



    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Maximilian Schaufler

      Hi Max,

      I totally agree with you. The naming convention in OO development are the way you explained it.

      The conclusion of that is that you are able to define your own getter and setter methods for attributes which are used by the runtime in <b>every</b> case.

      Maybe this is OO-dev standard, I don't know.

      Or is it documented anywhere that you should not use naming conventions like described unless you want to achieve that those methods are used by the runtime?

      Hopefully Brian could bring some light to the dark.


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.