You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Jun Tsai <ju...@gmail.com> on 2007/07/04 07:59:41 UTC

Re: T5: Generic page classes with beaneditform

wish Jesse to fix the bug in T5.

Jun Tsai

2007/6/26, Jesse Kuhnert <jk...@gmail.com>:
>
> I don't know if this helps or not, but I got generics working in a very
> limited way with 4.1.x in that I do all the type lookup work
> manually...(this probably won't work for this use case but thought I'd
> throw
> it out just in case it does, even this breaks down in many places)
>
>
> http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/enhance/GenericsMethodSignatureImpl.java?view=markup
>
> http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/enhance/GenericsClassInspectorImpl.java?view=markup
>
> On 6/26/07, Francois Armand <fa...@linagora.com> wrote:
> >
> > Francois Armand wrote:
> > > Actually, it's not really an acceptable solution, but the sole
> > > workaround I know (if somebody as another idea, I would be glad to use
> > > it).
> > Well, this sentence is not true.
> > You may ask users to implement a "factory" interface for Class they
> > intend to use as parameter type for the bean component source object.
> >
> > The interface should be like that :
> > 8<----------------------------------
> > interface Factory<T> {
> >     T create();
> > }
> > 8<----------------------------------
> > And then you just call the create() implementation.
> >
> > The problem is that that "solution" is very error prone :  the interface
> > base implementation has to be overridden by each subclass or you will
> > end with the same type problem.
> > So, it seems to be a wore solution than the other one...
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
>
>
> --
> Jesse Kuhnert
> Tapestry/Dojo team member/developer
>
> Open source based consulting work centered around
> dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
>



-- 
Welcome to China Java Users Group(CNJUG).
http://cnjug.dev.java.net