Validating TextField input

Due to JVM constraints, I'm using JDK 1.1.8. Can I capture the TAB key, & create a focusManager, so focus won't occur until the gaining component type is learned AND the losing input is validated? It also appears that gaining processFocusEvent's method isn't called until the losing method exits. Expected? Makes synchronization using flags complex. I created a singleton focusManager, and created new FocusEvents and queued them, just to set flags. Somewhat overkill. Any ideas on implementation would be appreciated. TIA, Jeff

Thanks for the reply.
Jeff,
One thing I learned early on is that you cannot tell
the order that events will happen, you can get the
keypress, but the other events may have happened
already--the order may be different on each computer
you install. You will have to get the keypress and
then verify the other conditions you want to happen.
In my early programming I had an application that did
something on lostfocus and then on gotfocus. When I
started installing on different computers, it only
took about 3 to find the first one that sent events in
a different order than my box did. It caused me to do
a lot of reading and then some major rewriting.
Have fun.

Similar Messages

  • Spray validation TextField placement

    Hi everyone,
    I am having possibly quite easy problem for most of you with placing  Spray validation TextField.
    I am trying move to the left this field by fixed number of pixels. My code looks like:
    <!doctype html>
    <html>
    <head>
    <meta charset="utf-8">
    <title>Untitled Document</title>
    <style type="text/css">
    .form_container {
      height: 400px;
      width: 960px;
      border: 1px solid #000;
    </style>
    <link href="SpryValidationTextField.css" rel="stylesheet" type="text/css">
    <script src="SpryValidationTextField.js" type="text/javascript"></script>
    </head>
    <body>
    <div class="form_container">
      <p> </p>
      <form name="form1" method="post" action="">
        <span id="nameTextField">
        <label for="name"></label>
        <input type="text" name="name" id="name">
        <span class="textfieldRequiredMsg">A value is required.</span></span>
      </form>
    </div>
    <script type="text/javascript">
    var sprytextfield1 = new Spry.Widget.ValidationTextField("nameTextField", "none", {validateOn:["blur"], hint:"Your Name"});
    </script>
    </body>
    </html>
    If you know how to move this field to the right please let me know.
    Thanks in advance.

    Adding
    .textfieldRequiredState .textfieldRequiredMsg, .textfieldInvalidFormatState .textfieldInvalidFormatMsg, .textfieldMinValueState .textfieldMinValueMsg, .textfieldMaxValueState .textfieldMaxValueMsg, .textfieldMinCharsState .textfieldMinCharsMsg, .textfieldMaxCharsState .textfieldMaxCharsMsg
        margin-left: -50px;
    will produce the following result

  • How to do validation of input fields

    Hi all,
              I have a rquirement to do the validation of input fields.Can anybody explain me how to go for that???Please explain in detail.U can also give me a link where i can find the tutorial for doing this.

    Hi Amit,
    What everyone has said above is correct - in the method of your action simply test for whatever condition you need to validate for.  However, the following tutorial shows you how to use Web Dynpro's Message Manager to display the messages on the screen in an easy user-friendly way:
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/wd%20java/wd%20tutorials/a%20simple%20input%20form%20with%20message%20and%20error%20service%20support.pdf">Enabling Message and Error Support</a>
    In addition, there are some validations that are done automatically depending on what you have your input fields set to - for instance, if you bind your input field to a date and a user enters words into the field instead of an actual date, it will automatically display an error message.  To learn how to turn this feature on and off, see this tutorial
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/edf6ea90-0201-0010-7696-a68662381c12">Using Validating and Non-Validating Actions</a>

  • Validation of input parameters in Oracle BI Publisher reports

    Hi
    I am new to Oracle Bi Publisher.
    In my project i am using oracle BIPfor generating simple reports.
    here i need validation for input parameters (Date field) and i want to make it (Date field) disable, so that user can select the date through the Calendar component only.
    Can anyone please provide me the solution in detail, it is urgent.

    I have the same task to validate input parameters with Oracle BI Publisher 5.6.3 running under Oracle eBS 10.5.10.2. My validation goes beyond of what I can do during parameter registration. I am using Data Templates.
    My first logical place was the before report trigger. So, I built a report trigger which returns 'false' in case the parameters are not proper. Guess what... XMLP just returns a hard-coded message
    !!Error : trigger '" + datatrigger.getName() + "' returns status as 'false'
    First of all, this is a bad style to hardcode messages visible by the user (especially during French implementation). Second of all, it is not informative at all. It would be nice to change oracle.apps.xdo.dataengine.XMLPGEN.executeTrigger() to read, for example, a message from the message stack when the trigger returns 'false' and let the user read it.
    Anyway, what I did was I built a special data group, decalred before any other data group, query like
    select my_package.my_validation fro dual
    If parameters fail the validation my PL/SQL package throws an application exception with a message. At least, in this case the error message gets available as the description of the concurrent request.
    I wish the before report trigger worked!!!

  • Validating keyboard input data

    I am new to java and have a question regarding validating input.
    I did check the FAQ for "Validating keyboard input data" but found no help.
    I have to check that the keyboard input is only one of the following char a c,C,d,D
    Ihave tried different conditional loops and statements but cannot get it right.
    Could someone point me in the right direction.
    I am using the latest java.
    Thanx

    well i think i am close but i can't figure out why i have an endless loop or how to fix it
    System.out.print("Please enter the Costumer Type C or R: ");
    String cosTypeTemp = scan.nextLine();
    cosType = cosTypeTemp.charAt(0);
    while (cosType != 'c' || cosType != 'C' || cosType != 'd' || cosType != 'D');
    do
    costumerType = 'N';
    System.out.print("Wrong input please enter the Costumer Type c or r: ");
    cosTypeTemp = scan.nextLine();
    cosType = cosTypeTemp.charAt(0);
    while (cosType != 'c' || cosType != 'C' || cosType != 'd' || cosType != 'D');
    costumerType = cosType;
    System.out.print("Please enter the Number of basic service connections: ");
    System.out.print("Please enter the Costumer Type C or R: ");
    String cosTypeTemp = scan.nextLine();
    cosType = cosTypeTemp.charAt(0);
    while (cosType != 'c' || cosType != 'C' || cosType != 'd' || cosType != 'D');
    do
    costumerType = 'N';
    System.out.print("Wrong input please enter the Costumer Type c or r: ");
    cosTypeTemp = scan.nextLine();
    cosType = cosTypeTemp.charAt(0);
    while (cosType != 'c' || cosType != 'C' || cosType != 'd' || cosType != 'D');
    costumerType = cosType;
    System.out.print("Please enter the Number of basic service connections: ");
    numBsSrvConecs = scan.nextInt();
    when i enter the correct data ( c, C, d, D) it goes into infinite loop and never reaches the next keyboard scan for System.out.print("Please enter the Costumer Type C or R: ");

  • Help with date validation on input boxes.

    I need some help with date validation on input boxes.
    What I�m trying to create is a form where a user inputs dates and then the rest of the form calculates the other dates for them.
    i.e. � A user inputs 2 dates (A & B) and then a 3rd date which is 11 weeks before date B is calculated automatically.
    Is this possible and if so how do I do it ???
    Thanks

    Hi,
    to get third date try this:
    java.util.Date bDate = ...;
    Calendar yourCalendar = new GregorianCalendar();
    yourCalendar.setTime(bDate);
    yourCalendar.roll(Calendar.WEEK_OF_YEAR, -11);
    java.util.Date cDate = yourCalendar.getTime();Regards
    Ldinka

  • Validating user input in VC using javascript

    Hi All,
    I'm exploring possible solutions for validating user input and reporting error messages back to the screen for users to correct their entries. It was mentioned in one of the threads that this can be done using javascript..
    can the source code in VC be edited?? Can anyone give me pointers on how to achieve this and where to incorportate the javascript function for validation? Thanks!
    cheers
    Prachi

    Hi
    Please go through the following links :-
    Alpha-Numeric Validations
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/vc/norecordsreturnedshalldisplayalternatemessage&
    Cheers
    Navneet

  • Need help on validation of inputted text

    Hi there. I got the following script for the format of an inputted number (7 numeric char). If entered as "1", the format will be changed to "0000001". Now I want to get this effect: if entered as "f1", the format will be changed to "F000001". How can I modify the script to achieve that? Thanks.
    if (!(this.isNull)) {
    var tf = this.rawValue;
    if (tf < 1 ) {
    xfa.host.messageBox("The number must be a numeral starting from 1.","Incorrect Number",1);
    xfa.host.setFocus("TextField27"); }
    if (tf.length < 7) {
    var diff = 7 - tf.length;
    for (var i=0;i < diff;i++) {
    tf = "0" + tf;}
    this.rawValue = tf;}
    var regExp = /\d{7}/;//}
    if (!(regExp.test(tf))) {
    xfa.host.messageBox("The number must be in the format of 9999999.","Validation",1);
    this.rawValue = "";
    xfa.host.setFocus("TextField27");}}

    How about this, where TextField27 has a max length of 7?
    if (!(this.isNull)) {
              var str = this.rawValue;
              var regExp = /\D/;
              if (regExp.test(str)) {
        xfa.host.messageBox("...must contain numbers only.");
              else {
        var diff = 6 - str.length;
        for (var i=0; i < diff; i++) {
          str = "0" + str;
        this.rawValue = "f" + str;
    Steve

  • How do I let a backgroundpicture appear in textfield input with Spry warning colors?!

    DreamWeaver CS4
    Hi,
    I have a background-image-slice behind my Text Field inputs on a form, but after I applied Spry validation I don't see the  Spry color changes that you normally see when you forget to fill in something in the Text Field inputs.
    The text warnings appear like always. When I remove the background slice from the Text Field inputs all works normal and the warning colors are back again.
    I've tried to stick in the background-image-slice in one of the Spry selectors but no luck.
    All suggestion are welcome!

    The reason that the background image overrides the Spry background colours is that resform.css comes after SpryValidationTextarea.css and SpryValidationTextField.css.
    If you place the link to the latter two after the first named, the overriding will be in the reverse order as in
    #textarea {
       background-image: url(../images/Text_area_slice.jpg);
        background-repeat: repeat-x;
        background-position: left top;
        border-top-width: 2px;
        border-right-width: 2px;
        border-bottom-width: 2px;
        border-left-width: 2px;
        border-top-style: solid;
        border-right-style: solid;
        border-bottom-style: solid;
        border-left-style: solid;
        border-top-color: #999;
        border-right-color: #FFF;
        border-bottom-color: #FFF;
        border-left-color: #999;
    will be overridden by
    .textareaFocusState textarea, textarea.textareaFocusState {
        background-color:#FFFFCC;
    when in the focus state.
    Hence the naming of the style sheets as Cascading where the last called style has precedence over earlier called styles.
    Opa

  • Validating xml input against schema's registered in database

    Hi,
    We have an application that stores a massive XSD document (with cyclical references between schemas) in a VARCHAR2 column of a table. The XSD is loaded everytime an xml input needs to be parsed. The problem is that the XSD is very huge, and maintaining it is going to be a problem as it continues to grow. I don't beleieve this is the most efficient way of doing this.
    What I would like to do is to register each of the schemas that are part of the large XSD and use the <include schemaLocation/> directive. I have seen tutorials for doing this. Example tutorial at this link:
    http://www.cs.utah.edu/classes/cs5530/oracle/doc/B10501_01/appdev.920/a96620/xdb05obj.htm
    My sole purpose for registering the XSD's is to validate any xml input that is passed in as input to my Java program that is running in the database; I don't want to store the input xml in a table. If the input is successfully validated, my program will continue processing.
    I have seen some Java OTN tutorials which have methods with 2 parameters - xml, and xsd. I want to avoid this approach because in my case, the XSD would already be registered in the database.
    Any tips would be very much appreciated.
    Cheers,
    Rudi

    AN XML Document may be validated with schema registered in database.
    http://download-west.oracle.com/docs/cd/B14117_01/appdev.101/b10790/xdb08tra.htm#sthref843

  • How to avoid validation of input items within af table and javascript

    Hi all,
    I developed a form which includes table and commandButton. Some input items are required. I want them to validate while just button pressed.
    And everything was ok, this scenario was working well. But when table presents only one row, selecting row does not work. See alsa plz: Table row selection --> might be 9th post
    I applied to my jsff the solution which is told in above link. It works previous issue but this time, javascript caused another problem that is inconsistent validation. As i understood java script overrides af table immediate="true" property. plz see : http://www4.picturepush.com/photo/a/11897217/640/11897217.png
    How can i resolve that? Any suggestion?
    Plz help me
    Thanks in advance
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
    xmlns:trh="http://myfaces.apache.org/trinidad/html"
    xmlns:f="http://java.sun.com/jsf/core">
    <trh:script>
    function tableLoad(event)
    AdfCustomEvent.queue(event.getSource(), "refreshTables",
    true);
    event.cancel();
    </trh:script>
    <af:table var="row" rowBandingInterval="1" id="entityT"
    value="#{pageFlowScope.incomingPaperworkBean.baseRowCollection}"
    partialTriggers="::cb_incPaperDef_commit ::cb_incPaperDef_filter"
    rowSelection="single" columnBandingInterval="0"
    disableColumnReordering="true" columnStretching="column:c3"
    styleClass="AFStretchWidth" autoHeightRows="20"
    contentDelivery="immediate" immediate="true"
    binding="#{pageFlowScope.incomingPaperworkBean.richTable}">
    <af:clientListener method="tableLoad" type="click"/>
    <af:serverListener type="refreshTables"
    method="#{pageFlowScope.incomingPaperworkBean.refreshTables}"/>
    <af:column id="c5" width="105">
    <af:inputText id="registrationText"
    value="#{row.baseEntity.registrationNumber.registrationNumber}"
    required="true" readOnly="true" autoSubmit="true"
    disabled="true"/>
    <f:facet name="header">
    <af:panelGroupLayout id="panelGroupLayout1" layout="vertical">
    <af:inputText id="filterRegistrationNumber"
    value="#{pageFlowScope.incomingPaperworkBean.filterTemplate.incomingPaperwork.registrationNumber.registrationNumber}"
    simple="true" autoSubmit="true"/>
    <af:spacer width="10" height="10" id="spacer1"/>
    <af:outputText value="Kayit Numarasi" id="outputText6"/>
    </af:panelGroupLayout>
    </f:facet>
    </af:column>
    Edited by: webyildirim on 07.Oca.2013 06:08

    I guess you want the table header skin selector listing. [http://download.oracle.com/docs/cd/E15523_01/apirefs.1111/e15862/toc.htm|http://download.oracle.com/docs/cd/E15523_01/apirefs.1111/e15862/toc.htm]
    search on af:table
    I only see one mention of a table header though, so maybe this is the problem.
    Have you looked at the html that is output (with Firebug) perhaps and seen what sort of style classes are associated with your table component? in 11g it seems that there are more human-readable style classes that you can guess at by looking at the html source.
    Good luck

  • Validation in input template

    I need a validation message that when user send the invalid charectore as value to database invalid charectors thru send function a warning message is given that invalid values such as 'ABCD' charecter cannot be send.
    Currently when invalid charecters are entered and send to server a message comes that all data is send, (even though invalid charecters are not really send).
    How to ensure a warning message is given when invalid charecers are send to database.
    Appreciate inputs.
    Regards,

    Hello,
    have you considered to archive this at Excel level by validating of entered values?
    You can set up validation rules so that end-users will be able to enter number only. This will prevent them entering any letters.
    Here is one example
    http://www.techonthenet.com/excel/cells/validation2.php
    You can choose Decimal in between -99999999999999999 to 99999999999999 with error message "The value you've entered is not numeric".
    The problem I see here is that if your EVDRE is dynamic the validation rules should be re-applied on expand. It seems I managed to overcome this by doing the following:
    -name the range where data is displayed as for example "Data"
    -apply Data Validation to the named range ("Data")
    This does the following: when EVDRE is re-expanded the "Data" range is dynamically changed. Data Validation is still applied only to the "Data" range.
    I tested this in Excel 2007. Must be tested on 2003. Presume it works well on 2010.
    I hope it helps.
    Kind Regards,
    Kirill Gromyko
    SAP BPC Support Team

  • Date Validator in Input Processor

    Hi, I would like to validate a date in a Input Processor, but I don't find a validator
    like "STRING_VALIDTOR", "EMAIL_VALIDATOR" or "PHONE_VALIDATOR", etc...
    Does any one have any idea.
    Thanks Ben.

    Hi
    I dont think this is available out of the box, but it is pretty easy to write
    your own
    check the samples(a custom validator is included)
    You can also use regular expressions (a regex validator does ship out of the box).
    search the net for a regex that represents a date.
    (e.g. http://www.regxlib.com/REDetails.aspx?regexp_id=369)
    I think in portal 4.0 the regex classes were missing, dunno if this has been
    fixed in later versions
    regards
    deepak
    "Ben" <[email protected]> wrote:
    >
    Hi, I would like to validate a date in a Input Processor, but I don't
    find a validator
    like "STRING_VALIDTOR", "EMAIL_VALIDATOR" or "PHONE_VALIDATOR", etc...
    Does any one have any idea.
    Thanks Ben.

  • Validating Data Input

    I am trying to create a box where we need to type a specific format before going on to the next box. If a user inputs the wrong information I want an error message to appear informing they must correct it and click on ok and stay in that same box - not move to the next one. In the designer object section under value tab I put the validation pattern as 99AAA999. What am I missing? I want the cursor to stay in the same box if the information is wrong.

    well i think i am close but i can't figure out why i have an endless loop or how to fix it
    System.out.print("Please enter the Costumer Type C or R: ");
    String cosTypeTemp = scan.nextLine();
    cosType = cosTypeTemp.charAt(0);
    while (cosType != 'c' || cosType != 'C' || cosType != 'd' || cosType != 'D');
    do
    costumerType = 'N';
    System.out.print("Wrong input please enter the Costumer Type c or r: ");
    cosTypeTemp = scan.nextLine();
    cosType = cosTypeTemp.charAt(0);
    while (cosType != 'c' || cosType != 'C' || cosType != 'd' || cosType != 'D');
    costumerType = cosType;
    System.out.print("Please enter the Number of basic service connections: ");
    System.out.print("Please enter the Costumer Type C or R: ");
    String cosTypeTemp = scan.nextLine();
    cosType = cosTypeTemp.charAt(0);
    while (cosType != 'c' || cosType != 'C' || cosType != 'd' || cosType != 'D');
    do
    costumerType = 'N';
    System.out.print("Wrong input please enter the Costumer Type c or r: ");
    cosTypeTemp = scan.nextLine();
    cosType = cosTypeTemp.charAt(0);
    while (cosType != 'c' || cosType != 'C' || cosType != 'd' || cosType != 'D');
    costumerType = cosType;
    System.out.print("Please enter the Number of basic service connections: ");
    numBsSrvConecs = scan.nextInt();
    when i enter the correct data ( c, C, d, D) it goes into infinite loop and never reaches the next keyboard scan for System.out.print("Please enter the Costumer Type C or R: ");

  • Validating the input screen

    How to validate the input screen as like the web page screen
    Example:
      If we are giving the integers in place of characters then it should throw the error like “please use the character fields”. The validation should occur, On spot.
    Only after this validation, the cursor should go to the next input field.

    Hi,
    If you are giving integers, then there might be possiblity that it may be a character.
    For ex., if you giving 1 in character,eventhough it is integer it can be a character also.So you cannot validate it.
    But if you want to restrict numbers,then you can use the following.But it will work only if you press enter or execute button.
    parameters : p_c1(4) type c modif id z1,
                 p_i type i.
    at selection-screen on p_c1.
    if p_c1 ca '0123456789'.
    message i000.
    endif.
    Kindly reward points by clicking the star on the left of reply,if it helps.

Maybe you are looking for

  • Claim Digger Report

    When viewing the report produced by Claim Digger, under the heading bold "General Realtionship Differences" bold, the report shows a Predecessor Activity Name and a Successor Activity Name. Is the report referring to each activity being related to ea

  • Blog post: Embedded Software: Disruptions Ahead - Why Java makes sense

    All, You may be interested in this blog post I did two days ago, which talks about the challenges in embedded software design and why Java makes sense for embedded software engineering: https://terrencebarr.wordpress.com/2013/08/05/embedded-software-

  • Is the woofer in my MBP 17" broken? Help me test it !

    I have an early 2009 Macbook Pro 17". I had so far been using just the internal speakers for sound. Recently I plugged in a pair of $20 earbud phones and discovered how much I've been missing from the music! Using the earbuds, I can hear bass element

  • Add a field on screen

    Hi,    I have to add a field to a standard screen for transaction ie02 under general tab can this be done. Regards,

  • Number of Rows...  weird behaviour

    Hi Gurus, I'm on Oracle9i Release 9.2.0.1.0. I have the following query, that returns me the row numbers. SELECT ROWNUM rowno FROM DUAL CONNECT BY LEVEL <= 10; What I observed is the query returns just a single row when run in sqlplus, (irrespective