I have an xhtml file, where i want to perform readOnly, but after rendering the value for the field is not set. similar issues like this exist on SO. look up links below Make a p:calendar readonly
I have tried all suggestions from these links here is my piece of code
<h:outputLabel id="vatDeductionLabel" for="vatDeduction" value="Suma ubezpieczenia"/>
<h:selectOneMenu id="vatDeduction" label="Suma ubezpieczenia" readonly="#{facesContext.currentPhaseId.ordinal eq 6}"
value="#{DfeOper062MBean.dataModel.dfeOper062DataModel.requestParameters.vatDeduction}">
</h:selectOneMenu>
now without readonly it works,but i need to set it to either disabled after rendering and setting value or read only. when i try the above code using either facesContext.currentPhaseId.ordinal eq 6 or facesContext.renderResponse.
i get the error in my log
Caused by: javax.el.PropertyNotFoundException: /pages/operations/dfeoper062/dfeOper062.xhtml @100,130 readonly="#{facesContext.currentPhaseId.ordinal eq 6}": The class 'com.sun.faces.context.FacesContextImpl' does not have the property 'currentPhaseId'.
Any suggestion as to how to handle this situation? thank you
POM jsf version
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-api</artifactId>
<version>1.2.15</version>
<scope>provided</scope>
</dependency>