Reputation: 273
I want to use p:growl for the validation of inputs of datatable row editing
but the problem is that the validation message is written twice on the p:growl
how can I replace the first by another text ("Error validation " or "Error conversion" for example) in the xhtml page (because this problem does not arise in the managed bean)
here is one of my columns :
<p:column headerText="Commission" filterBy="#{car.commission}" style="width:25%">
<p:cellEditor>
<f:facet name="output">
<h:outputText value="#{car.commission}" />
</f:facet>
<f:facet name="input">
<p:inputText value="#{car.commission}" label="Commission" requiredMessage="Veuillez saisir une valeur"
converterMessage="Veuillez saisir un nombre" validatorMessage="Veuillez saisir entre 0 et 100">
<f:validateDoubleRange minimum="0" maximum="100" />
</p:inputText>
</f:facet>
</p:cellEditor>
</p:column>
thank you in advance
Upvotes: 1
Views: 1467
Reputation: 20691
Depending on the specific message you wish to customize (you're not clear on this), you should edit the contents of the Messages.properties file in javax.faces
package of the jsf-api.jar that ships with your JSF2 bundle. I presume you wish to customize the converter summary and detail messages (based on your question history). To achieve this
Locate the javax.faces.converter.DoubleConverter.DOUBLE
and javax.faces.converter.DoubleConverter.DOUBLE detail
entries.
Depending on the local you're working with, edit the message entry for both keys and save the file
Upvotes: 1