cancel
Showing results for 
Search instead for 
Did you mean: 

set the cursor on inputfield

former_member568822
Active Participant
0 Kudos

Hi,

I have several input field in my MI7.1 application for PDA develop using NWDS 7.1 . Is that possible for me to set the cursor on the application. For example after user scan the product code the cursor will move to quantity input field.

I try use

IWDAttributeInfo attribute = wdContext.getNodeInfo().getAttribute("Name");

wdThis.wdGetAPI().requestFocus(wdContext.currentContextElement(), attribute);

but some how the eswt not supported.

thanks.

Edited by: fcgan on May 26, 2008 10:58 AM

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member568822
Active Participant
0 Kudos

Solve by trigger the setFocus method at the plug.

stefan_henke
Contributor
0 Kudos

Hi,

putting the setFocus into the wdDoInit method would not work. But putting it to the plug is actually a smart idea

Regards,

Stefan

stefan_henke
Contributor
0 Kudos

Hi,

I guess you are using the 7.10 SP3 SDN evaluation version, right? I am not sure if this is possible in this version. There was one bug available in the original SP3 version which has been fixed in a patch. I currently do not know if the fix made it into the SDN release. If you are using the proper version containing the fix, there should be a method called "setFocus" on the corresponding input field. To check it do the following: in the wdDoModifyView method of the view containing the input field, type the following line of code

view.get<name_of_input_field>ViewItem().setFocus();

This should do the job you need.

Regards,

Stefan

former_member568822
Active Participant
0 Kudos

Hi,

I am using SP3 but i already update it to SP5 using the update function from developer studio. Anyway i will try with you code.

Thanks.

former_member568822
Active Participant
0 Kudos

Hi Stefan,

SAP just release the sp5 mi plugin patch. After i update the patch the

setfocus was available. Now the problem is the cursor still not appear after i set it.

Any idea???

thanks.

Edited by: fcgan on May 27, 2008 11:59 AM

former_member568822
Active Participant
0 Kudos

Hi,

Now i able to triger setfocus method only on the button action but the setfocus method on wdInit and wdDoModifyView. The cursor no appear when user first in the view. Is that any solution on tis??

thanks.