cancel
Showing results for 
Search instead for 
Did you mean: 

Set focus(Set cursor) on Mobile Devices?

Former Member
0 Kudos

Hi All,

We have an issue with Set Focus in our WebDynpro Applications when run from a Mobile Device. We faced the issue 1.5 Years and we tried to use the SPB2.0(Symbol Pocket Browser) instead of the PIE.At that time we referred to SAP Note 893910 and also we did had correspondance with the SAP team and concluded that "Set Focus" is not supported on Mobile Devices and just got confirmation with the same information on the SAP Note. Now we have the same issue and we could not find any update to this note, but there is some info in SDN link below.

We just need clarification on this. Whether this works or not? If so does it just set the focus or sets the cursor also.

Please see additional details below.Any kind of information is greatly appreciated.

Below is the description of current issue with set focus/set cursor on RF device.

Hardware : Symbol MC9090 device with Ms Windows CE version 5.00 and 128MB of RAM and IE browser.

Web Server WAS7.0 SP11 ( or SP12)

Application: Java Web Dynpro applications

Issue:

Most of our Web Dynpro application's views have 2 or more input controls. On the first load of web page the cursor stays on the first field which is correct, then user enters text and on enter key pressed then the cursor moves to second input controls. It seams like we have a full control over the cursor , but if user presses any buttons on the view , the cursor disappears from input field and never goes back to input control. We can see doted line around the input box but no cursor presents.

The following code have been used to set focus :

public static void wdDoModifyView(IPrivateS3000 wdThis, IPrivateS3000.IContextNode wdContext, com.sap.tc.webdynpro.progmodel.api.IWDView view, boolean firstTime)

{

//@@begin wdDoModifyView

if (firstTime)

{

wdContext.currentContextElement().setS3000_flag_focus("S");

}

if (wdContext.currentContextElement().getS3000_flag_focus().equalsIgnoreCase("S"))

{

IWDInputField myfield;

myfield = (IWDInputField) view.getElement("txtmatnr");

myfield.setReadOnly(false);

myfield.requestFocus();

}

if ( wdContext.currentContextElement().getS3000_flag_focus().equalsIgnoreCase("Q"))

{

IWDInputField myfield;

myfield = (IWDInputField) view.getElement("txtmatnr");

myfield.setReadOnly(true);

myfield = (IWDInputField) view.getElement("txtqty");

myfield.requestFocus();

}

//@@end

}

Thank You

Gisk

Accepted Solutions (0)

Answers (1)

Answers (1)

chintan_virani
Active Contributor
0 Kudos

As per my knowledge setFocus API works from NW2004s SP09 onwards.

Former Member
0 Kudos

Hi Chintan,

Thanks for the response. Actually i just wanted to know the specifics if anybody had similar issue and could confirm what exactly works with "Set Focus".

1. Is Set Focus works on Mobile Devices every time or only for event "firsttime"

2. When it works "Is it just setting the Dotted Line" or "Blinking of the Cursor" in the focus field.

3. Whether it is a PIE Client OR Symbol Pocket Browser or Other?

4. The Environment Description and SP Levels(latest) that was working.

For me Set Focus / Cursor works as expected in the Desktop and also in the Symbol Pocket Browser 2.0 but NOT in Pocket Internet Explorer.

Thank You

Gisk

Message was edited by: Gisk

Sivakumar Ganesan(Gisk)

Former Member
0 Kudos

Hi,

Did you get some answers on your questions??

I need the use of setFocus on mobile devices too, using Symbol Pocket Browser, so i'm interested in these answers

Regards,

Thomas