on 05-20-2009 11:28 AM
Hi,
I have a Web Dynpro view with several input fields.
I would like to be able to define wich input field the cursor is placed in by default and after a user action.
I have looked around and found requestFocus and Set Cursor. requestFocus does not seem to make the input field ready for input and Set Cursor does not seem to work in a Web Dynpro view.
Any suggestions? Is it possible to include javascript in a Web Dynpro view?
I've thought about placing a containing HTML page around the Web Dynpro view and implement the javascript there, but it's not preferable...
Br
Robin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
>I've thought about placing a containing HTML page around the Web Dynpro view and implement the javascript there, but it's not preferable...
You defintely don't want to do that. SAP changes the internal rendering of the HTML code over time and would certainly break such logic eventually. Also the way the delta rendering works in Web Dynpro would make such external javascript access even more complex.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Use the follwing code,
data: lo_element type ref to if_wd_view_element.
CALL METHOD VIEW->GET_ELEMENT
exporting
id = 'ID' " id of your uielement in the view's layout
receiving
element = lo_element .
CALL METHOD VIEW->REQUEST_FOCUS_ON_VIEW_ELEM
EXPORTING VIEW_ELEMENT = lo_element.
Regards,
Radhika.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.