Translator and Validator causes confusion
-----------------------------------------

         Key: TAPESTRY-820
         URL: http://issues.apache.org/jira/browse/TAPESTRY-820
     Project: Tapestry
        Type: Improvement
  Components: Framework  
 Environment: any
    Reporter: Jesse Kuhnert
 Assigned to: Jesse Kuhnert 
     Fix For: 4.1


Currently in order to use anything but a String value combined with the new 
validators logic you have to add in an additional binding for the "translator":

<component id="defvalue" type="TextField">
       <binding name="value" value="ognl:event.defaultValue"/>
       <binding name="displayName" value="message:event.decimal.defaultValue"/>
       <binding name="validators" value="validators:real"/>
       <binding name="translator" value="translator:number,pattern=#.##" />
   </component>

This is not at all obvious for normal usage. I think the old validators method 
of combining the value type (if not string) along with the rest of the 
parameters into one single string is still better.

It would probably be a good idea to actually make the inferred object type 
argument work :) It can be a combination of the validators they are applying 
along with what the actual target value binding class type is. Shouldn't be too 
hard. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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

Reply via email to