tapestry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Geoff Callender (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (TAP5-2429) Cannot contribute client-side translators
Date Mon, 15 Dec 2014 00:40:13 GMT

     [ https://issues.apache.org/jira/browse/TAP5-2429?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Geoff Callender updated TAP5-2429:
----------------------------------
    Description: 
Tapestry has client-side translators which, on input, translate before validation. They use
the same error-reporting mechanism as the validators (highlight the field and its label, display
the message below the field). 

However, we cannot contribute our own translators. Consider these situations where the server-side
field is numeric:

    Enter amount: [        ] (eg. 2k=2000, 5m=5000000]  
    Enter elapsed: [ 2:30] (min:sec)  
    Enter duration: [ 2m30s] (eg. 1m17s)  

When the server-side is numeric and the client-side representation is non-numeric, it fails
client-side validation because it's not a number. If we could do client-side translation then
this would be solved. 

Currently, instead, we have to disable client-side validation. For a live example, see the
4th field here (Preview 25):

    http://jumpstart.doublenegative.com.au/jumpstart7/examples/input/augmentingtranslators

I've seen a suggestion that Translator#render(Field field, String message, MarkupWriter writer,
FormSupport formSupport) might solve this. If so, then perhaps this should be a documentation
request because I've been unable to find any examples in the documentation.

  was:
Tapestry has client-side translators which, on input, translate before validation. They use
the same error-reporting mechanism as the validators (highlight the field and its label, display
the message below the field). 

However, we cannot contribute our own translators. Consider these situations where the server-side
field is numeric:

    Enter amount: [        ] (eg. 2k=2000, 5m=5000000]  
    Enter elapsed: [ 2:30] (min:sec)  
    Enter duration: [ 2m30s] (eg. 1m17s)  

When the server-side is numeric and the client-side representation is non-numeric, it fails
client-side validation because it's not a number. If we could do client-side translation then
this would be solved. 

Currently, instead, we have to disable client-side validation. For a live example, see the
4th field here (Preview 25):

    http://jumpstart.doublenegative.com.au/jumpstart7/examples/input/augmentingtranslators



> Cannot contribute client-side translators
> -----------------------------------------
>
>                 Key: TAP5-2429
>                 URL: https://issues.apache.org/jira/browse/TAP5-2429
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.3, 5.4
>            Reporter: Geoff Callender
>
> Tapestry has client-side translators which, on input, translate before validation. They
use the same error-reporting mechanism as the validators (highlight the field and its label,
display the message below the field). 
> However, we cannot contribute our own translators. Consider these situations where the
server-side field is numeric:
>     Enter amount: [        ] (eg. 2k=2000, 5m=5000000]  
>     Enter elapsed: [ 2:30] (min:sec)  
>     Enter duration: [ 2m30s] (eg. 1m17s)  
> When the server-side is numeric and the client-side representation is non-numeric, it
fails client-side validation because it's not a number. If we could do client-side translation
then this would be solved. 
> Currently, instead, we have to disable client-side validation. For a live example, see
the 4th field here (Preview 25):
>     http://jumpstart.doublenegative.com.au/jumpstart7/examples/input/augmentingtranslators
> I've seen a suggestion that Translator#render(Field field, String message, MarkupWriter
writer, FormSupport formSupport) might solve this. If so, then perhaps this should be a documentation
request because I've been unable to find any examples in the documentation.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message