on 2007 Jul 10 1:21 PM
Hey Experts,
can anybody give me a hint how the ~focusfield in HTMLB works:
<body class="MobileBody" onload="setFocus('`~focusfield`')" onkeydown="return processKeyEvent(event);" onhelp="return false;">
<form method="post" action="`WGateURL()`" name="mobileform" onsubmit="return firstSend()" style="display:inline">
<!-- hidden okcode field -->
<INPUT type="hidden" name="~OkCode" value="/0">
<!-- hidden fkey field -->
<INPUT type="hidden" name="~FKey" value="">
<!-- hidden focus field -->
<INPUT type="hidden" name="~Focusfield" value="/0">
<!-- already send flag -->
<INPUT type="hidden" name="~ItsMobFirstSend" value="">
This is what the generator does. But how do I set the focus to an input field?
What does the hidden fields do?
Is there a way to set the focus in the IAC on the same field as in the Dynpro-Transaction?
Kind regards
Roman
Hi Roman,
if you do a SET CURSOR FIELD myfield in the ABAP, the ITSmobile framework sets the focus to myfield using the ~focusfield variable in the browser. ~focusfield just contains the name of the field which has the focus. On the other hand ~focusfield is used to transport the input field which currently has the focus back to the ABAP for i.e. GET CURSOR FIELD myfield. Basically you should have to do nothing special. ITSmobile just do it for you. Recently we fixed bugs in the focus handling. SAP note 1031074 contains the precorrections.
Best regards,
Klaus
P.S. If you use namespaces in fieldnames like /swcm/<fieldname> you have to apply the kernel patch from SAP note 1060796
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
66 | |
11 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.