Skip to Content
author's profile photo Former Member
Former Member

Changing focus after entring values of a particular length in input fields

Dear All

I have many input fields in my web-dynpro java screen.

Some fields can take chars of length 2 and some for 3 and like.

My requirement is:

When the user has entered the values in a particular input field upto its max length, the focus should shift to next input field automatically.

Is it possible?

If yes, how?

Regards

Vineet Vikram

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Sep 23, 2008 at 03:47 AM

    Hi,

    Refers the following thread.

    Jumping automatically to next input field

    Jumping automatically to next input field

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 23, 2008 at 04:46 AM

    Hi,

    I think the kind of implementation you are looking for is not supported in Webdynpro. You need to trigger a server side event as the only option for now for each input field with the max length restriction.

    Regards,

    Murtuza

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 22, 2008 at 02:49 PM

    Hi Vineet,

    As for as I know automatic focus transfer is not possible upon reaching max. length. But if the user triggers any event like pressing "Enter". we can transfer focus.

    wdThis.getAPI().requestFocus(IWDNodeElement arg, IWDAttributeInfo arg);

    Regards,

    Siva

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 22, 2008 at 07:51 PM

    Vineet,

    Shifting focus to a separate field is possible but only when a server side event is raised with an action event. WD Java does not provide any client side input validation or client side scripting. If you Must do this, BSP offers these possibilities.

    You can use onEnter event of InputField to start a sever round trip and switch the focus as rightly pointed out by Siva.

    Hope this helps.

    Vishwas.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.