Hi

I finally was able to make it work.
I cant' believe how simple it was, and how long it took me to figure it out.
The solutions is to provide a ValueEncoder to the BeanBlock (so simple!)
Here is my code:

       <t:select t:id="caetg" model="selectModel"
value="context.propertyValue" encoder="valueEncoderForProperty"/>

then:

        public ValueEncoder getValueEncoderForProperty()
        {
                return 
valueEncoderSource.getValueEncoder(context.getPropertyType());
        }


It works beautifully now!

Saludos.
Alejandro.


On Mon, Jun 9, 2008 at 9:44 AM, Massimo Lusetti <[EMAIL PROTECTED]> wrote:
> On Fri, Jun 6, 2008 at 10:58 PM, Alejandro Scandroli
> <[EMAIL PROTECTED]> wrote:
>
>> Hi Massimo
>>
>> I'm experiencing the same thing. I'm trying to create an editor for
>> properties annotated with "@ManyToOne"
>> The BeanBlockContribution renders ok, but when I submit the form I get
>> an exception:
>>
>> org.apache.tapestry5.runtime.ComponentEventException
>> Failure writing parameter 'value' of component Editors:caetg: Could
>> not find a coercion from type java.lang.String to type
>> org.apache.tapestry.tutorial.model.Caetg. Available coercions: .....
>> (you know the rest)
>>
>>
>> As you said It works perfectly fine if I put the same code as a
>> <t:parameter> within the beaneditform
>> I haven't found a solution yet, but I'm looking.
>
> I've commented on a issue fired by Howard asking if that issue can
> cause influence in this behavior, we will see if we need to fire
> another issue.
>
> Regards
> --
> Massimo
> http://meridio.blogspot.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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

Reply via email to