Validation required according to select choice

Hello

I have a selectOneChoice and two input text. The requirement of validation for the two texts of entry is that if the value of selectOneChoice is N, then one of two text entry have a value.

I wrote and directed the bean validator method and plug the two texts of entry: validator = "#{pageFlowScope.bankAccount.validateOtherBank} '"

The problem is that when you submit the form, the validator is not called. I guess that's because the two text input values are empty.

How do you validate one of the two text entry are not empty according to the value of the selectOneChoice?

Thank you

JDev 11.1.2.4

Yes, this way you are sure that the validation is performed and that you don't have to worry about the order in which the fields are defined.

Tags: Java

Similar Questions

  • Validation required after a selection on Dblink

    Hello
    whenever I'm getting query select fires on a dblink, even if the transaction is completed and all the lines are read, I wonder commit / rollback of the tool. I need to know that it's fine for any tool, but what happens to the session if the same is launched by a point of view.

    I mean, I select a view but that the internal view triggers a query on dblink, in this case only the session remains open or it will be closed by oracle?

    Thank you.

    http://docs.Oracle.com/CD/B28359_01/server.111/b28310/ds_appdev002.htm

  • Bypass Validation required field required in dynamic form PDF

    I faced a difficult situation, where some fields are required, but we need allow the rule of validation (required) required bypass when you save the form and require to fill in these fields when you submit the form. In other words, to allow a flexible control when to enable / disable this feature.

    I wanted to put in place a flexible solution, and I will post my findings here. Appreciate your comments to improve.

    Steps to follow:

    1. mark the fields returned as required.

    2 specify 'Empty Message' as "this field can not be empty", or similar.

    3. specify the "Message of Script Validation" as 'this field must have a correct value before submitting', or similar.

    4. create a Global Variable-level form something like 'StopTotalValidation' and '1' as the default means default, turn off Validation for some cases.

    5. for areas that require this type of control, add the script (to be defined later) on the event to "validate":

    myTools.validateForRequiredField (the);

    6. create a Script object "myTools" and add the following script:

    function initStringFunc() { }

    Call this function to initialize Document

    String.prototype.Trim = function() {}

    return this.replace(/^\s+|\s+$/g,"");

    }

    String.prototype.LTrim = function() {}

    Return this.replace (/ ^-s+ /,' ");

    }

    String.prototype.RTrim = function() {}

    Return this.replace (/------s+$/,' ");

    }

    String.prototype.isEmpty = function() {}

    return (this == null) || "This.Trim ( == );"

    }

    }

    function setNodeProperty (, of theNode Dubien newValue) { }

    if (theNode [property] ! = newValue) {

    theNode [property] = newValue;

    }

    }

    function isNodePropertyEmpty (theNode, property) { }

        var result;

        if (theNode == null || theNode [theProperty] == null) {

            result = true;

        } else {

    result = theNode [theProperty] .isEmpty ();

        }

    returns the result;

    }

    function disableTotalValidation() { }

    StopTotalValidation.value = '1';

    }

    function enableTotalValidation() { }

    StopTotalValidation.value = '0';

    }

    function isTotalValidationOn() { }

    back StopTotalValidation.value ! = '1';

    }

    function isTotalValidationOff() { }

    back StopTotalValidation.value == '1';

    }

    const conRequired = '(mandatory)';

    function validateForRequiredField (theFld) { }

        //

    / / Bypass required field Validation when the overall Validation is OFF.

        //

        var result = false ;

        if (theFld) { }

    If (theFld.mandatory & & theFld.mandatory == "error") { }

    If (myTools.isNodePropertyEmpty (theFld, "rawValue")) { }

    myTools.setNodeProperty (theFld, "rawValue" conRequired);

                }

    If (isTotalValidationOn()) { }

    If (isNodePropertyEmpty (theFld, "rawValue") | ) theFld.rawValue.toLowerCase) == conRequired.toLowerCase ()) {

                        result = false;

                    } else {

                        result = true;

                    }

                } else {

                    result = true;             

                }

            }

        } else {

            result = false;

        }

    returns the result;

    }

    7. now click on the button 'save' call the function "disableTotalValidation()" and click on the button 'submit' call the function "enableTotalValidation()".

    I just finished the implementation of the solution above, and according to my initial tests, it works fine.

    I'll post this to my Google Docs workspaceand provide updates their.

    T arek.

    Hi Niall,

    In fact, it is not that some require and some do not need validation...!

    The fact is that fields that are 'Required' rule ignored should only and only if the form is "saved" from the Save"" button.

    The 'Required' rule should be triggered only and only the user is clicking on the submit"" button.

    I think I can make use of your approach. The only problem I see now is how to mark the item of of these fields with the details the user of LiveCycle Desinger interface requires? This means, I have to call a script on the initialize event of these areas, which is more work and more confusing for other developers. As I use a non-standard feature of the interface user Desinger.

    In my case, I added a simple invocation of the event 'validate' to a common function for all areas that need to follow this simple rule "bypass validation required...". »

    But, I really like your solution. In fact, I understand what you're doing, but now the following questions are triggered:

    1. What is the meaning of three time equal (=) in the statement of JavaScript "if"?

    2 I need more information on the use of methods 'createNode()' and 'namedItem().

    Tarek.

  • How can I prevent validation required to control when I demand it?

    < af:inputText label = "" ref: " id ="it1" required ="true"autoSubmit ="false"showRequired ="true"requiredMessageDetail ="Order number is required for the client to information"binding =" #{w9manageBean.propOrderNumber} "/ >"

    < af:commandButton id = "cb1" actionListener = "#{w9manageBean.getCustInfo}" text = "Read customer information" / > "

    "< af:inputText label =" "UPC:" id = "it2" binding = "#{w9manageBean.upcInp}" autoSubmit = "true" required = "true" / >



    There are two areas of (it1 and it2) input with validation required to true. But hit a button (cb1) validation of the pop inputbox up.i want not one of the control's validation (it2) be called on this button (cb1).


    How can I prevent this?

    I use jdev 11.1.1.5.0

    Published by: AdfeeeZy_941794 on January 22, 2013 05:20

    Published by: AdfeeeZy_941794 on January 22, 2013 05:20

    You can use the subform

    
    
    
      
        
          
            
              
                
              
              
            
          
          
            
          
        
      
    
    

    See also: http://www.oracle.com/technetwork/developer-tools/adf/learnmore/40-ppr-subform-169182.pdf

    Published by: Mohammad Jabr on January 22, 2013 15:37

  • Filtering table using Multi Select choice

    Hello gurus,

    I want to filter a table column that is inspired by LOV using list Multi choice to select the filter option.

    Can I filter the table by using the only choice by following below tutorial in the ADF Code corner:

    016 how to customize the filter ADF Faces Table

    Someone can provide any link or guide to implement Multi Select choice filtering list in the tables.


    Thank you
    Buxant

    Hello

    will tomorrow publish sample 98 ADF Code corner: http://www.oracle.com/technetwork/developer-tools/adf/learnmore/index-101235.html#CodeCornerSamples

    Frank

  • "You are now in review Mode. Any selected choice will not be tracked"message is displayed in read mode

    HI -.

    I hope someone can help me with this. Whenever I create a project to capture 6 (or a virtual classroom recording in Adobe Connect) and we publish the material and make it available to our viewers in to connect, a message at the top saying "you are now in review Mode. Any selected choice will not be tracked. »

    We called Adobe several times without success as they say it is normal, but I watched the other videos to record Captivate and virtual classes from other companies and the "révision Mode" message does not appear during playback. It's very confusing to our viewers because they are worried, responses to the built-in quiz will not count and "do not track" the message says.

    Everyone knows this? I think it's a problem with a connection setting because when I look at the video of my content in Connect, reading seems functional and the message does not appear. When wrap us a course around the content and make it available to customer in the training catalog, the message appears.

    Review mode.png

    The message in review mode when someone interacted with the course and to be successful there is no predefined number of times. Then, when they consider it after one of these conditions is met, they will see the message in review mode, because Connect is followed is no longer their access, as it is useless. The course essentially becomes a resource for them until the date of its closure.

    Thus the viewer / learner has met one of these two conditions or credentials are shared (against EULA). If you don't need specific follow-up user, then let the presentation in the form of a content item, and no one will not see this message. If an individual is to see this message, and they do not know why, look at the reports for this person and see where their status is for this course.

  • Select a choice options according to a choice of a select

    I need an example or a tutorial how to set the values of 'select one choice', according to another select a 'choice selected value. "

    check these:
    http://blogs.Oracle.com/Shay/2010/10/got_to_love_cascading_lovs_in.html

    http://www.YouTube.com/watch?v=nXwL2_RP7AQ&feature=related

    http://download.Oracle.com/otn_hosted_doc/JDeveloper/11gdemos/ADF_Insider_Essentials/DependentLOV/DependentLOV.html

  • Checkbox validation based on the selection of the values LOV

    I'm trying to validate a checkbox custom on the opportunity page, based on the selection of the values LOV.

    For example only when the user selects 'rating = A', the box should be able to select and save.

    If the user selects other that 'A' in the field assessment, the box should not save.

    or

    Is it possible to do, the READ ONLY checkbox, enable only when the side 'A' is selected.

    Any thoughts / help on this.

    Thank you, Kumar

    Edited by: user10833334 may 4, 2010 06:43

    There is no function to make a read-only field based on the contents of another field, it is not an option. I will list my thoughts on how you might handle this below.

    -Option 1: I recommend that you use validation to manage it. I don't know exactly to your needs, but you could write a field validation that checks to see if the flag is checked and rating <>has and sends an error message to the user, if it is not. The user would not be able to save the file until it Unchecks the box or sets the side = A.
    Advantages: User gets a message explaining the problem with the data and is forced to fix it before you save it.
    Cons: Requires interaction from the user to save and if they do not pay attention, the data may be lost if they cancelled without saving the changes.

    -Option 2: Another option would be to use the workflow to validate the registration. In this scenario, you can create a workflow that determines whether the field is out of adjustment, and if it is not correctly set, the workflow would update the box accordingly. In this scenario, you would use the 'Actions if Condition is False' also to inform the user that the flag cannot be controlled unless the side =. Then, you must set the Action "Update the values" update the uncontrolled field.
    Pros: Manages the work without user interaction.
    Cons: The con in this case, is that there is no workflow 'Before NEW record saved' trigger, so it is likely that the user sets the value incorrectly when creating the folder and it would stay like that until they update the record again.

    Some people might argue that there is another option that uses the functionality of dynamic page layout to make the field read-only, but this isn't a good option. You would need to convert using the Type of the opportunity in a way that would make use of the possibilities of lourdes for your users and I mention it only to you recommend to avoid his review completely.

    Good luck and let me know if you have any questions.
    Thom

  • Validation between two list selection.

    I would like to validate two selection list. What I want to do is when one of the selection list is 'ATR', the selection on the other list, it must be "N/a". I'm sure you'll tell me I should use in waterfall lov parent, but the problem is that I already associated with one of them another selection list. I know that I can associate it with more than one, but it does not work. The data model allows it and change it, it will give me a lot of changes throughout the application. That's why I'm looking for another way to validate two selection list.

    Thank you, Bernardo.

    Hello
    I think you can also do with a validation step! In any case, it should be of type function from PL/SQL to return a Boolean.
    Validation write an expression something like that according to your needs:

    IF :P1_LIST1 = 'ATR' AND :P1_LIST2 = 'N/A' THEN
    RETURN TRUE;
    ELSE
    RETURN FALSE;
    END IF;

    Regards Garry

  • JSF 2: dynamic validation required for different buttons?

    Hello

    I'm currently learning on jsf 2.0 book of jsf 2.0 core + glassfish + cdi.

    I have a question about the functionality of the JSF validation.

    Let's say I have a very simple connection request that has a very simple as layout:

    user name: (entry field for the user name - help needed = 'true')
    password: (password entry secret - help needed = 'true')
    loginButton + registerButton (to aid immediate = "true") + checkUserIdAvailabilityButton

    Now, let's say the loginButton is pressed and the username and password are left blank, validation error occur in both fields, and who works as a what I wanted.

    And when the registerButton is pressed, he doesn't care if the user name or password is filled by the user, since it is using immediate = "true", thus bypassing the validation and the order is fulfilled the request value phase apply, and which still works like what I wanted.

    And here is my problem... When you press the checkUserIdAvailabilityButton, I expect only the user ID to be filled and I don't have to worry about whether or not the password field is filled, but the password field will return the error saying that it is a required field.

    Is in any way to solve this kind of problem? I know that this could be an application very simple, but in my workplace, I think they design a lot of screens like this, as the record button with required with different refresh fields button but the buttons are on the same page.

    Thank you!

    do not use the property required, but instead, make the vacuum check server-side in your action methods. Total flexibility, as you want to in this case. It may require a few minutes more striking, however, you may not have everything.

    Making of the postings in the view isn't my cup of tea I consider that it makes sense on the server side and so I like to have it in my beans to support where it is visible to everyone, including my unit tests. But that's my personal opinion.

  • Creation of Validation for the multiple selection list or shuttle point

    Hello
    I'm new to APEX and have questions about the best way to validate the selected shuttle items to verify that they exist in the sys.dba_roles table before submitting. The shuttle point uses a static LOV. I would like to than the error message to display when there is no such thing as a role selected in the element of the shuttle in the sys.dba_roles table.

    Using version 3.2 of APEX
    DB version 9.2.0.8.0
    Internet Explorer version 6

    I tried to create a validation step level about to shuttle P3_ROLE using SQL EXISTS when you press the button SUBMIT. I know that when argued that the shuttle point returns the selected values in a single string delimited by a colon. I use the APEX_UTIL. STRING_TO_TABLE to convert values selected in a table.

    CODE HERE
    declare
    l_selected APEX_APPLICATION_GLOBAL. VC_ARR2;
    number of l_num;
    Start
    l_selected: = APEX_UTIL. STRING_TO_TABLE(:P3_ROLE);
    BECAUSE me IN 1.l_selected. COUNTY
    LOOP
    Select 1 from l_num of sys.dba_roles where role = l_selected (i);
    END LOOP;
    end;

    This is the error ORA-00928: lack of SELECT keyword
    1006 - ERR error in the validation routine.

    Any advice? Thoughts? Thank you.

    Published by: Violet on Oct 14, 2010 14:50

    Hello

    Your code is PL/SQL block. You cannot use this type of validation with your code.

    Try to change the body type of the function that returns the error text and
    code for this one

    DECLARE
      l_selected APEX_APPLICATION_GLOBAL.VC_ARR2;
      l_num NUMBER;
    BEGIN
      l_selected := APEX_UTIL.STRING_TO_TABLE(:P3_ROLE);
      FOR iIN 1..l_selected.COUNT
      LOOP
        SELECT count(1) INTO l_num FROM sys.dba_roles WHERE role = l_selected(i);
        IF l_num = 0 THEN
          RETURN 'Role not exists';
        END IF;
      END LOOP;
      RETURN NULL;
    END;
    

    Kind regards
    Jari

  • Help at the waterfall "select choice".

    Hello
    I tried to create a JSF page with 2 commands 'Select one choice' A and B. The contents of the control B depend on the selection made on the control. So far what I have is control B displays the contents of the related data of the first element on the control, but if I change the selection on the control B does not change its content.

    What are the steps to create a pair controls 'Select' cascading in a JSF page?

    Command has must indicate the attribute X table X.2
    Control B to display the attribute table Y.2 Y
    Attribute X 1 is a primary key
    Y.3 attribute is a foreign key (of the X.1 attribute)
    Y.1 attribute is a primary key

    Can I use read only views?

    Thank you.

    Hello

    the steps are

    -define autosubmit = true on selectOneChoice 1
    -Have a ValueChangeListener who gets the selected value and who uses it to set the query for the dependent list condition
    -use AdfFaces.getCurrentInstance () .addPartialTarget () to update the first list

    For 10.1.3 I docmented in the document, you can download it here: http://thepeninsulasedge.com/frank_nimphius/wp-content/uploads/2008/05/OldAndLostBlogBusterTips.zip

    See pages 323 and 332

    Frank

  • Filing date validation required...

    Hi all
    "I have a date like: P3_EVENT_START_DATE = February 2, 2013.
    --------------------------------------
    I need to do Validations for the following scenario
    example of
    one): P3_EVENT_START_DATE = February 22, 2013 = > DD IF you add any number... he had to throw the error message...
    (b): P3_EVENT_START_DATE ='FEBd-02-2013' = > LUN if you add any tank need of validation.
    (c): P3_EVENT_START_DATE ='02 - FEB - 20135 "= > YYYY if you need to change the format of year for validation."

    Formate of should be DD-MON-YYYY... only...
    I need solution for the highest of the query, please help me on this...

    Hello

    create a validation of type 'Function returning a Boolean' and put something like

    DECLARE
       TEST date;
    BEGIN
       TEST := TO_DATE(:YOUR_ITEM, 'DD-MON-YYYY');
       RETURN TRUE;
    EXCEPTION WHEN OTHERS
    THEN RETURN FALSE;
    END;
    

    the expression of Validation 1.

    Enter your message in the "Error Message" box and that it should be.

    I hope this helps...

    Thank you
    Sandro

  • How to fill a dynamic array according to the choice of the Viewer

    Hello

    I came across a dead end on my page "events".

    There is a dynamic array, get the information from a database. Initially, it will display upcoming events.

    At this point, my question is this:

    * Can fill the dynamic table based on a condition where the current date and the date of the event (as in the comic book) will be compared and if the date of the event is aware of the date, it will appear in the table. Otherwise, it will not.

    If I can do it, can someone please help me with the code?

    In addition, on the right side of the page there are 3 options for the Viewer:

    1. display upcoming events

    2 discovered past events

    3 search for events by month and year

    What I want to do, is that when the viewer clicks on 'past events', the table will be reset and populated by these events, whose date is exceeded.

    When the viewer clicks on "upcoming events", the table is reset again and filled with the relevant events.

    When the viewer selects a month and a year, the database to find reviews of research.

    Can we write this in php? Since I read smwhere that php does not work with onclick functions... I got confused. Cuz in my table data should vary depending on what the Viewer is clicking (coming events/events/research past events). I do not want to create pages for each type of event.

    If anyone has a better suggestion to complete this task, please share!

    Thank you!

    > Can I complete the dynamic table based on a condition if the current date and the event date (as in the comic book)

    > will be compared and if the event date is later than the current date, it will appear in the table. Otherwise, it will not.

    Of course. Just compare the date field in your database with the current time as returned by the function of date of your DBMS. Assuming you are using MySQL, you would compare your column with the currdate() function and the appropriate use of upper / lower to operators in the WHERE clause. If you don't know what a WHERE clause is then I invite you to learn SQL as soon as possible. You can't build data sites without a basic knowledge of SQL.

    > Since I read smwhere that php does not work with onclick functions...

    This means that php is a server side, where interactions with the user always occur on the client's site. But that doesn't mean that you can't call action from the side event on the client side server. Certainly, you can and would be.

    You should consider adding links to the page of dynamic array passing a querystring to the php script that determine which filter to add in the future WHERE clause to the current date, less, etc..

    Also, in the future, please post those questions on the application development forum.

  • Visible field according to a choice of radio button

    Hi all

    I have this form where I have a group of yes/no radio buttons. I would like to a numeric field to appear only when users click Yes. When the form opens, or if users do not set it to Yes (not default) field should not appear.

    There is a min and max limit attached to this field, which should only kick in when the field (limits of should not be applied when the field is hidden).

    My questions are:

    Where should I put the condition visible/hidden? In the Group of radio button or on each subform condition yes/no? I tried both, so far, but it did not work.

    The script I've tried is (at the exit event of the Group of radio buttons):

    If (this.rawValue == 2) {}

    ... RightDetection.ChoixYesNo.DetectionDelay.presence = "visible".

    }

    else (this.rawValue == 1) {}

    ... RightDetection.ChoixYesNo.DetectionDelay.presence = "hidden".

    }

    The limit min/max used to work before, but since I started playing with this area, I now have an error on the first bracket. Could someone tell me why?

    The limit script is as follows:

    If (this.rawValue < 1)

    {

    xfa.host.messageBox ("specify at least 1 in this area", "Warning", 1, 0);

    xfa.host.setFocus (this);

    }

    If (this.rawValue > 365)

    {

    xfa.host.messageBox ("specify in most of the 365 in this area", "Warning", 1, 0);

    xfa.host.setFocus (this);

    }

    Thank you very much in advance for your help.

    Why not not just the value of the type field user entered - required

Maybe you are looking for

  • ENVY27: How to disable alt - gr + S to display information HP

    How do I avoid the shortcut alt - gr + S (or ctrl + alt + S) display HP support info? I need to restore its function of window 8 (Hebrew punctuation)

  • Weird button behavior

    Joined a very simple vi.  On the front panel are two buttons.  Each button appears to be identical; they have five parameters (0,1,2,3,4).  Using the property of text labels I have assigned values (0,2,4,8,16). If you try to move the first button, yo

  • The product key from a portable computer that is running Windows XP does work on any other version of Windows XP? (OEM or retail, etc.)

    original title: Windows XP Pro product keys Different versions of Windows X is made? That is to say) the product key from your laptop will work with "ANY" XP CD (OEM or other) I know that with Win 7 there no difference My wife has an XP laptop that n

  • How to disable an installation of Vista.

    I have a retail copy of Vista Ultimate.  I recently updated my computer and a clean installed a copy retail of Windows 7 Professional, then the copy of Vista is more installed on any computer.  I would like to give the copy of Vista to a friend, as w

  • New os for blackBerry Z30 10.2.1

    I can't download the latest OS on the BB site. I tried pc, bblink and the phone itself. Current operating system is 10.2.0.424. If I try to download the new OS 10.2.1 response is that I have the latest operating system. Keeps freezing on the screen o