struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: ResourceBundle in Javascript?
Date Wed, 14 Mar 2007 13:46:19 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Nitin,

Dave Newton wrote:
> Message bundles are server-side. You want to access it on the client.

[snip]

> If you just need to access a single message out of a bundle, maybe 
> this is okay, although I'd probably just put the message into scope 
> via an Action then build your JavaScript using JSTL, which might be 
> enough for whatever it is you're trying to do.

This is what I do (albeit without JSTL) when I need to use a localized
string in javascript. It's also what velocity-tools does in order to
render client-side validation error messages.

- -chris

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFF9/yr9CaO5/Lv0PARAo43AKCSt6AGuumgaFCqdGeNtkaN0KsYZACfR3yA
XeNvNT3i3MPasVFgbqLwuaI=
=rWgL
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message