Thiago H. de Paula Figueiredo wrote:
> 
> You should provide your own ValueEncoder that doesn't rely on toString().
> 
well if you've read my first post, you could see that my ValueEncoder
doesn't rely on toString(). It is  rather Tapestry Validator, that runs
toString on  User object and assumes it is null, when it is not.


Thiago H. de Paula Figueiredo wrote:
> 
>> if i set either name or surname property to some dummy value, things  
>> work again. Is it expected behavior?
> 
> Tapestry's Required validator treats empty string as null.
> 
the problem is, the object returned from valueencoder is not a string and it
is not empty. i don't know the internals, i cannot criticize. imho objects
returned from valuencoder schould be only checked against null unless they
are really strings.

unfortunately, there is no hint in ValueEncoder, that a toValue method must
return an object , whose toString() method returns not null. in contrary it
states "the corresponding entity, or null if not found". in my case User
instance with correct id is an corresponding entity, but it is treated as
not found because of toString 
-- 
View this message in context: 
http://old.nabble.com/-T5.1--select-with-required-validation-tp28461777p28466005.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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

Reply via email to