cancel
Showing results for 
Search instead for 
Did you mean: 

Controlling which field cursor is in when Web DynPro page loads

Former Member
0 Kudos

Hello,

I want the cursor to be positioned in a specific field when my WDP page loads. How do I accomplish that?

Thanks in advancce for any help.

David.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi David,

Option 1:

-


if(firstTime){
  IWDInputField input = (IWDInputField)view.getElement(<<Input Field name>>);
  input.requestFocus();
}

Option 2:

-


Check the following method

requestFocus(IWDNodeElement nodeElement, IWDAttributeInfo attribute)

IWDAttributeInfo attribute = wdContext.nodeXYZ().getNodeInfo().getAttribute(IPrivateMyView.IXYZElement.ABC);
wdThis.wdGetAPI().requestFocus(wdContext.currentXYZElement(), attribute);

Hope this solves your problem.

Regards,

Santhosh.C

Former Member
0 Kudos

Fantastic!

Wish it was that easy to find answers to all the problems I'm having with this tool.

Thanks much!!

Former Member
0 Kudos

You could've found this when looking at the Web Dynpro API documentation for inputfield (IWDInputField)...

Answers (0)