[jboss-user] [JBoss Seam] - Re: Why control IDs in validation messages?
I want thank the posters of this thread so much for this topic. I am learning JSF, Seam and Facelets all at the same time. (I have been coding Java since version 1.0.2, but slipped a bit behind the curve as of late.) I didn't see the messages.properties connection in the Seam documentation I have, and I didn't make the connection on my own, so I was totally lost. I ended up with #3 for now. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4122832#4122832 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4122832 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Why control IDs in validation messages?
required="true"/@NotNull is the only point at which you have to break DRY. This is currently unavoidable, sorry. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4116111#4116111 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4116111 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Why control IDs in validation messages?
I just discovered, that the validation messages from hibernate validator are displayed as in the hibernate validator message bundle except for instance the @NotNull - this is coming from the JSF framework because I have to switch on the attribute required="true". I have now modified javax.faces.component.UIInput.REQUIRED=Value is required. to have an uniform message for each input field. For me, this is the easiest way. For me, the validation thing it is still not transparent because some things come from the JSF Validation Framework and some pieces from hibernate validator framework. Why that is clear because of the way the frameworks are plugged in into seam and where the validation occures. Maybe there is a way to uniform this behaviour? View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4116066#4116066 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4116066 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Why control IDs in validation messages?
My Facelets-Editor just did not showed me those two attributes - but they are listed in the JSF-Javadoc: - label --> The error output is still very noise, but not so cryptical as before - requiredMessage --> I do a lot of work (translations) I not want to do again Maybe I should dive a bit into the code ... View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4116049#4116049 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4116049 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Why control IDs in validation messages?
Please can you explain solution 2 & 3 a litte bit further? I do not know what you mean. The input component has no such attribute for instance. Thank you very much! View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4116038#4116038 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4116038 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Why control IDs in validation messages?
Did you see my previous post? There are (at least) three solutions available for that problem. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4116036#4116036 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4116036 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Why control IDs in validation messages?
The outcome for a german browser is: anonymous wrote : Vorname: | | register:firstNameDecorate:firstName: Validierungs-Fehler: Wert wird benötigt. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4116014#4116014 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4116014 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Why control IDs in validation messages?
I am fighting with the same problem. I have the following setup: | | http://java.sun.com/xml/ns/javaee"; | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; | xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd";> | | | | com.sun.facelets.FaceletViewHandler | | en | de | de_CH | | | | | http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";> | http://www.w3.org/1999/xhtml"; | xmlns:s="http://jboss.com/products/seam/taglib"; | xmlns:f="http://java.sun.com/jsf/core"; | xmlns:ui="http://java.sun.com/jsf/facelets"; | xmlns:h="http://java.sun.com/jsf/html";> | | | Training Plattform Register Start | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | @NotNull | @Length(max = 50) | public String getFirstName() { | return mFirstName; | } | | I do not see a problem here and no difference between the hotel booking example. But, In my case the formid,containerid and controlid are displayed before the validation message. I did not found a reasonable resolution to this problem. Anyone? Regards, Cyrill View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4116013#4116013 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4116013 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Why control IDs in validation messages?
Thanks for the help guys. Here are the different possible fixes I've found, for reference: 1. In WEB_INF/classes/messages_XX.properties, put: javax.faces.component.UIInput.REQUIRED=Value is required The default value is "{0}: Validation Error: Value is required." 2. Use the "label" attribute on the input controls to replace"formId:containerId:controlId" with a friendly name. 3. Use the "requiredMessage" attribute on the input controls to completely override the REQUIRED message. This is what I ended up doing. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4111310#4111310 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4111310 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Why control IDs in validation messages?
I experienced this too, I started from jpa example. At first the message displayed correct (with no Id). Although it doesn't seems related (and I didn't have time find out exactly the reason) I think it was about messing around with the default language and not including the proper messages_XX.properties in WEB-INF/classes. After correcting that error in my ant script I noticed the ids in the messages were gone, but again, didn't have a chance to confirm if that was in fact the reason. I suspected of that because other related things remained equal. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4111059#4111059 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4111059 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Why control IDs in validation messages?
The default messages are parameterized, I think the form control is {2}. You can include these parameters or not when you override. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4111047#4111047 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4111047 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Why control IDs in validation messages?
But if I do that, maybe changing it to "required value", wouldn't that just change the resulting error to "formId:panelId:controlId: Validation Error: required value"? That doesn't help at all :/ View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4111020#4111020 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4111020 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: Why control IDs in validation messages?
Set the correct message in messages.properties javax.faces.component.UIInput.REQUIRED=value is required View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4111017#4111017 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4111017 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user