On Jan 15, 2006, at 7:22 PM, Martin Strand wrote:
On Mon, 16 Jan 2006 01:36:17 +0100, Paul Cantrell <[EMAIL PROTECTED]> wrote:
(1) Make component infer the type from the return type of the getter. It is just silly that I have to say "TextField" twice in a row:

     @Component( type = "TextField" )
     public abstract TextField getEmail();

There is not a one-to-one mapping between Java types and component types. You can have two different components using the same TextField class, but with different .html templates and different .jwc files.

Fair enough, but in such situations, one would have to use the explicit type="..." declaration, which seems quite reasonable.

The thing is, that's a less common case. Sacrificing simplicity in the common case to accommodate the unusual does not seem like the Tapestry Way!

Even the naive algorithm that takes the unqualified name of the Java class and looks it up as a component name would make the type="..." unnecesssary in 90% of cases.

If we eliminated the .page/.jwc files completely, that would no longer be the case, since Tapestry would then always determine the Java type automatically for each component...

I'd love to make the .jwc files completely optional, as Tapestry has already done with .page. Admittedly, this is a hard problem.

Cheers,

Paul

_________________________________________________________________
Piano music podcast: http://inthehands.com
Other interesting stuff: http://innig.net



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to