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-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to