3 Replies Latest reply: Jan 9, 2013 10:29 AM by Timo Hahn RSS

    Inserted Code Point on KeyPress

      Hi !. I have the following problem: I would lile to know If on a certain "Input Text" component, I could know where the user is inserting the character... I mean if he is inserting it in the position 0 or 3 for ex... Coz I have seen through a for component the properties of the "evt" parameter and I haven't seen a method that could help me... Cheers
        • 1. Re: Inserted Code Point on KeyPress
          Timo Hahn
          User, please tell us your jdev version!

          There is no such property. You can use javascript to mimic this, but I'm not sure if this works.

          If you tell use the use case we may have another advice...

          • 2. Re: Inserted Code Point on KeyPress
            Hi Timo !. Thankx for answering me !.
            The use case would be the following one... I have several types of documents such as: "DNI", "CUIT", "Libreta de Enrolamiento", "Passport", etc., which require different length... and a different syntax... For instance: The only type of document that needs letters inside is Passport... The first three characters must be letters and the following one numbers... The problem would arise if I type 3 letters then 2 numbers and the third number is typed in the beginning of the chain... I was clear ?... If not, pls answer me and I'll explain better... Thankx...
            • 3. Re: Inserted Code Point on KeyPress
              Timo Hahn
              You can use a regular expression validator for this.
              This expression is not tested. This will validate the field once you try to step out of it (as it's normally done with validation).