on 11-24-2004 4:29 PM
Hello,
I know I have seen on this forum how to access a specfic tableview cell but I can't find the reference. It said something like 'do forget you can also access the table tvx1_2_1' but for the life of me I can't find it. I read it the other day and I thought to myself 'oh I know how to do that'. But now that I have to do it I realize I forgot. I have done searches on tableview, tvx1, 1, directly etc... and I still can't find it. I did it a couple of month ago and I saw it in the debugger (which is how I knew what tvx12_1 was refering to). Does anyone know the thread or can post an example for me? I would be eternally grateful and if we were still rewarding point I would do that too.
TIA
Rich
Here you go.
[TABLEID]_[ROW]_[CELL]
You can use that format in the OnInputProcessing or OnRequest to process with ABAP or
document.getElementById('[above here]').value or .innerHTML
I believe both the value and innerHTML will work provided you are in IE that is. .value works if the cell value is in a inputfield the other I think works but I've not had a reason to try it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Do you want to access that cell on the client via javascript?
Or on the server - either in OnInputProcessing for FlowLogic-Pages or in a controller/model method for MVC?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Maximilian,
Thanks for you response. I am trying to access a specfic tableview cell in a method in my MVC. More specifically in my render_cell_start of my iterator. It might be something like me->tvx1_2_3 for example. Where tvx1 represents the tableview ID and 2_3 is the row and column. Its funny because I pursued this route awhile ago and abandoned it thinking it wasn't necessary. Now I have come full circle and I may need to use this technique. Never a dull moment.
Cheers,
Rich
Not sure about the MVC as I do little with this side of BSP's although I need to change that but if you can are needing to do this in your iterator then it's even simpler.
you can access everything about the table in the iterator have a look at these weblogs:
/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
For example p_cell_id will give you the current ID of your cell while inside of the iterator.
Well, another question: do you want to access this special cell from the browser request (including the form fields) or from the table of your (model) table data? This might be a stupid question, but the answer is quite important ...
Your guess to try sth like me->tvx_1_2_3 will not work, because using it in iteraror would make "me" the iterator object, and if you don't set some attributes than the iterator class does not have any (just some standard method parameters).
So, where the data is coming from, that you want to access (either form submit or an itab somewhere), that's the thing to know right now.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
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.