Jim Barrows <[email protected]> writes:

> 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. 

Yes it does. Now I have to go through all my 100+ fields and add:

override def displayName = S.?(getClass.getName+"."+name)

Same line in every field. That counts as boilerplate for me :-)

> On the other hand, if you have to l10n your app, then this works.

Exactly.

> 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.

That was pretty much what I suggested.....except I don't want to force
people to use displayNameFromPropertyFile. They could provide their own
function that looked it up in a db, generated random names etc.

/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].
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.

Reply via email to