You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Patrick Davids <pa...@nubologic.com> on 2014/04/30 11:03:47 UTC
Question / l18n / property substitution / formatting
Hi all,
I'm not sure, if I do something wrong, but I never get such a property
working.
Is this way not possible?
Code:
new StringResourceModel("label", this, model);
properties file:
label=${dateOfCreation, date, dd.MM.yy}
This is working...
Code:
new StringResourceModel("label", this, null, new PropertyModel(model,
"dateOfCreation"));
properties file:
label={0, date, dd.MM.yy}
Is there any reason?
Could be a nice feature... I think...
Or am I just doing something wrong?
kind regards
Patrick
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Question / l18n / property substitution / formatting
Posted by Patrick Davids <pa...@nubologic.com>.
Hi Sven,
> Java's MessageFormat
Ah, yes, thanx...
regards
Patrick
Am 30.04.2014 11:21, schrieb Sven Meier:
> Hi,
>
> StringResourceModel uses Java's MessageFormat for its parameters, so
> only the {0} syntax is supported.
>
> Use ${dateOfCreation} for Wicket's placeholder replacement - this one
> uses Wicket's converters instead.
>
> Regards
> Sven
>
> On 04/30/2014 11:03 AM, Patrick Davids wrote:
>> Hi all,
>> I'm not sure, if I do something wrong, but I never get such a property
>> working.
>>
>> Is this way not possible?
>>
>> Code:
>> new StringResourceModel("label", this, model);
>>
>> properties file:
>> label=${dateOfCreation, date, dd.MM.yy}
>>
>>
>> This is working...
>>
>> Code:
>> new StringResourceModel("label", this, null, new PropertyModel(model,
>> "dateOfCreation"));
>>
>> properties file:
>> label={0, date, dd.MM.yy}
>>
>> Is there any reason?
>> Could be a nice feature... I think...
>>
>> Or am I just doing something wrong?
>>
>> kind regards
>> Patrick
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
--
Mit freundlichen Grüßen,
Patrick Davids
nuboLOGIC GmbH & Co. KG
Kieler Str. 103-107 • 25474 Bönningstedt
Tel.: +49 40 228539 732
Email: patrick.davids@nubologic.com
http://www.nubologic.com
Handelsregister: HRA6819 Pi | Amtsgericht Pinneberg
Geschäftsführung der Verwaltungsgesellschaft
Daniel Fraga Zander
HRB10145Pi | Amtsgericht Pinneberg
Re: Question / l18n / property substitution / formatting
Posted by Sven Meier <sv...@meiers.net>.
Hi,
StringResourceModel uses Java's MessageFormat for its parameters, so
only the {0} syntax is supported.
Use ${dateOfCreation} for Wicket's placeholder replacement - this one
uses Wicket's converters instead.
Regards
Sven
On 04/30/2014 11:03 AM, Patrick Davids wrote:
> Hi all,
> I'm not sure, if I do something wrong, but I never get such a property
> working.
>
> Is this way not possible?
>
> Code:
> new StringResourceModel("label", this, model);
>
> properties file:
> label=${dateOfCreation, date, dd.MM.yy}
>
>
> This is working...
>
> Code:
> new StringResourceModel("label", this, null, new PropertyModel(model,
> "dateOfCreation"));
>
> properties file:
> label={0, date, dd.MM.yy}
>
> Is there any reason?
> Could be a nice feature... I think...
>
> Or am I just doing something wrong?
>
> kind regards
> Patrick
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org