Re: Contributing client translators

2014-12-14 Thread Geoff Callender
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 wrote: > Hey ! > > I'm not sure to unders

Re: Contributing client translators

2014-12-11 Thread Charlouze
Hey ! I'm not sure to understand what you need but the Translator interface has a render method. Did you try that ? Charles 2014-12-11 5:02 GMT+01:00 Geoff Callender < geoff.callen

Contributing client translators

2014-12-10 Thread Geoff Callender
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/augmentingtr

Re: Named translators

2012-08-24 Thread Lance Java
.com/Named-translators-tp5715756p5715783.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

Re: Named translators

2012-08-24 Thread Lance Java
.html -- View this message in context: http://tapestry.1045711.n5.nabble.com/Named-translators-tp5715756p5715781.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-uns

Re: Named translators

2012-08-23 Thread Alex Kotchnev
r formatter = messages.getFormatter(translator.getName() > + > "-message"); >return new FieldTranslatorImpl(myField, translator, formatter, > formSupport); > } > > > > -- > View this message in context: > http://tapestry.1045711.n5.nabble.com/Named-tran

Re: Named translators

2012-08-23 Thread Lance Java
= messages.getFormatter(translator.getName() + "-message"); return new FieldTranslatorImpl(myField, translator, formatter, formSupport); } -- View this message in context: http://tapestry.1045711.n5.nabble.com/Named-translators-tp5715756p5715764.html Sent from the Tapestry - User mailing list

Named translators

2012-08-23 Thread Alex Kotchnev
I would like to contribute a Translator for Long values that would allow me to translate between byte counts and human readable file sizes (e.g. 5000bytes ~ 5MB). Since around 5.2 , the Translator configuration switched to a Mapped configuration where each translator is contributed for a given type

Re: translators in 5.2+

2011-01-11 Thread Paul Stanton
tried : configuration.override(BigDecimal.class, new BigDecimalTranslator()); Josh On Mon, Jan 10, 2011 at 2:01 PM, Paul Stanton wrote: can someone shed some light on how to override or supply new translators to tapestry 5.2+ ? jumpstart is written for 5.1 http://jumpstart.doublenegative.com.au/jump

Re: translators in 5.2+

2011-01-10 Thread Josh Canfield
Have you tried : configuration.override(BigDecimal.class, new BigDecimalTranslator()); Josh On Mon, Jan 10, 2011 at 2:01 PM, Paul Stanton wrote: > can someone shed some light on how to override or supply new translators to > tapestry 5.2+ ? > > jumpstart is written fo

Re: translators

2011-01-10 Thread françois facon
or supply new translators to > tapestry 5.2+ ? > > jumpstart is written for 5.1 > > http://jumpstart.doublenegative.com.au/jumpstart/examples/input/creatingtranslators1 > > and no longer works. > > i've tried adding: > >public static void > contributeTran

translators in 5.2+

2011-01-10 Thread Paul Stanton
can someone shed some light on how to override or supply new translators to tapestry 5.2+ ? jumpstart is written for 5.1 http://jumpstart.doublenegative.com.au/jumpstart/examples/input/creatingtranslators1 and no longer works. i've tried adding: public static

translators

2011-01-10 Thread Paul Stanton
can someone shed some light on how to override or supply new translators to tapestry 5.2+ ? jumpstart is written for 5.1 http://jumpstart.doublenegative.com.au/jumpstart/examples/input/creatingtranslators1 and no longer works. i've tried adding: public static

Re: translators in 5.2, and re-use as formatters

2010-12-26 Thread Josh Canfield
> How do I associate more than one Translator to a type? I think TranslatorAlternatesSource is what you want. It allows you to specify translators by name and they can overlap types. http://tapestry.apache.org/tapestry5.2-dev/apidocs/org/apache/tapestry5/services/TranslatorAlternatesSource.h

Re: translators in 5.2, and re-use as formatters

2010-12-26 Thread Thiago H. de Paula Figueiredo
be output value? Tapestry 5 made creating componets very easy, so you don't need to be restrained to the ones provided by the framework. I see the role of formatters and translators intricately linked - otherwise there is certain code repetition and therefore maintenance issues. A

Re: translators in 5.2, and re-use as formatters

2010-12-24 Thread Benny Law
quot;the key task") of web applications is to convert objects into strings > and back again. > > I see the role of formatters and translators intricately linked - otherwise > there is certain code repetition and therefore maintenance issues. Also, > constantly defining getter met

Re: translators in 5.2, and re-use as formatters

2010-12-23 Thread Paul Stanton
t;) of web applications is to convert objects into strings and back again. I see the role of formatters and translators intricately linked - otherwise there is certain code repetition and therefore maintenance issues. Also, constantly defining getter methods in components to make global

Re: translators in 5.2, and re-use as formatters

2010-12-22 Thread Bryan Lewis
so hard to specify the desired translator on each instance of a textfield: My base Page class has a getCurrencyTranslator() method that merely does "return new CurrencyTranslator();". Since then, I wrote an Insert component (reusing a Tap4 name we were accustomed to) that allows me to pass

Re: translators in 5.2, and re-use as formatters

2010-12-21 Thread Paul Stanton
anyone? On 5/12/2010 10:59 AM, Paul Stanton wrote: Hi Thiago, If I want a way to make commonly used translators (and formatters) available to every component I can: 1. create a service and inject it into every component class and mark it a property 2. create my own binding prefix am i

Re: translators in 5.2, and re-use as formatters

2010-12-04 Thread Paul Stanton
Hi Thiago, If I want a way to make commonly used translators (and formatters) available to every component I can: 1. create a service and inject it into every component class and mark it a property 2. create my own binding prefix am i missing something ? I would expect this to be easier

Re: translators in 5.2, and re-use as formatters

2010-12-04 Thread Thiago H. de Paula Figueiredo
On Sat, 04 Dec 2010 12:13:02 -0200, Paul Stanton wrote: I also can't find any documentation regarding the config of Translators ... ? The contribution for TranslatorSource defines the default translator. If you want to use another one, just pass it to the translator parameter. Y

Re: translators in 5.2, and re-use as formatters

2010-12-04 Thread Paul Stanton
I also can't find any documentation regarding the config of Translators ... ? On 2/12/2010 11:53 PM, Paul Stanton wrote: Hi, in 5.0 you used to be able to define and refer to Translators by name: public static void contributeTranslatorSource(Configuration configur

translators in 5.2, and re-use as formatters

2010-12-02 Thread Paul Stanton
Hi, in 5.0 you used to be able to define and refer to Translators by name: public static void contributeTranslatorSource(Configuration configuration) { configuration.add(new MyTranslator("Decimal")); configuration.add(new MyTranslator("Decimal2Dp&quo

Re: [t5] Contribute multiple translators for one type no longer supported

2010-05-12 Thread Joost Schouten (ml)
ote: Please read the documentation on TranslatorSource about how to accomplish what you want. On Tue, May 11, 2010 at 4:16 AM, Joost Schouten (ml) wrote: Hi, I just updated to the latest snapshot of T5.2 and can no longer contribute two translators for the same type [1]. I get an exception due to

Re: [t5] Contribute multiple translators for one type no longer supported

2010-05-11 Thread Howard Lewis Ship
Please read the documentation on TranslatorSource about how to accomplish what you want. On Tue, May 11, 2010 at 4:16 AM, Joost Schouten (ml) wrote: > Hi, > > I just updated to the latest snapshot of T5.2 and can no longer contribute > two translators for the same type [1]. I get

[t5] Contribute multiple translators for one type no longer supported

2010-05-11 Thread Joost Schouten (ml)
Hi, I just updated to the latest snapshot of T5.2 and can no longer contribute two translators for the same type [1]. I get an exception due to the fact that the TranslatorSource now only accepts a MappedConfiguration which disallows two contributions on the same type [2]. Two translators

Re: Validators / Translators question

2009-12-10 Thread Thiago H. de Paula Figueiredo
Em Thu, 10 Dec 2009 11:50:31 -0200, Jim O'Callaghan escreveu: Thanks Thiago. I'm using the example at the link you specified, but found I needed to provide validators and translators to complete the approach, esp. the translator being missing / not bound was causing a NPE

RE: Validators / Translators question

2009-12-10 Thread Jim O'Callaghan
Thanks Thiago. I'm using the example at the link you specified, but found I needed to provide validators and translators to complete the approach, esp. the translator being missing / not bound was causing a NPE somewhere along the line. I can update the block to display the fields (sub fiel

Re: Validators / Translators question

2009-12-10 Thread Thiago H. de Paula Figueiredo
Em Thu, 10 Dec 2009 09:01:05 -0200, Jim O'Callaghan escreveu: Hi, Hi! Client - is it an incorrect approach to used Validators / Translators in this scenario and if so can anyone advise on how to abstract and reuse an embedded Address rendering approach? Validators and translator

Validators / Translators question

2009-12-10 Thread Jim O'Callaghan
Hi, I'm trying to simplify some pages using the Grid display for search results and the BEF for input and want to find out if Validators / Translators are intended to only operate on individual fields, or if the approach can be used as a pattern to validate and display multiple fields wit

Expansions and translators

2009-06-05 Thread Lukasz Jazgar
. NumberTranslator is locale-aware. I think, it's little bit inconsistent design. All values, which go to (or from) client view, should be prepared by same mechanism, no matter value is shown in form field or as a static text. And I think, Translators are the mechanism invented

Re: Palette and translators

2009-03-20 Thread nille hammer
translators Gesendet: Fr, 20. Mrz 2009 Von: Alfie Kirkpatrick > Hi, I have a slight problem with the Palette component. It does not seem > to be picking up my contribution to the translatorSource for my custom > property type. The encoding is working fine but the options themselves > a

Palette and translators

2009-03-20 Thread Alfie Kirkpatrick
Hi, I have a slight problem with the Palette component. It does not seem to be picking up my contribution to the translatorSource for my custom property type. The encoding is working fine but the options themselves appear to use toString(). Other single-value fields using this type render ok, so a

Re: Localized Translators - again

2008-10-06 Thread Ville Virtanen
The localized js validation must be there, not very serious solution if it supports server side localization, but not client side :) +1 too for localized translators and js validation. Marcelo Lotif-2 wrote: > > And me too. > Here, we're using a javascript + onToClient and

Re: Localized Translators - again

2008-10-06 Thread Ulrich Stärk
Thiago H. de Paula Figueiredo schrieb: Em Mon, 06 Oct 2008 11:32:01 -0300, Ulrich Stärk <[EMAIL PROTECTED]> escreveu: https://issues.apache.org/jira/browse/TAPESTRY-2457 (in fact I tried to Voted and watching this issue. But I think its description speaks only of Translators, b

Re: Localized Translators - again

2008-10-06 Thread Borut Bolčina
e ago... > > > > > > > -Ursprüngliche Nachricht- > > > Von: Ulrich Stärk [mailto:[EMAIL PROTECTED] > > > Gesendet: Montag, 6. Oktober 2008 16:32 > > > An: users@tapestry.apache.org > > > Betreff: Localized Translators - again

Re: Localized Translators - again

2008-10-06 Thread Thiago H. de Paula Figueiredo
Em Mon, 06 Oct 2008 11:32:01 -0300, Ulrich Stärk <[EMAIL PROTECTED]> escreveu: https://issues.apache.org/jira/browse/TAPESTRY-2457 (in fact I tried to Voted and watching this issue. But I think its description speaks only of Translators, but the discussion here also deals wi

Re: Localized Translators - again

2008-10-06 Thread Marcelo Lotif
alization is still such an issue, this will be really hard... > > Max > > PS: I already voted long time ago... > > > > -Ursprüngliche Nachricht- > > Von: Ulrich Stärk [mailto:[EMAIL PROTECTED] > > Gesendet: Montag, 6. Oktober 2008 16:32 > > An: users@

AW: Localized Translators - again

2008-10-06 Thread Maximilian Weißböck
-Ursprüngliche Nachricht- > Von: Ulrich Stärk [mailto:[EMAIL PROTECTED] > Gesendet: Montag, 6. Oktober 2008 16:32 > An: users@tapestry.apache.org > Betreff: Localized Translators - again > > Am Sa, 13.09.2008, 22:36, schrieb Howard Lewis Ship: > > On Sat, Sep 13, 2008

Localized Translators - again

2008-10-06 Thread Ulrich Stärk
Am Sa, 13.09.2008, 22:36, schrieb Howard Lewis Ship: > On Sat, Sep 13, 2008 at 2:54 AM, Ulrich Stärk <[EMAIL PROTECTED]> wrote: >> - localization for translators is still missing: >> https://issues.apache.org/jira/browse/TAPESTRY-2457 (in fact I tried to >> bring thi

Re: Localized translators

2008-09-17 Thread Filip S. Adamsen
Hi, Yes, you can just inject Request and PersistentLocale. -Filip Ulrich Stärk skrev: In order to have localized Translators, Howard suggested to override the default TranslatorSource service and add my own Translators to it. If I want to have localized Translators I have to take into

How to have localized translators

2008-06-25 Thread Ulrich Stärk
a Locale parameter to Translator's parseClient and toClient methods, but I don't want to apply this patch to every release of Tapestry. One solution could be to write my own translators that have a setter for the current user's locale and instantiate them on every page where they

Re: Tap 4.1.2 translators/validators

2007-05-01 Thread Jesse Kuhnert
passed from the validators the output of the translators? I have been trying to get something like this working in 4.1.2 (todays snapshot) that worked fine in 4.0. My percentTranslator is registering the dojo events necessary to call: translatePercentage:function(value) { dojo

Tap 4.1.2 translators/validators

2007-05-01 Thread Tony Nelson
If a TextField has both a translator and validators defined, is the input passed from the validators the output of the translators? I have been trying to get something like this working in 4.1.2 (todays snapshot) that worked fine in 4.0. My percentTranslator is registering the dojo

Re: [T4] Translators and JPA troubles

2007-03-25 Thread Doychi
re working fine. (of course I might have technical advantages, and I did have to refactor those components some to allow the joda date objects to be bound instead of just java,util.Date ) On 3/25/07, Doychi <[EMAIL PROTECTED]> wrote: Hi All, I'm having some problems with JPA and translato

Re: [T4] Translators and JPA troubles

2007-03-25 Thread Jesse Kuhnert
just java,util.Date ) On 3/25/07, Doychi <[EMAIL PROTECTED]> wrote: Hi All, I'm having some problems with JPA and translators. I have been able to set up a number of pages for CRUD, but in one class I am using Joda's Time and Date library (specifically the DateTime class). Now i

[T4] Translators and JPA troubles

2007-03-24 Thread Doychi
Hi All, I'm having some problems with JPA and translators. I have been able to set up a number of pages for CRUD, but in one class I am using Joda's Time and Date library (specifically the DateTime class). Now it came as no surprise that this class can't be used directly fro

Re: Annotations and translators

2006-10-04 Thread Mael Caldas
t; Mael > > On 10/4/06, Mael Caldas <[EMAIL PROTECTED]> wrote: > > > > Hi, > > > > I wan to to declare a DatePicker component with annotations. I just > passed > > the component from .page, to java the corresponding java class, but I > got

Re: Annotations and translators

2006-10-04 Thread Jesse Kuhnert
cker component with annotations. I just passed > the component from .page, to java the corresponding java class, but I got a > parse exception, because of the translators bindings... > Here is the code on .page: > > > > > > value="translator:d

Re: Annotations and translators

2006-10-04 Thread Mael Caldas
got a parse exception, because of the translators bindings... Here is the code on .page: And with annotation: @Component(id="date", type="DatePicker", bindings= {"value=date, displayName=literal:Data, validators={validators:required[É necessário uma

Annotations and translators

2006-10-04 Thread Mael Caldas
Hi, I wan to to declare a DatePicker component with annotations. I just passed the component from .page, to java the corresponding java class, but I got a parse exception, because of the translators bindings... Here is the code on .page: And with annotation: @Component