Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Temporarily ignore validations on oj-input-date

ZacDNov 10 2021

Hello,
Using JET 9.2.0 here. We have a scenario where we are intercepting a user keyboard event. We want to set the focus on an oj-input-date and also set the initial value to the key that the user pressed. The problem I'm seeing is that the single character value does not constitute a valid date, so an oj.ConverterError exception is getting thrown. This also causes the UI to display an error message to the user.
image.pngIs there any way that I can programmatically set the value of a JET component without it triggering the validations? Or possibly some way I can clear the error messages? I tried using reset(), but it just caused the error to get thrown again, as the value was still not valid.
Here's what I'm doing in the JavaScript right now, for reference:

this.eInput.focus();
try {
    this.eInput.setProperty('value', this.value); //throws oj.ConverterError
} catch (e) {
    console.warn(e);
    //this.eInput.reset(); //throws oj.ConverterError again if uncommented
}

Comments

Post Details

Added on Nov 10 2021
9 comments
158 views