On 27-11-2008 at 17:16, Mike McNally wrote: > I'd like to be able to have something like a tag dump out into my > pages a collection of (hidden of course) <span> elements (or something > like that) containing error messages templates for use by client-side > validation helper code. What I'd like is to be able to just code the > messages into .properties files, and then have the tag find them and > write them all out. Of course I can implement a Java-based tag to do > this, but if there's a simpler way to do it with a tag file that could > find the active resource bundle somehow that'd be easier. I guess I > could make a bean to get the "StripesResources" bundle and have the > tag file use that. Am I missing something obvious?
Try retrieving the resource bundle and use ResourceBundle#getKeys(). Retrieving the default resource bundle depends on the view technology used, but Stripes has a way to get the resource bundles that contain the error messages and field names: the LocalizationBundleFactory Oscar -- ,-_ /() ) Oscar Westra van holthe - Kind http://www.xs4all.nl/~kindop/ (__ ( =/ () Don't let your boss fuck you; that's anti-capitalist. ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Stripes-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/stripes-users
