I want to put an inputText inside a cellEditor using validateLongRange on primefaces like that:
<p:contextMenu for="dataTableAvaliacao" widgetVar="cMenu">
<p:menuitem value="Edit Cell" icon="ui-icon-search"
onclick="PF('cellNota').showCellEditor();return false;" />
<p:menuitem value="Hide Menu" icon="ui-icon-close"
onclick="PF('cMenu').hide()" />
</p:contextMenu>
<p:dataTable
id="dataTableAvaliacao" var="aluno"
value="#{alunoAvaliacaoMB.alunos}"
editable="true" editMode="cell"
widgetVar="cellNota">
<p:columns id="coluna-nota"
value="#{alunoAvaliacaoMB.colunasAvaliacoes}" var="avaliacao"
columnIndexVar="colIndex" >
<p:cellEditor>
<f:facet name="output">
<h:outputText
value="#{aluno.getNota(avaliacao.property).vlNotaString}" />
</f:facet>
<f:facet name="input">
<p:inputText id="inputNota"
value="#{aluno.getNota(avaliacao.property).vlNotaString}">
<f:validateLongRange maximum="10" minimum="-10" />
</p:inputText>
</f:facet>
</p:cellEditor>
</p:columns>
</p:dataTable>
The problem is when validation error occurs, primefaces is painting the inputText and the cellEditor, the appearance looks like that:
How to remove ui-state-error from gridcell? I have tried using jQuery: $('.ui-state-error').removeClass('ui-state-error') but I don't know where to put it.
I'm using sentinel-layout. http://primefaces.org/layouts/sentinel
Sorry for Portuguese words in pictures and code.
UPDATE
I can't change the CSS (apparently) because both inputText and cellgrid uses the same style generated by primefaces.
Below two images showing that.
First the style of inputText
Second the style of gridcell
How can I change CSS without affect both components? I'm still looking for a way to remove a class with jQuery. I can remove the style using jQuery.