You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Geoff Callender <ge...@gmail.com> on 2014/12/11 05:02:45 UTC

Contributing client translators

Is there a way to contribute a client translator, just as we can contribute client validator? I feel like there has to be but I've somehow missed it.

The situation I have is similar to field 4 in this example:

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

In that example I've disabled the existing client-side translation because it has no idea how to translate "2k" to an integer. Instead, I'd like to contribute a translator which also has a client translator, then use it like this:

	<t:textfield t:id="objectAllowingShorthandInput" nulls="zero" translate="shorthandNumber"/>

Geoff


Re: Contributing client translators

Posted by Geoff Callender <ge...@gmail.com>.
I can't see how to use it. If it solves the problem then it would be good to get it documented.

I've added the issue to JIRA. Please vote for it!

	https://issues.apache.org/jira/browse/TAP5-2429

Geoff	

On 11 Dec 2014, at 10:15 pm, Charlouze <me...@charlouze.com> wrote:

> Hey !
> 
> I'm not sure to understand what you need but the Translator interface
> <https://github.com/apache/tapestry-5/blob/master/tapestry-core/src/main/java/org/apache/tapestry5/Translator.java>
> has a render method. Did you try that ?
> 
> Charles
> 
> 2014-12-11 5:02 GMT+01:00 Geoff Callender <
> geoff.callender.jumpstart@gmail.com>:
> 
>> Is there a way to contribute a client translator, just as we can
>> contribute client validator? I feel like there has to be but I've somehow
>> missed it.
>> 
>> The situation I have is similar to field 4 in this example:
>> 
>> 
>> http://jumpstart.doublenegative.com.au/jumpstart7/examples/input/augmentingtranslators
>> 
>> In that example I've disabled the existing client-side translation because
>> it has no idea how to translate "2k" to an integer. Instead, I'd like to
>> contribute a translator which also has a client translator, then use it
>> like this:
>> 
>>        <t:textfield t:id="objectAllowingShorthandInput" nulls="zero"
>> translate="shorthandNumber"/>
>> 
>> Geoff
>> 
>> 


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


Re: Contributing client translators

Posted by Charlouze <me...@charlouze.com>.
Hey !

I'm not sure to understand what you need but the Translator interface
<https://github.com/apache/tapestry-5/blob/master/tapestry-core/src/main/java/org/apache/tapestry5/Translator.java>
has a render method. Did you try that ?

Charles

2014-12-11 5:02 GMT+01:00 Geoff Callender <
geoff.callender.jumpstart@gmail.com>:

> Is there a way to contribute a client translator, just as we can
> contribute client validator? I feel like there has to be but I've somehow
> missed it.
>
> The situation I have is similar to field 4 in this example:
>
>
> http://jumpstart.doublenegative.com.au/jumpstart7/examples/input/augmentingtranslators
>
> In that example I've disabled the existing client-side translation because
> it has no idea how to translate "2k" to an integer. Instead, I'd like to
> contribute a translator which also has a client translator, then use it
> like this:
>
>         <t:textfield t:id="objectAllowingShorthandInput" nulls="zero"
> translate="shorthandNumber"/>
>
> Geoff
>
>