cancel
Showing results for 
Search instead for 
Did you mean: 

I have some problems in getting input value of tableview

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

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

Former Member
0 Kudos

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>

<bsp:call url="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?

Former Member
0 Kudos

Hi Warot,

>>Do anyone have the source code that using the tray and having the tableview in the view of that tray?

You can look at ITMVC2 application for that.

Regards,

Ravikiran.

Former Member
0 Kudos

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

Former Member
0 Kudos

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.