You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Tom Zurkan <tz...@citizensportsinc.com> on 2009/05/27 22:13:49 UTC

coercion chaining in 5.1.0.5...

updating from 5.0.1.8 to 5.1.0.5.... String->Long->Id used to work but 
now it does not.  i am putting in the String->Id coercer but am 
wondering why this stopped working?

thanks,

tom

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: coercion chaining in 5.1.0.5...

Posted by Eric Ma <er...@db.com>.

Tom Zurkan wrote:
> 
> thanks!  here is what i have found out so far... it is actually 
> happening on restore state of a loop within a form.  it appears that the 
> encoder now uses the type coercer.  did it use that before?  i thought 
> it used serialization as the default.  anyway, when decoding the object, 
> it fails because it does find JDO->String.  but, it does not have 
> String->JDO.  now, i am just curious if that is a change between 5.0.1.8 
> and 5.1.0.5?  if so, i have a lot of new coercers to write.
> 
> thanks so much for your advise!
> 
> tom
> 

Somethings have definitely changed in this area.  I have 1 checkbox and 2
textfileds on my form that T5.0.18 used to coerce nicely into a custom Java
object (let's call it com.xyz.mypkg.MyType) upon form submission, but now
T5.1.0.5 tells me this:

org.apache.tapestry5.ioc.internal.util.TapestryException: Could not find a
coercion from type java.lang.String to type com.xyz.mypkg.MyType
-- 
View this message in context: http://www.nabble.com/reporting-issues-tp23749911p23844849.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: coercion chaining in 5.1.0.5...

Posted by Howard Lewis Ship <hl...@gmail.com>.
Please look into how tapestry-hibernate addresses this; it iterates
over the Hibernate schema and provide ValueEncoders for each entity
type. The same should be doable for JDO.

On Wed, May 27, 2009 at 7:29 PM, Tom Zurkan
<tz...@citizensportsinc.com> wrote:
> thanks!  here is what i have found out so far... it is actually happening on
> restore state of a loop within a form.  it appears that the encoder now uses
> the type coercer.  did it use that before?  i thought it used serialization
> as the default.  anyway, when decoding the object, it fails because it does
> find JDO->String.  but, it does not have String->JDO.  now, i am just
> curious if that is a change between 5.0.1.8 and 5.1.0.5?  if so, i have a
> lot of new coercers to write.
>
> thanks so much for your advise!
>
> tom
>
> Howard Lewis Ship wrote:
>>
>> Actually TypeCoercer includes an explain() method that is useful for
>> getting it to explain what set of coercions will be used.
>>
>> On Wed, May 27, 2009 at 2:17 PM, Tom Zurkan
>> <tz...@citizensportsinc.com> wrote:
>>
>>>
>>> more info.. this is apparently coming from a form submit... and it was
>>> going...
>>>
>>> String->Long->Id.... but, it is failing going from String (which is the
>>> id
>>> (i.e. long)) to a JDO.
>>>
>>> Thiago H. de Paula Figueiredo wrote:
>>>
>>>>
>>>> Em Wed, 27 May 2009 17:34:15 -0300, Tom Zurkan
>>>> <tz...@citizensportsinc.com> escreveu:
>>>>
>>>>
>>>>>
>>>>> basically, a jdoid...
>>>>>
>>>>
>>>> I can't recall any changes in the type coercing logic from 5.0.18 to
>>>> 5.1.0.5.
>>>> You can try to figure out what's happening debugging the
>>>> TypeCoercer.coerce() method.
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>>
>>>
>>
>>
>>
>>
>
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry
Director of Open Source Technology at Formos

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: coercion chaining in 5.1.0.5...

Posted by Tom Zurkan <tz...@citizensportsinc.com>.
thanks!  here is what i have found out so far... it is actually 
happening on restore state of a loop within a form.  it appears that the 
encoder now uses the type coercer.  did it use that before?  i thought 
it used serialization as the default.  anyway, when decoding the object, 
it fails because it does find JDO->String.  but, it does not have 
String->JDO.  now, i am just curious if that is a change between 5.0.1.8 
and 5.1.0.5?  if so, i have a lot of new coercers to write.

thanks so much for your advise!

tom

Howard Lewis Ship wrote:
> Actually TypeCoercer includes an explain() method that is useful for
> getting it to explain what set of coercions will be used.
>
> On Wed, May 27, 2009 at 2:17 PM, Tom Zurkan
> <tz...@citizensportsinc.com> wrote:
>   
>> more info.. this is apparently coming from a form submit... and it was
>> going...
>>
>> String->Long->Id.... but, it is failing going from String (which is the id
>> (i.e. long)) to a JDO.
>>
>> Thiago H. de Paula Figueiredo wrote:
>>     
>>> Em Wed, 27 May 2009 17:34:15 -0300, Tom Zurkan
>>> <tz...@citizensportsinc.com> escreveu:
>>>
>>>       
>>>> basically, a jdoid...
>>>>         
>>> I can't recall any changes in the type coercing logic from 5.0.18 to
>>> 5.1.0.5.
>>> You can try to figure out what's happening debugging the
>>> TypeCoercer.coerce() method.
>>>
>>>       
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>>     
>
>
>
>   


Re: coercion chaining in 5.1.0.5...

Posted by Howard Lewis Ship <hl...@gmail.com>.
Actually TypeCoercer includes an explain() method that is useful for
getting it to explain what set of coercions will be used.

On Wed, May 27, 2009 at 2:17 PM, Tom Zurkan
<tz...@citizensportsinc.com> wrote:
> more info.. this is apparently coming from a form submit... and it was
> going...
>
> String->Long->Id.... but, it is failing going from String (which is the id
> (i.e. long)) to a JDO.
>
> Thiago H. de Paula Figueiredo wrote:
>>
>> Em Wed, 27 May 2009 17:34:15 -0300, Tom Zurkan
>> <tz...@citizensportsinc.com> escreveu:
>>
>>> basically, a jdoid...
>>
>> I can't recall any changes in the type coercing logic from 5.0.18 to
>> 5.1.0.5.
>> You can try to figure out what's happening debugging the
>> TypeCoercer.coerce() method.
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry
Director of Open Source Technology at Formos

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: coercion chaining in 5.1.0.5...

Posted by Tom Zurkan <tz...@citizensportsinc.com>.
more info.. this is apparently coming from a form submit... and it was 
going...

String->Long->Id.... but, it is failing going from String (which is the 
id (i.e. long)) to a JDO.

Thiago H. de Paula Figueiredo wrote:
> Em Wed, 27 May 2009 17:34:15 -0300, Tom Zurkan 
> <tz...@citizensportsinc.com> escreveu:
>
>> basically, a jdoid...
>
> I can't recall any changes in the type coercing logic from 5.0.18 to 
> 5.1.0.5.
> You can try to figure out what's happening debugging the 
> TypeCoercer.coerce() method.
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: coercion chaining in 5.1.0.5...

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
Em Wed, 27 May 2009 17:34:15 -0300, Tom Zurkan  
<tz...@citizensportsinc.com> escreveu:

> basically, a jdoid...

I can't recall any changes in the type coercing logic from 5.0.18 to  
5.1.0.5.
You can try to figure out what's happening debugging the  
TypeCoercer.coerce() method.

-- 
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: coercion chaining in 5.1.0.5...

Posted by Tom Zurkan <tz...@citizensportsinc.com>.
basically, a jdoid...

Thiago H. de Paula Figueiredo wrote:
> Em Wed, 27 May 2009 17:13:49 -0300, Tom Zurkan 
> <tz...@citizensportsinc.com> escreveu:
>
>> updating from 5.0.1.8 to 5.1.0.5.... String->Long->Id used to work 
>> but now it does not.  i am putting in the String->Id coercer but am 
>> wondering why this stopped working?
>
> What is Id?
>
> Suggestion: instead of answering an unrelated message, send a message 
> to the mailing list directly. This disturbs e-mail readers and mailing 
> list archives that use threaded views. Example: your message in Nabble 
> (http://www.nabble.com/reporting-issues-to23749911s302.html).
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: coercion chaining in 5.1.0.5...

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
Em Wed, 27 May 2009 17:13:49 -0300, Tom Zurkan  
<tz...@citizensportsinc.com> escreveu:

> updating from 5.0.1.8 to 5.1.0.5.... String->Long->Id used to work but  
> now it does not.  i am putting in the String->Id coercer but am  
> wondering why this stopped working?

What is Id?

Suggestion: instead of answering an unrelated message, send a message to  
the mailing list directly. This disturbs e-mail readers and mailing list  
archives that use threaded views. Example: your message in Nabble  
(http://www.nabble.com/reporting-issues-to23749911s302.html).

-- 
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org