cancel
Showing results for 
Search instead for 
Did you mean: 

TableView

Former Member
0 Kudos
133

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

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

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) %>" >

Former Member
0 Kudos

thank's for your answer

which type have the attribute results.

Regards

adid

Former Member
0 Kudos

As long as you don't want to implement generic behaviour, you should give it the type of the table SFLIGHT.

Best would be to create a table-type in the DDICT.