-
1. Re: rich:message and validation error string
j-pro Oct 29, 2007 2:36 PM (in response to arielfernando)You need to edit validatorMessages.properties file, placed in %JBOSS_HOME%\server\default\conf dir (I assume you're using JBoss). In my case if there is such error, message just shows: "Value is required." For that I have in validatorMessages.properties:
javax.faces.component.UIInput.REQUIRED=Value is required.
I'm sure, you'll find some more interesting messages and methods in this file ;) -
2. Re: rich:message and validation error string
arielfernando Oct 29, 2007 2:58 PM (in response to arielfernando)Thanks J-Pro!!!.
I'm using Apache Tomcat, but now I'll investigated if there is something like "validatorMessages.properties". -
3. Re: rich:message and validation error string
j-pro Oct 29, 2007 3:24 PM (in response to arielfernando)By the way, I've found interesting if validation messages will be as tooltips, but after I've made as you:
<h:panelGroup> <h:inputText id="employeeFirstNameEdit" required="true" value="#{amBean.employee.lastName}"/> <rich:message for="employeeFirstNameEdit" tooltip="true"> <f:facet name="passedMarker"> <h:graphicImage value="images/valid_ok.gif" /> </f:facet> <f:facet name="errorMarker"> <h:graphicImage value="/images/valid_err.gif" /> </f:facet> </rich:message> </h:panelGroup>
I have no changes on my page... messages are shown just as it was before, with simple "<rich:message for="employeeFirstNameEdit"/>" - without tooltips and without any pictures(I've made it of course).
But in HTML source I see all that as:<td> <input type="text" value="" name="employeeTab_editForm:employeeFirstNameEdit" id="employeeTab_editForm:employeeFirstNameEdit"> <span class="rich-message" id="employeeTab_editForm:j_id56"> <span class="rich-message-marker"> <img src="/HRD/images/valid_err.gif"> </span> <span title="Value is required." class="rich-message-label"> Value is requ?????ired. </span> </span> </td>
Do you have it working right? -
4. Re: rich:message and validation error string
arielfernando Oct 29, 2007 4:32 PM (in response to arielfernando)Mmm... you 're right, tooltip doesn't work. I'm getting same behavor with tooltip="true" than tooltip="false"...
I try it days ago and forget remove this from my code!!! :P -
5. Re: rich:message and validation error string
ilya_shaikovsky Oct 30, 2007 7:01 AM (in response to arielfernando)To the first post - showDetail = false should remove detailed description from message.
-
6. Re: rich:message and validation error string
arielfernando Oct 30, 2007 9:27 AM (in response to arielfernando)Hi ilya,
If I set to false showDetail at message tag, I get an empty message. I want only remove string "Validation Error:" from "Password: Validation Error: Value is required.".
Or...redefine full string... -
7. Re: rich:message and validation error string
dmitry.demyankov Oct 30, 2007 9:30 AM (in response to arielfernando)"arielfernando" wrote:
...redefine full string...
Use requiredMessage attribute of h:inputText -
8. Re: rich:message and validation error string
syvalta Nov 16, 2007 4:13 AM (in response to arielfernando)rich:message seems to prepend the label (or id if label is not defined) of the component it is printed for to the message outputted. Can this be prevented somehow? In my case it's clear from the positioning to which component the error relates to, so the label is not needed.