Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within JSF
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
JSF
custom validator error message
sa sam
Ranch Hand
Posts: 46
posted 13 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I am using ifaces in my application.
How can I remove '.' (dot) from error message.
i.e. "
.
Invalid User"
Vadym Baranenko
Greenhorn
Posts: 18
posted 13 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Your question is not very clear for me, but
you should
try a custom validator where you can define your own message.
public classMSISDNValidator implements Validator { @In(value="#{editPartner.smsNumbers}", required=true) private List<SmsPhoneNumber> smsNumbers; @In(value="#{editPartner.smsPhoneNumber}", required=false) private SmsPhoneNumber smsPhoneNumber; public void validate(FacesContext context, UIComponent component, Object value) throws ValidatorException { String inputMSISDN = (String) value; List<SmsPhoneNumber> list = new LinkedList<SmsPhoneNumber>(smsNumbers); list.remove(smsPhoneNumber); for (SmsPhoneNumber num : list) { if (num.getPhoneNumber().equals(inputMSISDN)) { FacesMessage fm = FacesMessages.createFacesMessage( FacesMessage.SEVERITY_ERROR, SeamResourceBundle.getBundle().getString("editPartner_MSISDN") + " already exists"); // this is the string with message throw new ValidatorException(fm); } } }
sa sam
Ranch Hand
Posts: 46
posted 13 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Thanks, Vadim Baranenko
i got the simplest way.
<ice:messages layout="table"/>
With a little knowledge, a
cast iron skillet
is non-stick and lasts a lifetime.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Error message : ORA-01000: Maximum number of open cursors reached ??
null value at welcome.jsp
Tomcat instalation Service Problem
Tomcat Web Application Manager
how remove dot from error message
More...