on 07-12-2012 1:49 PM
In my Sales Order Create WDA App,
I am able to trigger the valdiation of the Data
and then Simulation of Sales order
when a button is clicked on the Create Sales Order View.
How to achive the same functionality when the ENTER button on the Keyboard is pressed?
Thanks
Hi Chandra ,
You can set Focus to the UI element based on your condition and the if you press enter your button action will trigger .
In below screen shot i have set the focus to the button (you can see the button is highlighted )
and after just i presed enter .. its triggered the action assigned to the button
modify view method
DATA: lr_elem TYPE REF TO if_wd_view_element.
lr_elem = view->get_element( 'BUTTON_ID' )." pass the UI element ID you want to set focus
view->request_focus_on_view_elem( lr_elem ).
Regards,
Chinnaiya Pandian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes kiran i accept your point. Focus will change one you put cursor on other fields. That’s why I have mention
set Focus to the UI element based on your condition
This is purely based on his requirement. Either he can do by setting the focus or handle by on enter event.
But he needs to look into all the case situations. Or else if he want the easy solution & can convince the client he can assign a hot Key for the button.
Regards
Chinnaiya Pandian
TIMEDTRIGGER refreshes the screen per interval specified and this can be used to set focus on a button for which the ENTER action can be attached.
You can find examples of this interface element in the system in the Web Dynpro application WDR_TEST_UI_ELEMENTS, and in the component WDR_TEST_EVENTS in the view TIMEDTRIGGER
Hi,
Ley say in the view there are 5 input fields, now in the 5th input field create an action for onEnter event( you can find it under properties of the input field in the view ) . Now place the same code of button in onAction of Enter .
Hope this helps u.,
Thanks & Regards,
Kiran
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
11 | |
10 | |
9 | |
7 | |
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.