on 10-15-2003 9:04 PM
Hi there,
I am using a Tableview with an inputfield within one of the Tableview columns. Once a user enters data into this field, how do you access this data that has been entered? Is there a method to read the values within a specific cell within a tableview if you have the column & row indexes? Any example code would be great.
Kind regards
Anthony
Hi,
I am using a Tableview with an inputfield within one of the Tableview columns. Once a user enters data into this field, I want to store that modified row .
For updating that row how can we recognise which cell has been entered? Is there a method to read the values within a specific cell within a tableview if you have the column & row indexes?
I want to use ABAP code for that..
Any example code would be great.
Kind regards
Santosh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Anthony,
It's very simpel to get the cell value. I assume thet you use HTMLB controls and controller.
In the Controller class there is a method called DO_HANDLE_DATA, it has Form_fields as one of the parameters. This has name value pair for the data enetred on the screen, Loop through this table of name value pair, check for the table event and then get the values you are looking for.
Another method is using Iterator interface into the controller and make use of it.
Hope it helps.
-Suresh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi!
Did you use HTMLB for Java or for ABAP? Can u plz add a your coding?
Oliver
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Oliver,
I've done all this TableView functionality in Java and am now needing it to work for a "proof of concept" BSP iView.
In Java I usually do something like the following to get the values out of InputFields rendered on the TableView:
public void onNavigate(Event ev) throws PageException {
AbstractDataType forexComponent;
.......
......
myTableView = (TableView) getComponentByName("da190Table");
.....
....
myTableModel = myDA190Bean.getTableModel();
.....
....
for(int i = firstrow; i <= lastrow_model; i++){
.....
forexComponent = componentPageContext.getDataForComponentId("da190Table", _
"txtForexComponent" , loopcount);
.....
.....
myTableModel.setValueAt(forexComponent, i, 6);
}
}
I would assume it is probably very similar on the BSP side as well...
DATA: table TYPE REF TO cl_htmlb_tableview,
table_event type ref to CL_HTMLB_EVENT_TABLEVIEW,
itmprice TYPE string.
table ?= CL_HTMLB_MANAGER=>GET_DATA( request = request
name = 'tableView'
id = 'tv1' ).
table_event ?= table->data.
itmprice = table_event->GET_CELL_VALUE(
row_index = p_row_index
column_index = p_column_index ).
I know this is way off the mark (bear in mind this was coded in "probably" the wrong place to start with....it's in the "IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_CELL_START")....was just for testing though...
I would obviously like it to be similar to the Java way of doing it using the TableView's underlying MODEL....and surely there must be something similar to "AbstractDataType" in ABAP???
Anyway I hope this helps in seeing what our problem is....any help will be greatly appreciated!!!
Regards
Anthony
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.