cancel
Showing results for 
Search instead for 
Did you mean: 

Setting focus on a TextEdit

Former Member
0 Kudos

Hi All,

Is it possible to set focus on a textedit on load of a page?

Thanks

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos
Former Member
0 Kudos

And what has this to do with the question?

Armin

Former Member
0 Kudos

Thanks for your replies.

Armin, I have found what is causing problem in my application. It is a mobile application run on pocket browser. So, we have put a parameter,

sap-wd-client=Pie03Client.

When I access my application without this parameter, it gives the cursor in there but not in this case.

Can you please tell me know to solve this problem.

Thanks

former_member186016
Active Contributor
0 Kudos

Hi,

Each runtime has limited features.

The Pie03Client will not support the features hence behave differently.

I dont think this can be solved else you choose some other runtime.

Regards,

Ashwani Kr Sharma

Former Member
0 Kudos

Thanks Ashwani for replying.

Can you please tell me under what runtime, can we get this feature to work in a mobile application. We currently have,

Symbol PocketBrowser v2.02

Windows CE v2.02 build 015

Windows Mobile v2.02 build 014

Thanks

Former Member
0 Kudos

Hi ..

check this ..

if(firsttime)

{

// get the UI element you want to focus In this case i am taking a input field

IWDInputfield inputfield = (IWDInputfield)view.getElement("<UI element ID>");

inputfield.requestFocus();

}

Urs GS

Former Member
0 Kudos

Thanks Sathish for replying.

When I try to put this code in wdDoModify method of the view controller of my application, it does not work.

But I have tried to make a sample application with this code and this seems to work.

Not able to understand why it is not working in my application.

Thanks

Former Member
0 Kudos

Another thing you can try is to request focus for the context attribute to which the TextEdit.text property is bound.

See https://help.sap.com/javadocs/NW04S/current/wd/com/sap/tc/webdynpro/progmodel/api/IWDViewController....

Armin