You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by cacodemon79 <ca...@inwind.it> on 2008/05/30 18:45:13 UTC

ApplicationResources.properties accessed by Javascript function: is it possible?

Hi to all.
I'm a newbie on Struts framework. I'm developing a web site with Struts 1.3,
Tomcat 6.0, MySQL 5.0 and Eclipse.

I have stored in the ApplicationResources.properties the strings (labels,
values, ...) of my site.
I'm wondering if it's possible to access this file by a Javascript function
as I would like to use the same strings without be obliged to redefine them
in Javascript functions.
Is there a special functionality (method) to do so?

I have tought to the following alternatives:
1) to store the ApplicationResources.properties keys in hidden fields so
that i can access them in javascript functions;
2) to pass these strings as parameters when calling a javascript function

Can you give me any suggestion on the matter?

Thanks in advance.
-- 
View this message in context: http://www.nabble.com/ApplicationResources.properties-accessed-by-Javascript-function%3A-is-it-possible--tp17563510p17563510.html
Sent from the Struts - User mailing list archive at Nabble.com.


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


Re: ApplicationResources.properties accessed by Javascript function: is it possible?

Posted by Jukka Välimaa <va...@gmail.com>.
Hi,

I either set them as parameters to function calls, or into variables in
global js objects, where js functions of those same objects get them. I
don't think there is any existing special functionality to get them.

Jukka

On Sun, Jun 1, 2008 at 2:42 PM, cacodemon79 <ca...@inwind.it> wrote:

>
> No reply? :(
>
>
> cacodemon79 wrote:
> >
> > Hi to all.
> > I'm a newbie on Struts framework. I'm developing a web site with Struts
> > 1.3, Tomcat 6.0, MySQL 5.0 and Eclipse.
> >
> > I have stored in the ApplicationResources.properties the strings (labels,
> > values, ...) of my site.
> > I'm wondering if it's possible to access this file by a Javascript
> > function as I would like to use the same strings without be obliged to
> > redefine them in Javascript functions.
> > Is there a special functionality (method) to do so?
> >
> > I have tought to the following alternatives:
> > 1) to store the ApplicationResources.properties keys in hidden fields so
> > that i can access them in javascript functions;
> > 2) to pass these strings as parameters when calling a javascript function
> >
> > Can you give me any suggestion on the matter?
> >
> > Thanks in advance.
> >
>
> --
> View this message in context:
> http://www.nabble.com/ApplicationResources.properties-accessed-by-Javascript-function%3A-is-it-possible--tp17563510p17584752.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: ApplicationResources.properties accessed by Javascript function: is it possible?

Posted by cacodemon79 <ca...@inwind.it>.
No reply? :(


cacodemon79 wrote:
> 
> Hi to all.
> I'm a newbie on Struts framework. I'm developing a web site with Struts
> 1.3, Tomcat 6.0, MySQL 5.0 and Eclipse.
> 
> I have stored in the ApplicationResources.properties the strings (labels,
> values, ...) of my site.
> I'm wondering if it's possible to access this file by a Javascript
> function as I would like to use the same strings without be obliged to
> redefine them in Javascript functions.
> Is there a special functionality (method) to do so?
> 
> I have tought to the following alternatives:
> 1) to store the ApplicationResources.properties keys in hidden fields so
> that i can access them in javascript functions;
> 2) to pass these strings as parameters when calling a javascript function
> 
> Can you give me any suggestion on the matter?
> 
> Thanks in advance.
> 

-- 
View this message in context: http://www.nabble.com/ApplicationResources.properties-accessed-by-Javascript-function%3A-is-it-possible--tp17563510p17584752.html
Sent from the Struts - User mailing list archive at Nabble.com.


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