ClientListener Vs Validator

Hi all

We have an application built using Jdev 11.1.2.4.0

The form has fields like phone with area code regional and phone number.

Currently, they wrote the client listener in these areas and the javascript for each country, they put the min and max length

Instead, I thought to use a validator to the field that could have the logic of min or max length setting in the bean.

Need your suggestions in order to understand if using clientlistener is better that the validator or vice versa and are there advantages or disadvantages using the validator.

Thank you

ASHA

Good thing about clientListener is that it will save you a server round-trip, so will provide you with a better user experience.

Most validators (use case for phone with area code phone number and regional) run on the side server, this means that you will need to send the data back to the server for validation to occur (autosubmit = 'true'). Who can make application look a little less sensitive data entry screens.

To resume:

Highlights of the validators:

-they are standard ADF

-large applications made on

-more powerful than a client listener.

ClientListeners:

-can improve the user experience.

-work from the point of view of the developer.

-less than the contract of validation: if javascript is disabled.

Actually, it would be nice to see this kind of validators (telephone with area code phone number for run and regional side customer)

Tags: Java

Similar Questions

  • Validation of required field only when the page loads (HR test case!) included

    Hi experts,


    Here you have a simple test for Jdev 12.1.3 HR case: https://dl.dropboxusercontent.com/u/18609389/TestHR.zip

    The main.jspx is just a button which CreateInsert a record dept displayed in another page:

    Screen Shot 10-16-14 at 07.04 PM.PNG

    My problem is the following page (test.jspx) has this code to run when the page loads:

    <af:serverListener type="onloadEvent" method="#{backingBeanScope.backinBean.onPageLoad}"/>
                <af:clientListener method="onLoadClient" type="load"/>
                <af:resource type="javascript">
                  function onLoadClient(event) {
                      AdfCustomEvent.queue(event.getSource(), "onloadEvent", 
                      {
                      },
    false);
                      return true;
                  }
                </af:resource>
    

    The code is simply this (now):

        public void onPageLoad(ClientEvent clientEvent) {
            logger.severe("HR TEST.....");
        }
    

    And that's the problem, required validation is performed.

    Screen Shot 10-16-14 at 07.06 PM.PNG

    Can you tell me why?

    Thank you

    Jose.

    Don't know what is my mistake, but the code is of the actionListener button is not called. :-(

    Well, you combined two different ways to do this (from my first answer).

    If you are still reading this, you will notice "or" before the second suggestion

    Thus,.

    1. keep your clientListener under af:document tag

    2. based on javascript, you find key (use: alert ("button");)  to see if you have referenced correctly your button in findComponentById())

    And then:

    approach 1:

    Use AdfActionEvent.queue (button, true);  queue event on your action button and implement your logic in function attached to the properties of your 'actionListener' or 'action' button (if you don't need listener server in this case)

    approach 2:

    Use AdfCustomEvent.queue (button, "onloadEvent", {}, false);  the queue onloadEvent on your button (in this case you need listener server attached to your button)

    Dario

  • Cancel the 'action' button after validation JavaScript

    Hello. I use JDev/ADF 12 c.

    I use JavaScript to validate elements of the ADF, when I click on an af:button. This button has a call to another page in the 'action' property.

    I need this 'action' runs only if the validation is good. If, for example, an inputText is empty, I need the button do not go to the other page (do not run 'action').

    If validation has said that there is incorrect data, I need the user to stay on the same page (even if I click on this button that "in theory", addressed me to another page).

    How can I do? How can I 'Cancel' the 'action' of the button?

    Sorry for my English. Thank you.

    Hello

    but it's the default behavior if you let validation of the frame instead of making your own js. If you have to use JS, add an af:clientListener the button then link the name of the method checkOperateOnValidationSuccess for example. The type must be 'action '. Looks like the JS function signature

    function checkOperateOnValidationSuccess (evt) {}

    make your posting here

    If the validation failed then evt.cancel ();

    }

    Frank

  • Rich Table: entity validation fails, but the user can change the record! : O

    Hello
    I develop with JDeveloper 11.1.2.1.0 and I have the following problem. I have a rich table editable according to entity/view with a line entity level validator method that checks the consistency of rank according to custom rules.
    I noticed that if the validator fails, the error message is displayed correctly, but it is possible to move to a different folder and this causes a lot of problems. I need avoid recording of variation when this validator fails. I know there is a way to block navigation on an element using clientListener and javascript, but it's a different need because I don't want the user to change the recording while the validator fails.
    How can I do?
    Thank you

    Roberto

    Roberto R SCC wrote:
    I noticed that if the validator fails, the error message is displayed correctly, but it is possible to move to a different folder and this causes a lot of problems. I need avoid recording of variation when this validator fails. I > know there is a way to block navigation on an element using clientListener and javascript, but it's a different need because I don't want the user to change the recording while the validator fails.
    How can I do?

    When you change a line, it is the currentRow on the iterator. You do not want any line to become the currentRow.
    I would go to this topic, in this way: substitute the selectionListener table and the listener to custom selection, check if the current currentRow (the one you are editing) isValid (EntityImpl::isValid).
    Proceed with the treatment of the selection event only if it is validated... You could even show an error or a warning message asking the user to provide valid data and even commit the line before choosing another.
    (Sorry, don't have an example of a code of practice now)

  • Validation af:inputFile

    I need to make a customer validation side for af:inputFile

    < af:inputFile label = "Select File" id = "if1.
    simple = "false" readOnly = "false".
    Disabled = "false".
    Binding = "#{ProcessFileUpload.file} '"
    valueChangeListener = "#{ProcessFileUpload.processUpload}" >

    < / af:inputFile >

    < af:commandButton text = 'Upload process"id ="cb1 ".
    actionListener = "#{ProcessFileUpload.fileUploadListener} '"
    Binding = "#{ProcessFileUpload.uploadButton}" >
    < af:clientListener method = "hideMessage" type = "action" / >
    < / af:commandButton >

    If the user selects no flie with the browse option, I need to give a message "Please select a file." Can I apply a validation of regexpression here?

    AdfPage.PAGE.findComponentByAbsoluteId ('pt1:if1').getValue() always returns null...)

    Thank you
    Bastien

    The the true value required property.

  • To update to OS Sierra, I need to enter a valid credit card, even if it's free?

    I have moved countries and not to use a credit card. To update to OS Sierra, I need to enter a valid credit card, even if it's free?
    What is happening with this? I'm more a person worthy enough to upgrade? I upset the bank accounts of the billionaires who benefit from knowing my account information?

    < re-titled by host >

    Create or use your Apple ID without a mode of payment - Apple Support

  • Feed not validating with iTunes more podcast

    My podcast feed is http://www.debozarko.com/feed/podcast/. It has been working well for the duration of my podcast from 2013.

    I have been using the Powerpress plugin from the beginning without any problem. For some reason, the iTunes store isn't picking up the my last episode (#110). The stream is valid on Feed Validator, but when I check it out in iTunes Connect, the status is "Validation Failed." This explains why it does not appear in the store, but I'm confused as to what could be wrong.

    I downloaded a record fresh and added the new download link on my blog twice, but still the same error.

    Any help is appreciated.

    The exact error in iTunes Connect is, "cannot read your feed. Bad http: 500 result code ".

    Curiously, it appears for the podcast subscribers well. I'm puzzled.

  • step 2 checking does not work for me, my iPhone is not valid.

    So I get my iPhones phone number, tap Next and then it just says: enter a valid number. What is this to say that I walked into my iPhone number 10 times, he always says to enter a valid phone number.  What is the next step.

    The answer is just to keep entering the same phone number again and again until it does not say "enter the valid number."

  • What is the apple warranty valid outside the country you have earned it?

    Hi, im interested in buying a macbook pro in England, but I would like to know if the warranty is valid in other countries although it is originally from the United Kingdom

    Apple - legal hardware warranty -.

    http://www.Apple.com/legal/warranty/

  • Unlocked IPhone, SIM card is not valid problem

    Hello

    I went to study in the United States for a few months and I bought the iPhone 6s 'apple Store' to the United States.

    After that I came back to Thailand, I can't use my card SIM Thai (AIS network). It appeared that the sim card is not valid.

    I had to call apple care to solve the problem for me and after gave them my IMEI, they told me to contact verizon wireless to unlock my phone.

    So far, I confused altogether since I bought the Apple Store iphone, not Verizon.

    However, I contacted verizon wireless and even once, after gave them my IMEI, they said that since

    the unit was purchased third-party (which is apple Store) so that the device has not been locked by their network.

    I tried to restore my device so many times and also with the mode of recovery, but it still can not use.

    I checked with APPLE and they said that my device is unlocked model.

    Note that first sim that I plug when I got this device is ATT SIM card.

    I was contacted to ATT and they also said that my device has not been locked

    through their network.

    Please give me suggestions on how to solve this problem

    It seems that if you have the iPhone version, intended for use on the Verizon network. If so, it is not locked. However, this does not mean that it will work on the network in your country.  Phones, designed to run on the Verizon network use strips of LTE 13, 4 and 2. It seems that the AIS uses 3 and 1.

    https://en.Wikipedia.org/wiki/List_of_LTE_networks

    https://en.Wikipedia.org/wiki/List_of_LTE_networks_in_Asia

  • How can I check the validity of an email allegedly from apple?

    received a "Bill" for the use of cloud, but kept such a thing. Through the ' Manage/Cancel' button it asks a series of questions that slap just impersonation. How can I check if its valid please?

    I doubt very seriously that it is legitimate to Apple. Do not click on links in the e-mail or enter information in any website referenced in the email.

    The following bandages may be useful:

    Apple claim that suspicious e-mails called for iTunes are reported to the iTunes customer service:

  • I have a late 2008 aluminium MacBook El Capitan 10.11.6 running. The cam to computer with 2 GB of ram and the instructions say there is a maximum of 4 GB. This ceiling is still valid or if I add 8 GB?

    I have a late 2008 aluminium MacBook El Capitan 10.11.6 running. The computer came with 2 GB of ram and the instructions say that there is a maximum of 4 GB. This ceiling is still valid or if I add 8 GB?

    Yes, your MacBook accepts two RAM sticks of 4 GB, 8 GB total, you'd better update the firmware Version MB51.007D.B03.

    y-13-non-pro-how-to-upgrade-ram.html http://www.EveryMac.com/systems/Apple/MacBook/MacBook-unibody-FAQ/MacBook-unibod

  • Why do I get the "error: no valid source could be found" message when you try to stream video live?

    I'm trying to stream live TV and this message - "error: no valid source could be found" I am on Fox Business website and the message appears in the Fox Business Watch box at the bottom right of the page. I use a MAC with the latest OS. I have another MAC at home and I am able to access streaming content. I can also access the content using Chrome.

    Apparently the old MAC that can stream video has Flash. The new MAC Mini did not have it and I didn't because of the negative things I've heard. Unfortunately, I need on the new computer and downloaded it reluctantly. Problem solved. Thanks for your reply.

  • IMPOSSIBLE TO UPDATE ALL APS, CONTINUES TO RECEIVE YOUR COMPENSATION ACCOUNT PAL IS NO LONGER VALID, GO TO THE ITUNES STORE ETC., WHICH I DID SEVERAL TIMES GRRRRRRRRRR 50MINUTES W APPLE ADVISOR - IT HAS JUST FACT, BUT LOSE THE SETTINGS ETC. ??

    IMPOSSIBLE TO UPDATE ALL APS, CONTINUES TO RECEIVE YOUR PAY PAL ACCOUNT IS NO LONGER VALID, GO TO THE ITUNES STORE ETC, WHAT I'VE DONE SO MANY TIMES

    50MINUTES W APPLE ADVISOR - SHE HASN'T DONE, BUT LOSE SOME SETTINGS ETC. ??

    PayPal requires that a credit card account is valid.

    Payment methods, you can use in the iTunes Store, App Store and iBooks Store - Apple Support

  • My account is not valid for use in the US store?

    I m currently living in the United States but I can not buy certain items in apple store, it's always say that "your account is not valid for use in the US store" (mine is Vietnamese store). Is there anyone know how to solve this problem. Thank you

    If you are currently in the United States, then you must have a credit card US, with an address of billing in the United States, and then you can change for the US store. Without it, you wouldn't be able to change.

Maybe you are looking for