tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Athneria, Mahendra" <mahendra.athne...@atos.net>
Subject RE: Encoder with <t:loop>
Date Fri, 22 Jun 2012 12:21:57 GMT
Thanks a lot Thiago. I got the point :)

Mahendra Athneria

Ext-+91 22 6733 3729
Mob-+91 9833 121 309

-----Original Message-----
From: Thiago H de Paula Figueiredo [mailto:thiagohp@gmail.com] 
Sent: Friday, June 22, 2012 5:18 PM
To: Tapestry users; dev@tapestry.apache.org; Athneria, Mahendra
Subject: Re: Encoder with <t:loop>

On Fri, 22 Jun 2012 02:30:12 -0300, Athneria, Mahendra  
<mahendra.athneria@atos.net> wrote:

> Hi,


> "Could not find a coercion from type java.lang.String to type  
> [addressUsageValue] Available coercions:.........."

> First - I am not able to understand why encoder is required when using  
> loop??

It's just required when the Loop is inside a Form and the value of the  
Loop's formState parameter is different from LoopFormState.NONE. So you  
don't need to provide a ValueEncoder when you add formState="none" to your  

> And if it is required to submit the form then why it is not Mandatory  
> parameter??

It is because Loop is trying to submit values inside it.

> Second - I have just implemented the Encoder without any logic. I am not  
> able to understand where toValue() and toClient() method is used and  
> what is the purpose?

It's used by Loop in order to restore the objects during form submission  
and apply the submitted values to them.

> Third - when I submit the Page why form required Encoder??

Answered above.

Thiago H. de Paula Figueiredo
View raw message