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

TableView

Hello expert,

I try to select data with a method <b>getdata()</b> in my <u>model</u> and then the the <u>result into my tableView</u>.

the Problem how cann bind my model with my tableView.

<b>The Model- method is:</b>

  METHOD getdata .

  lfld_tabname = 'SFLIGHT'.

  FIELD-SYMBOLS:
  <fstable> TYPE ANY TABLE.

  CREATE DATA itab_table TYPE STANDARD TABLE OF (lfld_tabname).
  ASSIGN itab_table->* TO <fstable>.

  SELECT * FROM (lfld_tabname)
     INTO TABLE <fstable>.

ENDMETHOD.

<b>The Layout is like this:</b>

<htmlb:tableView id                  = "id"
                 design              = "ALTERNATING"

                 headerText          = "Header Text"
                 onNavigate          = "onMyNavigate"
                 onRowSelection      = "onMyRowSelection"


fillUpEmptyRows      = "true"
                             footerVisible        = "false"
                             filter               = "NONE"
                             onClientRowSelection = "X"


                 visibleRowCount      = "10"
                 selectionMode        = "lineEdit"

                 table               = "<%=       %>"
               
/>

Thanks in Advance.

Regards.

adid

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Oct 23, 2006 at 03:18 PM

    If you use MVC and model data binding, you should just save the table in an attribute like "results" and bind it to your tableview.

    <htmlb:tableView id                  = "results"
                     table               = "//model/results"
                     allRowsEditable     = "FALSE"
                     headerVisible       = "FALSE"
                     columnHeaderVisible = "TRUE"
                     footerVisible       = "TRUE"
                     keyColumn           = "AUFNR"
                     sort                = "CARRID"
                     width               = "100%"
                     selectionMode       = "SINGLESELECT"
                     onRowSelection      = "onMyRowSelection"
                     visibleRowCount     = "15"
                     emptyTableText      = "<%= otr(ZTEST/NO_CARRIERS_AVAILABLE) %>" >

    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.