This content has been marked as final. Show 6 replies
Always mention your JDev version and clear usecase.
What is the use in validating the value that cannot be entered by the user?
why do you want to validate a field that cannot be edited? Even if you set the value programmatically to the read-only field, the validator would not be invoked
The value of the text is selected basing on another popup dialog. So it is a disabled textbox. But we always need to validate the disabled textbox contains a value being selected from the popup dialog
I am wondering if you could create a transient attribute in the EO that displays the data from the attribute. The "real" attribute would not be disabled, and would then validate.
You then display the transient attribute on the form, and it would be non-update-able since it is transient.
You could then place entity level validation on the entity (instead of on the attribute) since it is based on a second value in your form. Haven't tested it, but it would seem to be a solution.
i see some contradiction here.. you say the inputText is disabled.. so the only way to populate the inputText using the programatic way.. in your case this is done by selecting the popup and the value gets populated in the inputText.. so you are sure that the value is populated from the popup always..
So why so u need a validation here? as there is no option for the user to alter the disabled inputText
I am facing same problem.
Validation is required because at commit time you don't know if inputText is filled. So you have to check it and request user to fill it (populate from popup).
You can check it at commit time but you cannot throw ValidatorException and show message to user.