on 11-20-2008 7:02 AM
Hi all,
I have a query regarding the input field.
I have a view from which i am calling other view.There are two input fields on the second popup.
I want that when the second popup opens, then the curser postion should be the first input field.
Rightnow for inputing the value I have to click on the input field and then enter the value.
I want the by defauld the curser should blink on the first input field.
How can I achieve this .Is ther is any property of input field or way to do this.
Thanks and regards.
Vaibhav
Hi Vaibhav,
There are two ways to set the focus:
Using an UI element (which can be called only from WDDOMODIFYVIEWVIEW
Within the WDDOMODIFYVIEW you can pass on the ID of the inputfield that you want to focus & then specifically set the focus on it using the below coding:
data: lr_element type ref to if_wd_view_element.
CALL METHOD VIEW->GET_ELEMENT
EXPORTING
ID = 'INPUT2' * id of the element in layout
RECEIVING
ELEMENT = lr_element
.
CALL METHOD VIEW->REQUEST_FOCUS_ON_VIEW_ELEM
EXPORTING
VIEW_ELEMENT = lr_element.
You can also do it in this way as the last resort. Use the function FOCUS_BY_CONTEXT_ELEMENT of class CL_WD_INPUT_FIELD to set the focus on input field using the context attribute.
Regards,
Uday
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello ,
In wddomodifyview method you have an importing parameter VIEW of type IF_WD_VIEW .
you can use the method IF_WD_VIEW->IF_WD_VIEW_CONTROLLER~REQUEST_FOCUS to set the
focus on the ui element by providing the required parameter.
Regards
Vivek
PS: PLease provide the points if answer is helpful .
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.