cancel
Showing results for 
Search instead for 
Did you mean: 

TableView

Former Member
0 Kudos

Hi,

I have a page with 2 input fields type DATE, combo box and two tables with 1 column type INPUT (editable) and button.

In a beginning two tables are empty.

When user enter a date range and change a value in combo box I fill tables with appropriate values in a first column type TEXT. The first table is for editing a year values a second one is for editing a month values.

I fill some values into first table press a recalculate button etc etc.

But always when I enter an event OnInputProcessing a tables year_values and month_values are empty. The attribute auto does not have influence on this.

Can anybody give me an advice why the filled values are not passed for a next processing ?

Thank you.

Marian

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

If i had rightly understood you, it is a problem of the values being non persistent. You need to make the page stateful or the other option is to do this in your onInputprocessing event handler:

runtime->keep_context = 1.

Thanks & Regards,

Ravikiran.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Marian,

You have to retrieve value of editable fields in OnInputProcessing and update your year_values and month_value with those values. Then do the processing you need to do.

This is Raja's answer to one of the similar posts.

<i>all editable cells of tableview are rendered as input fields and the filed id will be

<tablevide id>_row no._column No

for example if your tableview id is "TV" and you want to get the value of 2nd column in the fourth row (edit mode)

then in the oninput processing use the following code.

method 1.

CALL METHOD cl_htmlb_manager=>get_simple_data

EXPORTING

request = request

id = 'TV_4_2'

CHANGING

data = <value of 4_2>.

method 2.

CALL METHOD cl_htmlb_manager=>get_simple_data

EXPORTING

request = request

id = 'tv'

row_idx = '4'

COL_IDX = '2'

  • col_name = 'INVISIBLE'

CHANGING

data = <value of 4_2> .

Hope this helps.

</i>

Regards,

Narinder Hartala

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Of course if you use MVC and databind your interal table to the <htmlb:tableView>, the runtime will do all this work for you. Data Binding will automatically refill your internal table, even on editable fields.

Former Member
0 Kudos

Hi,

thanks all for answer. I did what Narinder Singh Hartala adviced to me before. Unfortunatelly on the next entrance to OnInputProcessing the tables were still empty.

runtime->keep_context = 1 solved this problem

I am very beginner to BSP programming so I am not to much familiar with MVC concept.

Marian

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>I am very beginner to BSP programming

Welcome.

Keep in mind that you have a stateful program now. The user's session will be retained in server memory even if they navigate to another page or close their browser. Have a look at the BSP sample application ITSM if you want some code that can be used to kill the state when the user no longer needs it.

I can't recommend enough that even if you are new to BSP, that it is well worth the time spent to get familiar with MVC. Binding is a huge plus. MVC makes it possible to produce cleaner, easier to maintain applications.