You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by infiniter <in...@gmail.com> on 2012/03/15 22:46:36 UTC
javascript and properties
I'm creating a js template for each page in my app and added some l18n
support.
Here is an example:
var someData = {
'msg'='${message:hello}';
'a'='${message:min}';
'b'='${message:max}';
}
I've considered localizing each template instead, but since the js changes
very often, I still want to have support for properties.
The problem is that for each JS template you have to create your variables
model with every single message.
I don't like having to provide a variables model to get these messages,
cause its just too time-consuming, but instead I'd like to make the
message-resolving part automatic just like wicket:message in the markup
files. That would REALLY speed up the dev time.
Any ideas to do something like this?
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/javascript-and-properties-tp4476533p4476533.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: javascript and properties
Posted by Andrea Del Bene <ad...@ciseonweb.it>.
Hi,
if you are using a subclass of TextTemplate and its method
interpolate(...), you can build an implementation of Map interface which
searches for a given key among properties entries. For example you could
use internally an instance of ResourceModel
> I'm creating a js template for each page in my app and added some l18n
> support.
> Here is an example:
>
> var someData = {
> 'msg'='${message:hello}';
> 'a'='${message:min}';
> 'b'='${message:max}';
> }
>
> I've considered localizing each template instead, but since the js changes
> very often, I still want to have support for properties.
> The problem is that for each JS template you have to create your variables
> model with every single message.
> I don't like having to provide a variables model to get these messages,
> cause its just too time-consuming, but instead I'd like to make the
> message-resolving part automatic just like wicket:message in the markup
> files. That would REALLY speed up the dev time.
>
> Any ideas to do something like this?
>
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/javascript-and-properties-tp4476533p4476533.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> 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
Re: javascript and properties
Posted by jaffa <ja...@gmail.com>.
JavaScript is a prototype based scripting language that is dynamic, weakly
typed and has first class functions. It is a multi paradigm language,
supporting object oriented, imperative, and functional programming styles.
Thanks.
Regards,
http://habitual.ca gym in mississauga
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/javascript-and-properties-tp4476533p4650159.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org