On Mon, Mar 1, 2010 at 8:27 AM, Jim Barrows <[email protected]> wrote:
> > On Mon, Mar 1, 2010 at 7:19 AM, Jeppe Nejsum Madsen <[email protected]>wrote: > >> Hi, >> >> In the interest of cutting boilerplate from mapped objects, I would >> like to get the display name from a property file. >> > > So your replacing code boilerplate with property file boilerplate? The > boilerplate has to go somewhere, and abstracting things like this out > doesn't change that. On the other hand, if you have to l10n your app, then > this works. > > What about turning it off by default, and turned on in Boot though. Also > it should probably use the existing method by default, rolling to the > property file if it's turned on and it's not provided. > Yeah... I gotta say, the less stuff that winds up outside Scala by default, the better. > > > >> >> So I was thinking that it would be an idea to add a >> MapperRules.nameToDisplayName such as this >> >> var nameToDisplayName: ( Mapper[_], String) = (_,name) => name >> > > A department of redundancy department approved name? :) *LOL* > > How about displayNameFromPropertyFile? A little wordy, but it shouldn't > ever need to be typed except to be overridden. > > > >> >> This would allow me to do things like nameToDisplayName = (m,name) => >> S.?(m.getClass.getName+"."+name) >> >> Thoughts? >> >> /Jeppe >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Lift" group. >> To post to this group, send email to [email protected]. >> To unsubscribe from this group, send email to >> [email protected]<liftweb%[email protected]> >> . >> For more options, visit this group at >> http://groups.google.com/group/liftweb?hl=en. >> >> > > > -- > James A Barrows > > > -- > You received this message because you are subscribed to the Google Groups > "Lift" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<liftweb%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/liftweb?hl=en. > -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Surf the harmonics -- You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
