on 10-27-2007 1:30 AM
Hello Gurus,
Need urgent help on Cell binding - Here's what I have:
I have a bsp with one tableview for users to update shelf quantity.
Selection mode is <b>Lineedit</b>. I used this only bcos in this I need not select a row to update it - let me know if this is wrong.
Our users do not like to click on the row to select and edit it! I am not getting the edited values from the tableview.
Although I am using a contoller and view, it's not really an MVC. Can someone please guide me on this?
<b>
code in IF_HTMLB_TABLEVIEW_ITERATOR~GET_COLUMN_DEFINITIONS
append initial line to p_column_definitions assigning <def>.
<def>-columnname = 'SHLQTY'.
<def>-title = 'Shelf Qty'.
<def>-EDIT = 'X'.
Code in IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_CELL_START.
p_replacement_bee = CL_HTMLB_INPUTFIELD=>FACTORY(
id = p_cell_id
* type = 'DATE'
* showhelp = 'TRUE'
* type = 'QUAN'
VALUE = val
cellvalue = 'TRUE'
_VALUE = P_CELL_BINDING )
</b>
I do not see anything coming in <b>P_CELL_BINDING</b> .
Tableview in layout
<b>
<htmlb:tableView id = "result"
design = "STANDARD"
headerText = "Header Text"
filter = "SERVER"
onNavigate = "onMyNavigate"
selectionMode = "lineedit"
emptyTableText = "No records found!"
onRowSelection = "onMyRowSelection"
allRowsEditable = "TRUE"
selectedRowKeyTable = "<%= rkTab %>"
table = "<%= datatab %>"
selectedRowIndexTable = "<%= sRTable %>"
iterator = "<%= iterator %>"
visibleRowCount = "10" >
</htmlb:tableView>
</b>
I update an internal table Datatab with all the values I require.
Any idea why the cell binding id not working?
Many thanks in advance.
Mike
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Would really appreciate if someone can look into this - I really looked at many similar forum questions / blogs and could not get the answer.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Mike,
to make databinding work you need to use a model and the datatab table needs to be an attribute of this model.
then you need to change the parameter "table" of your tv-tag to something like this:
table = "//model/datatab"
if you don't want to use databinding you dont have to provide the parameter _value of your inputfield, but then you have to receive the entered values manually... (so i would go for the model...)
regards,
Stefan.
Hi Mike,
databinding is not possible with application classes. There are just a nice way to handle "session variables". You can use them with MVC as well.
Before MVC there was flow logic. Single formfield-values are receved e.g. when declared as page parameters. Values from tableViews are received e.g. in OnInputProcessing" by fetching the TV-Object from HTMLB_MANAGER and then calling methods like "GET_CELL_VALUE".
DATA: tv type ref to CL_HTMLB_TABLEVIEW,
table_event type ref to CL_HTMLB_EVENT_TABLEVIEW.
tv ?= CL_HTMLB_MANAGER=>GET_DATA( request = request
name = 'tableView'
id = 'mytv1' ).
table_event = tv->data.
myValue = table_event->get_cell_value( row_index = 1 column_index = 1 ).
good luck,
stefan.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.