Skip to Content
0
Former Member
Nov 30, 2005 at 02:31 AM

Data Binding with tableview

27 Views

Hi,

I'd like to know how to have data binding set up for a table view.

Inside my htm file:

<htmlb:tableView id       = "tbv_CostTrip"
                     table    = "//model/AT_IUI_COSTASSIGNTRIP"
                     selectionMode = "SINGLESELECT"
                         keyColumn = "ORDER"
                     selectedRowIndex = "0"
                     footerVisible = "false"
                     iterator = "<%= ATO_ITERATOR %>"

Inside my IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_CELL_START

case P_COLUMN_INDEX.


    when AT_SV_DIST.
      CONCATENATE 'PERC_SHARE' l_rownum INTO l_id SEPARATED BY '-'.
      create object lo_inputfield.
      lo_inputfield->id = l_id.
      lo_inputfield->disabled = l_disable.
      IF l_disable = 'TRUE'.
        lo_inputfield->value = <FS_ROW>-PERC_SHARE.
      ELSEIF l_disable = 'FALSE'.
        lo_inputfield->value =
'//model/AT_IUW_COSTASSIGNTRIP/PERC_SHARE'..
      ENDIF.
      P_REPLACEMENT_BEE = lo_inputfield.

The user is able to add lines to the tableview for input (only one line at a time). My idea was to bind the fields of this new line to a workarea if l_disable = 'FALSE'.

To save I would append this workarea to //model/AT_IUI_COSTASSIGNTRIP somewhere else.

To add a new line for input I simply insert an initial line into internal table //model/AT_IUI_COSTASSIGNTRIP.

<b>I think there's someting wrong with my design.. but...

When I move from page to page, the number of lines I added are persistent, but the data I input into the input boxes are lost. This happened even before I attempted the workarea method.

Overall I'm just confused here, is there a way to do this without using a workarea?</b>

Message was edited by: Kevin Wong

Message was edited by: Kevin Wong