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

I have some problems in getting input value of tableview

First of all, I separate my page into three trays by <htmlb:tray>

In the view of the second tray, I use the tableview.

<htmlb:tableView headerText = "Update Confirmation"

headerVisible = "true"

id = "tv_update"

width = "100%"

visibleRowCount = "8"

selectionMode = "MULTILINEEDIT"

filter = "server"

sort = "server"

table = "<%=T_UPDATE%>">

<htmlb:tableViewColumns>

<htmlb:tableViewColumn columnName = "DEL_NO" />

<htmlb:tableViewColumn columnName = "ITM_NO" edit="TRUE" />

<htmlb:tableViewColumn columnName = "BATCH" edit="TRUE" />

</htmlb:tableViewColumns>

</htmlb:tableView>

In the buttom, I have an adjust button.

<htmlb:button id="adjust" text="Adjust" onClick="adjust"/>

In the controller of this view, I try to get value from selected row in DO_HANDLE_EVENT.

class cl_htmlb_manager definition load.

l_tv ?= CL_HTMLB_MANAGER=>GET_DATA( REQUEST = request

NAME = 'tableView'

ID = 'tv_update' ).

if l_tv is not initial.

l_tv_event = l_tv->data.

clear SELECTEDROWINDEXTABLE.

SELECTEDROWINDEXTABLE = l_tv_event->PREVSELECTEDROWINDEXTABLE.

However, the l_tv_event->PREVSELECTEDROWINDEXTABLE is initial, although I click any row in the tableview

Add a comment
10|10000 characters needed characters exceeded

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Sep 29, 2005 at 04:54 AM

    Hi Warot,

    Include this in your table View tag in layout:

    <b>onRowSelection = "myEvent"</b>

    Then only an event is run on selection of the row. Try to include this and for further problems pls revert back.

    Regards,

    Ravikiran.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 29, 2005 at 05:26 AM

    HI Warot,

    Have you tried to debug the application?Is it going to DO_HANDLE_EVENT ?

    IF not then maybe you have missed the DISPATCH_INPUT( ) method call when you call your view from DO_INIT or DO_REQUEST method .

    Is the application stateful?

    Regards,

    Siddhartha

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 29, 2005 at 06:16 AM

    I try to use the onRowSelection = "myEvent", but it doesn't work.

    And, the method DO_HANDLE_EVENT is triggered.

    I think it concerns with the tray I define like this

    (my table view is called by the confirm_update.do)

    <htmlb:tray id="tray2" title="Confirmation" design="form" width="100%" isCollapsed="false">

    <htmlb:trayBody>

    confirm_update.do" comp_id="update_confirm"/>

    </htmlb:trayBody>

    </htmlb:tray>

    I used to do by using <htmlb:group>. It can get value from PREVSELECTEDINDEXROWTABLE correctly. Do anyone have the source code that using the tray and having the tableview in the view of that tray?

    Moreover, in the DO_HANDLE_EVENT, I called another method, Adjust_data. In the method 'Adjust_data', I put all source code used for getting data from tableview. Is there any concerns?

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 29, 2005 at 10:44 AM

    hi,

    Put

    allRowsEditable = "TRUE"

    inside your <htmlb:tableView> tag this is necessary if you want any of your column to be edit="true".

    this makes the event to read the value inside PREVSELECTEDROWINDEXTABLE also.

    and you will receive your desired value.

    hope this will solve your problem, else reply.

    Regards,

    Hemendra

    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.