on 01-10-2005 3:24 PM
I want to change the status from a columnfield to not editable.
IF m_maut_row_ref->flag_ok = 'X'.
p_replacement_bee = cl_htmlb_tableviewcolumn=>factory(
columnname = 'MAUT_GEB'
edit = 'FALSE' ).
ENDIF.
but when i do this i get a white field not a grey with the value.
anyone can help ?
thx
Hi Marcel,
you want to disable the inputfield, but in fact you are just setting a parameter for the tableview column.
The "edit" parameter for the column just controls the ability of this column whether its content should be editable or not, BUT just in case the whole table row is set to edit_mode (note the parameter P_EDIT_MODE for the method render_cell_start, in case you are using an iterator).
What you want to do is - according to your problem description - to display a disabled inputfield in the column. To do so you should get familiar with tableview iterators where you can control rendering of the whole tableview, its rows, cells and contents.
See these weblogs for iterator info:
<a href="/people/thomas.jung3/blog/2004/09/15/bsp-150-a-developer146s-journal-part-xi--table-view-iterators:///people/brian.mckellar/blog/2003/10/31/bsp-programming-htmlb-tableview-iterator
<a href="/people/brian.mckellar/blog/2003/10/31/bsp-programming-htmlb-tableview-iterator:///people/brian.mckellar/blog/2003/10/31/bsp-programming-htmlb-tableview-iterator
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What do you mean by "get changes" ... you want to have an editable inputfield in a row that is not selected?
If so, than the answer is yes - using the iterator you can control the displayed elements in every way you like.
In our main web application I'm using a tableview in which I do not use the given tableview selection/edit functions, but I added some code to be able to edit non-selected lines as well.
I'm currently writing on a weblog about my tableview, might end up with several blogs, as there are quite a few non-standard things I built in there. My selection/editing solution will be included in one of these, not sure yet which one. If you have smaller additional questions, I will nevertheless help you in forum, for the "bigger picture" you gotta be patient til the weblog is done
Did you ever think of using Data Binding for your form elements? This way you don't have to care about manually retrieving the values.
If you want to access the value manually, this is how the id of the form field looks like in a tableview:
with data binding:
CONTROLLERID_MODELID_TABLENAME[ROWINDEX].COLUMNNAME
without data binding:
CONTROLLERID_TABLEVIEWID_ROWINDEX_COLUMNINDEX
Check the SAP online documentation:
<a href="http://help.sap.com/saphelp_webas620/helpdata/en/0f/ab3a3c9ca75402e10000000a114084/frameset.htm">Model View Controller (MVC)</a>
<a href="http://help.sap.com/saphelp_webas620/helpdata/en/fb/fbb84c20df274aa52a0b0833769057/frameset.htm">Data Binding</a>
hmmm here is my code to get the value of the field.
tv ?= cl_htmlb_manager=>get_data(
request = runtime->server->request
name = 'tableView'
id = 'maut' ).
IF tv IS NOT INITIAL.
tv_data = tv->data.
value = tv_data->get_cell_id(
row_index = '1'
column_index = '1' ).
value = tv_data->get_cell_value(
row_index = '7'
column_index = '1' ).
*
inputfield ?= cl_htmlb_manager=>get_data(
request = request
name = 'inputField'
id = value ).
he creates me a value = maut_1_1 but it doesn't work. He doesn't get any value.
Try calling the method REQUEST->GET_FORM_FIELDS and have a look at the received values while debugging:
Here is the code to access the form fields (place in DO_HANDLE_EVENT):
data: fields type tihttpnvp.
call method request->get_form_fields_cs
changing
fields = fields.
This table holds all values that were received by the server on last form submit.
Check for the values there and see if this helps to identify the cause of your problem.
According to this entry in your fields table ...
maut_AllCo<TKNUM/SND_NR/EMPF/PALL/BTGEW/GEWEI/<b>MAUT_GEB</b>/FLAG_OK/VBELN/
...
you should receive this value - what is the content of this field when you look at it on debugging into your request?
The old value? The new/changed one? Or something different?
I only get a filled table. But there are only my TKNUM.
ASSIGN table_event->selectedrowindex TO <i>.
CLEAR row.
row-value1 = table_event->get_cell_value( row_index = <i>
column_index = '1' ).
row-value2 = table_event->get_cell_value( row_index = <i>
column_index = '3' ).
...
value = request->get_form_field( name ).
Here the same problem. The request->get_form_field( name ) don't work on this server. On my developserver it works. I get the values.
-
-
when i use request->get_form_fields, then i get my changed value. But how can i get access to field ? fields-xxxx?
It is a little bit strange. request->get_form_fields work on the other server but not on my localserver. confused
Message was edited by: Marcel Gäbe
<i>The request->get_form_field( name ) don't work on this server.
i had debugged the methode get_form_field. I get an error number. M_LAST_ERROR = 20.</i>
We very (very!) seldomly experience errors at the level of the HTTP request. In this case, I would seriously recommend OSS message, queue BC-CST-IC.
brian
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.