on 02-27-2009 7:10 AM
Hi All,
How to get the focus of particular UI Element in webdynpro Page,
I have a page where i am creating a ALV, I want to get that keyboard focus is on that element is there or not?
Can anyone please give some update?
Best regards,
Rohit
its not as per we want, we will try some other way.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
its not as per we want, we will try some other way.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In order to get focus you need to call focus method for that particulat UI element.
data: lr_inp_field type ref to cl_wd_input_field.
//create instance
//call method
lr_inp_field->focus( ).
for ALV is component, it may not be directly possible to put focus on a Particular single UI element within it , however you can always call focus Method in the Transparent Container or ViewUIElement container ( CL_WD_VIEW_CONTAINER_UIELEMENT) where this ALV is embeded.
Greetings
Prasshant
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Prashant
Thanks for your input,
The case is, i have a ALV and i want to refresh it when the focus is on that ALV only with some hot key.
Where should i should get the focus, like user can be at any part of screen and he can press that key, i want to refresh only when focus is on that ALV only.
Best regards,
Rohit
I would suggest try invoking REFRESH of ALV on the ON_CELL_ACTION event.
Below excerpt is from Thomas
The Events of inner UI elements are not exposed directly as they normally would be if they were standalone. Generally you can capture them using either the
ON_DATA_CHECK:
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/c8/6c80dbedfe42d1a93f8e6df1d7244a/frameset.htm
This gets trigger for any press of ENTER, so it generally works like the Input Field onEnter.
You could also consider ON_CELL_ACTION:
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/45/12093591152464e10000000a1553f7/frameset.htm
It is a higher level Event that encompasses both ON_DATA_CHECK and ON_CLICK.
if you want to capture & refresh on some hot key combination then refer to this thread
[https://www.sdn.sap.com/irj/scn/profile?editmode=true&userid=3760417]
User | Count |
---|---|
98 | |
11 | |
11 | |
10 | |
10 | |
8 | |
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.