I think you are right. I will probalby just put a
static public List makeList(List)
on the domain object. It is only used for the grid component, so this
probably appropriate.
Ben
On 6/13/07, Daniel Jue <[EMAIL PROTECTED]> wrote:
Are there other uses of the converted domain objects beside
Are there other uses of the converted domain objects besides the
presentation layer? I am wondering if it's "good practice" to tie in
Tapestry for this. Can Type A and Type B both implement a common
interface? Then you could have the presentation layer work on that
interface.
If a common inter
Thank you.
Is there native support for lists of different types? Will the TypeCoercer
take a List and create a List if that is what is
requested? If so, how are generic lists handled? Does the
TypeCoercer inspect the first element for its type?
Ben
On 6/13/07, Davor Hrg <[EMAIL PROTECTED]>
You need TypeCoercer,
you can inject it where needed, and use it..
ina a page:
@Injectprivate TypeCoercer typeCoercer
in a method, or service constructor:
public myMethod(@Inject TypeCoercer typeCoercer){}
you then use it like this:
SomeClass destination = typeCoercer.coerce(source, Some
I have a simple requirement to tranlsate a list of type A to a list of type
B
I have a simple service interface to do this:
List translate(List list)
It does a 1:1 translation on the source list, mapping properties to the new
list. It is specifically used to create beans to pass into the grid