jsf (richfaces) readonly input text validation

Alina Danila picture Alina Danila · Mar 8, 2012 · Viewed 7.3k times · Source

Is there any way I can validate a jsf input text that is readonly but the value is changed upon some other events triggered?

Answer

BalusC picture BalusC · May 3, 2012

Set the readonly attribute to true only during render response phase. This way it won't be seen as readonly in all other phases than the render response phase.

<h:inputText ... readonly="#{facesContext.currentPhaseId.ordinal eq 6}" />