T5: ValueEncoderSource and Select's default encoder

2009-01-19 Thread Chris Lewis
Hi list, I simply want to know how the Select component gets its encoder from the ValueEncoderSource service, when an encoder isn't explicitly provided as a parameter. Thanks! -- http://thegodcode.net - To unsubscribe,

Re: T5: ValueEncoderSource and Select's default encoder

2009-01-19 Thread Thiago H. de Paula Figueiredo
Em Mon, 19 Jan 2009 13:54:11 -0300, Chris Lewis chris_le...@bellsouth.net escreveu: Hi list, Hi! I simply want to know how the Select component gets its encoder from the ValueEncoderSource service, when an encoder isn't explicitly provided as a parameter. Thanks! Are you using

Re: T5: ValueEncoderSource and Select's default encoder

2009-01-19 Thread Chris Lewis
I am, but that's not my question. My question is how does the select component get a default value encoder when one is not provided as a parameter? The source suggests it comes from the ValueEncoderSource service, to which modules like tapestry-hibernate contribute. But nowhere in the select's

Re: T5: ValueEncoderSource and Select's default encoder

2009-01-19 Thread Ulrich Stärk
IIRC from browsing through the source code this is done automagically by type coercing from your type to String (TypeCoercedValueEncoderFactory or something). The correspondig Encoder is selected by the Select components defaultEncoder() method, when no encoder parameter is provided (see the

Re: T5: ValueEncoderSource and Select's default encoder

2009-01-19 Thread Chris Lewis
Wow. Is that recent behavior? I've not been aware of the default* method convention before. Interesting indeed. Thanks for that! Ulrich Stärk wrote: IIRC from browsing through the source code this is done automagically by type coercing from your type to String (TypeCoercedValueEncoderFactory

Re: T5: ValueEncoderSource and Select's default encoder

2009-01-19 Thread Ulrich Stärk
I believe this was added back in 2007... Uli Chris Lewis schrieb: Wow. Is that recent behavior? I've not been aware of the default* method convention before. Interesting indeed. Thanks for that! Ulrich Stärk wrote: IIRC from browsing through the source code this is done automagically by

Re: T5: ValueEncoderSource and Select's default encoder

2009-01-19 Thread Chris Lewis
I'd be surprised if I've overlooked it that long, but given how much the framework and its docs have evolved, it's certainly possible. Thanks again! Ulrich Stärk wrote: I believe this was added back in 2007... Uli Chris Lewis schrieb: Wow. Is that recent behavior? I've not been aware of the

Re: T5: ValueEncoderSource and Select's default encoder

2009-01-19 Thread Howard Lewis Ship
In Select.java: ValueEncoder defaultEncoder() { return defaultProvider.defaultValueEncoder(value, resources); } In ComponentDefaultProvider.java: /** * Gets or creates a value encoder based on the emtype/em of the named parameter. ValueEncoders are cached * based