I am using a One Shot Button to perform a calculation. There are several input fields, and I want the Calculate button to be enabled or disabled based on the user's input activity.
For example, if a user is entering a value in an input field, the Calculate button should remain disabled until the field loses focus (on blur).
Currently, my logic correctly disables the button while the user is editing a field. However, when I click the Calculate button, the calculation still executes, and the button becomes enabled. This appears to be a race condition between the field's blur event and the button's action execution.
Do you have any suggestions on how to achieve this?
The code was initially implemented in the onActionPerformed event, but it wasn't working as expected. I have now moved the logic to the onClick event. but No luck.
Calculate code is in custom method and I am calling that custom method On "On Click" or onActionPerformed event