tag:blogger.com,1999:blog-7966819206399566415.post240380286649526417..comments2023-10-30T08:57:25.093-07:00Comments on John's Blog: Retrieve Grails Domain Errors From the 'messageSource'johnrellishttp://www.blogger.com/profile/13318765113024624030noreply@blogger.comBlogger26125tag:blogger.com,1999:blog-7966819206399566415.post-79001047359992171872019-02-24T23:58:24.249-08:002019-02-24T23:58:24.249-08:00AM SANDRA FROM CANADA, THANKS TO DR ONIHA WHO HELP...AM SANDRA FROM CANADA, THANKS TO DR ONIHA WHO HELP ME BRING MY HUSBAND BACK, MY HUSBAND LEFT ME WITH THREE KIDS, FOR ANOTHER YOUNG GIRL, FOR OVER TWO YEARS, I TRIED ALL I COULD TO SETTLED OUR DIFFRENCES, BUT IT YIELDED NO RESULT, I WAS THE ONE TAKING CARE OF THE CHILDREN ALONE, UNTIL ONE DAY, I CAME IN CONTACT WITH SOME ARTICLES ONLINE, CONTAINING HOW DR ONIHA HAS HELP SO MANY LOVERS AND FAMILY REUNION AND REUNIT AGAIN, AND I DECIDED TO CONTACT HIM, AND HE CAST HIS SPELL ON MY HUSBAND, WITHIN FIVE DAYS, MY HUSBAND RAN BACK HOME, AND WAS BEGGING ME AND THE KIDS FOR FORGIVENESS, IN CASE YOU ARE PASSING THROUGH SIMILAR PROBLEMS, AND YOU WANTS TO CONTACT DR ONIHA, YOU CAN REACH HIM VIA HIS CONTACT NUMBER, ON CALL OR WHATSAP +2347089275769 OR EMAIL DRONIHASPELL@YAHOO.COMgjhmhhttps://www.blogger.com/profile/02847497099430667579noreply@blogger.comtag:blogger.com,1999:blog-7966819206399566415.post-2163629295868397512017-02-28T04:52:01.606-08:002017-02-28T04:52:01.606-08:00I appreciate your effort for providing such detail...I appreciate your effort for providing such detail information with screen shot. Thank you for sharing it with us<br /><a href="https://hostingsafety.com/vps-hosting.php" rel="nofollow"><b>VPS Hosting India</b></a> | <a href="https://hostingsafety.com/vps-hosting.php" rel="nofollow"><b>VPS Hosting Plans</b></a> | <a href="https://hostingsafety.com/vps-hosting.php" rel="nofollow"><b>VPS Hosting companies India</b></a>Hostingsafetyhttps://www.blogger.com/profile/13170593378519311885noreply@blogger.comtag:blogger.com,1999:blog-7966819206399566415.post-7544841027900456942015-01-06T16:32:33.456-08:002015-01-06T16:32:33.456-08:00Thank you John for the kind words! I appreciate it...Thank you John for the kind words! I appreciate it! :)RHhttps://www.blogger.com/profile/11759245676769325605noreply@blogger.comtag:blogger.com,1999:blog-7966819206399566415.post-65084803660456857902015-01-06T02:14:59.267-08:002015-01-06T02:14:59.267-08:00Awesome! I'm not surprised that its no longer...Awesome! I'm not surprised that its no longer working as this post is very old! Thanks for posting your link! Excellent blog post btw.johnrellishttps://www.blogger.com/profile/13318765113024624030noreply@blogger.comtag:blogger.com,1999:blog-7966819206399566415.post-74951834053651875662015-01-02T23:13:25.180-08:002015-01-02T23:13:25.180-08:00Hello John, I am not sure if the instructions show...Hello John, I am not sure if the instructions shown above work with Grails 2.4.4. I tried to follow this but couldn't get it to work. I figured it out via another blog. I have created my own blog entry with more details about how validation messages work and how to setup custom validation messages for your domain object: http://www.javawithravi.com/custom-validation-message-in-grails/<br /><br />Thank you,<br />Ravi HasijaRHhttps://www.blogger.com/profile/11759245676769325605noreply@blogger.comtag:blogger.com,1999:blog-7966819206399566415.post-31865702308672088612015-01-02T16:24:05.896-08:002015-01-02T16:24:05.896-08:00Thanks! This looks great! Thanks! This looks great! RHhttps://www.blogger.com/profile/11759245676769325605noreply@blogger.comtag:blogger.com,1999:blog-7966819206399566415.post-91339953655455973482014-08-27T22:23:32.887-07:002014-08-27T22:23:32.887-07:00It’s very useful blog your site thanks provide blo... It’s very useful blog your site thanks provide blog comments<br /><a href="http://www.myindiatourism.com" rel="nofollow">Myindiatourism</a><br /><br /> All visitor use to check domain <br />Anonymoushttps://www.blogger.com/profile/04320826285662480323noreply@blogger.comtag:blogger.com,1999:blog-7966819206399566415.post-24628986893620303782014-07-04T18:25:56.718-07:002014-07-04T18:25:56.718-07:00Perfect - just what I needed!
Thanks...Perfect - just what I needed!<br /><br />Thanks...Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-7966819206399566415.post-41097946168533275732014-03-31T09:38:12.407-07:002014-03-31T09:38:12.407-07:00Thanks, I was wondering this exact thing and this ...Thanks, I was wondering this exact thing and this did the trick!Chuckhttps://www.blogger.com/profile/03672725855147344523noreply@blogger.comtag:blogger.com,1999:blog-7966819206399566415.post-1268769516620423252012-06-29T04:13:37.158-07:002012-06-29T04:13:37.158-07:00thanks , nice blogthanks , nice blogVivek Bishthttps://www.blogger.com/profile/03598618623494006090noreply@blogger.comtag:blogger.com,1999:blog-7966819206399566415.post-52853171034660402352012-06-15T03:12:33.706-07:002012-06-15T03:12:33.706-07:00Love you JLove you JAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-7966819206399566415.post-24486270775963693932012-03-14T08:43:39.728-07:002012-03-14T08:43:39.728-07:00no worries greg, it might be worth trying
user.er...no worries greg, it might be worth trying<br /><br />user.errors.allErrors.each {log.error message(error : it)} <br /><br />as opposed to <br /><br />user.errors.allErrors.each {log.error messageSource.getMessage(it, null)} <br /><br />to save on some code clutter, I haven't tested this with the meta programming yet, but if you feel adventurous, might be worth a shot!johnrellishttps://www.blogger.com/profile/13318765113024624030noreply@blogger.comtag:blogger.com,1999:blog-7966819206399566415.post-68607203202937666832012-03-14T08:38:56.986-07:002012-03-14T08:38:56.986-07:00Thanks for posting this. You'd think Grails wo...Thanks for posting this. You'd think Grails would make some of this a little easier.Greghttps://www.blogger.com/profile/02493090935073997524noreply@blogger.comtag:blogger.com,1999:blog-7966819206399566415.post-65366552070300538012012-02-09T08:46:34.239-08:002012-02-09T08:46:34.239-08:00nice one, it does.
Must be a shortcut method that...nice one, it does.<br /><br />Must be a shortcut method that was added, so you can subsitute<br /><br />log.error messageSource.getMessage(it, null)<br /><br />with log.error message(error: it)<br /><br />Sweet. I will try some more tests and update.<br /><br />Thanks!johnrellishttps://www.blogger.com/profile/13318765113024624030noreply@blogger.comtag:blogger.com,1999:blog-7966819206399566415.post-39060692600017385322012-02-09T08:05:18.923-08:002012-02-09T08:05:18.923-08:00I have tried
user.errors.allErrors.each {
println...I have tried<br /><br />user.errors.allErrors.each {<br />println message(error: it)<br />}<br /><br />It works in grails 1.3.7 without any additional manipulationsttyhttps://www.blogger.com/profile/14712653842794118593noreply@blogger.comtag:blogger.com,1999:blog-7966819206399566415.post-33335368173061651292012-02-09T06:22:09.281-08:002012-02-09T06:22:09.281-08:00pretty sure that only prints the Property [{0}] of...pretty sure that only prints the Property [{0}] of class [{1}] with value [{2}] must be unique type message and not the i18n defined messages<br /><br />Maybe grails 2.0 has some magic?johnrellishttps://www.blogger.com/profile/13318765113024624030noreply@blogger.comtag:blogger.com,1999:blog-7966819206399566415.post-28951638267393829922012-02-08T08:32:52.186-08:002012-02-08T08:32:52.186-08:00Found a much simpler way:
user.errors.allErrors.e...Found a much simpler way:<br /><br />user.errors.allErrors.each {<br /> println message(error: it)<br />}Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-7966819206399566415.post-45283828878756022752011-04-29T01:49:10.733-07:002011-04-29T01:49:10.733-07:00Duvel please... :)Duvel please... :)johnrellishttps://www.blogger.com/profile/13318765113024624030noreply@blogger.comtag:blogger.com,1999:blog-7966819206399566415.post-37607109859350915732011-04-28T14:33:41.997-07:002011-04-28T14:33:41.997-07:00Wow, this was so useful! I want to buy you a beer...Wow, this was so useful! I want to buy you a beer.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-7966819206399566415.post-71990733741189736002010-10-02T03:48:57.554-07:002010-10-02T03:48:57.554-07:00Hey,
Looking at the MessageSource interface, I do...Hey,<br /><br />Looking at the MessageSource interface, I do not see any set methods but I imagine this has to be possible.<br /><br />I have never set an error message outside of the internationalization file so maybe you can ask the user list??? It is a pretty response list!<br /><br />Sorry I cant be of more help!<br /><br />Johnjohnrellishttps://www.blogger.com/profile/13318765113024624030noreply@blogger.comtag:blogger.com,1999:blog-7966819206399566415.post-42287058845181556682010-09-30T10:04:01.065-07:002010-09-30T10:04:01.065-07:00Is there a way to set the errors programmatically ...Is there a way to set the errors programmatically rather have set up the constraints ? In other words could I do something like users.errors.add "Passwords dont match"<br />?<br /><br />Thanks,Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-7966819206399566415.post-57181422696016835762010-07-12T07:13:10.098-07:002010-07-12T07:13:10.098-07:00Thanks buddy, you really helped us!Thanks buddy, you really helped us!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-7966819206399566415.post-91290571120309694712010-05-08T07:41:04.309-07:002010-05-08T07:41:04.309-07:00MessageSource is not injected in Unit Test. See ht...MessageSource is not injected in Unit Test. See http://grails.1312388.n4.nabble.com/How-do-I-access-inject-messageSource-from-unit-test-td1695170.html#a1695170Fabhttps://www.blogger.com/profile/00012279301463689401noreply@blogger.comtag:blogger.com,1999:blog-7966819206399566415.post-20586657172644972672010-03-29T09:25:58.309-07:002010-03-29T09:25:58.309-07:00Hey
sorry haven't actually done that in a uni...Hey<br /><br />sorry haven't actually done that in a unit test yet... Just integration tests, I imagine this has been done though... Check the mailing list archive on nabble... The grails user list.<br />Johnjohnrellishttps://www.blogger.com/profile/13318765113024624030noreply@blogger.comtag:blogger.com,1999:blog-7966819206399566415.post-34579809228530925622010-03-29T07:58:08.918-07:002010-03-29T07:58:08.918-07:00Well, I should add,
that you have already figured...Well, I should add,<br /> that you have already figured out. I am trying to do this same thing inside my unit tests and am having trouble getting access to the messageSource. I was hoping that possibly you had already accomplished this? Am I lucky?sghttps://www.blogger.com/profile/10172117059130158448noreply@blogger.com