While discussing with a colleague the subject of how to centralize validation metadata in an application that may manipulate objcts via the web site (i.e., pure vanilla Stripes) and a file upload mechanism (like CSV formats), the fact was noted that while it might be easy to leverage Stripes to deal with CSV file contents on the way *in* to the application, it's a little bit harder on the way *out*. Formatting (understandably) is something that Stripes considers to be a render-time problem, so it's delegated out to the page.
I think in general that that's fine, but I have to wonder whether it wouldn't be nice if the FormatterFactory could do its job with the knowledge of the type converter declared in a @Validate annotation (if any). That would allow for fields that use things like custom "Zip Code" and "Phone Number" and "Bank Routing Number" type converters to automatically imply a default formatter for any property to be rendered in some generic "String domain" way. Obviously this wouldn't preclude the ability to stipulate a formatter in input tags. Just a thought. (And of course I'm a complete Stripes novice so I may be missing some obvious way of getting what I want.) -- Turtle, turtle, on the ground, Pink and shiny, turn around. ------------------------------------------------------------------------------ SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ _______________________________________________ Stripes-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/stripes-users
