On Mon, Mar 1, 2010 at 12:54 PM, Jeppe Nejsum Madsen <je...@ingolfs.dk>wrote:

> Jim Barrows <jim.barr...@gmail.com> writes:
>
> > 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.
>
> Yes it does. Now I have to go through all my 100+ fields and add:
>
> override def displayName = S.?(getClass.getName+"."+name)
>


My point was that you've moved the boilerplate, not eliminated it.  If what
you suggest was in place you'd have to add 100+ properties in a file.



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


Okay, so displayNameFactory maybe?



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