On Mon, Mar 1, 2010 at 7:19 AM, Jeppe Nejsum Madsen <je...@ingolfs.dk>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.



>
> 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 lift...@googlegroups.com.
> To unsubscribe from this group, send email to
> liftweb+unsubscr...@googlegroups.com<liftweb%2bunsubscr...@googlegroups.com>
> .
> 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 lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.

Reply via email to