On my application I have an xp:inputText control with the disabled property set to true and the required property computed as followed:
<xp:inputText
id="txtSecurityLevel"
styleClass="form-control-static"
value="#{employeeBean.employee.securityLvl}"
disabled="true"
>
<xp:this.validators>
<xp:validateRequired
message="Unsufficient level of security">
</xp:validateRequired>
</xp:this.validators>
<xp:this.required><![CDATA[#{javascript:return submittedBy("btnProceed")}]]></xp:this.required>
</xp:inputText>
The value of the field is pre-populated and I do not want users to alter the value.
When I use the same approach for other inputText controls but with the disabled property set to false the validation is initiated for these fields.
Is there another approach I should use?