-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Message interpolation for custom parameters
PostPosted: Tue Sep 06, 2011 6:23 am 
Regular
Regular

Joined: Wed Oct 15, 2003 4:40 pm
Posts: 67
Is there any way of interpolating custom parameters into a message? From what I've read in the specification parameters are resolved against the resource bundle and attributes of the constraint annotation until there is nothing more to resolve but is there any way of adding other parameters?

Say I have an order which has an delivery date and then I'd like to validate that so the customer can request a delivery no sooner than 3 (or whatever) days from the order. I can validate that but if I'd like to spell out the minimum date in the message I can't do something like "You can request delivery no sooner than {now_plus_something}", because the "now_plus_something" doesn't resolve to anything.

It would be nice to have some sort of additional context/map which would also be consulted by the message interpolator. Currently there are no other options than a custom message resolver(?)


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.