on 02-16-2008 11:36 AM
I want to set the focus to a field of a table which is inside a transparent container. View controller method GET_ELEMENT seems to be largely undocumented (the only thing I can find on it is "This method retrieves a view element with the specified ID or NULL if an element exists."
I can set the focus for a simple, top level field. How do I set it for a cell in a table?
And if you found this information in the documentation, then please tell me where it is!
Thanks for your help!
Russ.
Hello Russel,
you need to specify the pointer to the context element that represents the line in
addition while requesting the focus to be set on the view element.
Best regards,
Thomas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thomas,
Thanks for taking the time to answer.
My problem results from there being two methods for setting focus...
This one is used in WDDOMODIFYVIEW and uses view elements, which is what I was using.
There may be a way of
view->request_focus_on_view_elem(
exporting view_element = lr_elem ).
I have not found a way of telling it to select field CONNID of table SPFLI. It just focusses on the first thing in the table, which is the row-select button.
However, your response prompted me to look further and I have successfully used this in the WDDOMODIFYVIEW method as well as other places...
. lr_node = wd_context->get_child_node( 'SPFLI' ).
. lr_element = lr_node->get_element( ).
. if lr_element is bound.
. lr_api = wd_this->wd_get_api( ).
. lr_api->request_focus( context_element = lr_element
. attribute = 'CONNID' ).
. clear wd_this->focus_field.
. endif.
I think the trick in this case is to ignore view elements and go with what we know, which is context.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.