-
1. Re: FacesMessages are not translated when I select new Message
pmuir Apr 8, 2008 2:20 PM (in response to enikozsido)You seem to be describing two separate problems - can you clarify?
So, the error messages come from validation errors?
Also, your xhtml snippet isn't valid, post the real xhtml ;-)
-
2. Re: FacesMessages are not translated when I select new Message
enikozsido Apr 8, 2008 2:59 PM (in response to enikozsido)Hello,
Thanks for reply.
I'll try to explain the problem again. I have a form, I'm trying to fill it out, and go to the next step. I make a mistake, for example I put a letter instead of a number. I get conversion error on the fieldvalue must be a number
. I decide to change the language, so I choose Faroese. The messages are not displayed.The code is:
<div id="top" xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:s="http://jboss.com/products/seam/taglib"> <div id="logo"> <s:decorate rendered="#{not identity.loggedIn}"><h1 onclick="document.location='home.seam'" title="#{messages['homePageHint']}"><span>asktovan</span></h1></s:decorate> <s:decorate rendered="#{identity.loggedIn}"><h1 onclick="document.location='task.seam'" title="#{messages['homePageHint']}"><span>asktovan</span></h1></s:decorate> </div> <div id="side-top"> <p class="top-img"><!-- --></p> <p class="welcome" id="loginout"> <h:outputText value="#{messages['welcomeMessage']}!" rendered="#{identity.loggedIn}"/> <s:link view="/login.xhtml" value="#{messages['login']}" rendered="#{not identity.loggedIn}"/> <h:form name="login" action="#{localeSelector.select}"> <h:commandLink view="/home.xhtml" action="#{identity.logout}" value="#{messages['logout']}" rendered="#{identity.loggedIn}"/> <br /><br /> <h:selectOneMenu value="#{localeSelector.language}" onchange="document.forms[0].submit();"> <f:selectItem itemLabel="English" itemValue="en"/> <f:selectItem itemLabel="Faroese" itemValue="fo"/> </h:selectOneMenu> </h:form> </p> </div> </div>
Thanks : Eniko
-
3. Re: FacesMessages are not translated when I select new Message
pmuir Apr 8, 2008 3:44 PM (in response to enikozsido)No, its a different form. So there are no validation errors, and your xhtml is still invalid (there is no action attribute on <h:form />).
-
4. Re: FacesMessages are not translated when I select new Message
enikozsido Apr 8, 2008 4:05 PM (in response to enikozsido)Oh, I get it now, what you don't understand.
The source I've sent you is part of a template. The template also has a content part: where the registration is included, that is a different form.
When I submit the form validation errors are displayed, but after changing locale the messages get lost, though I want them to be translated.
Thank you for your patience and promptness!