my dog learned polymorphism*
The moose likes Struts and the fly likes bean message in javascript Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "bean message in javascript" Watch "bean message in javascript" New topic
Author

bean message in javascript

Sahil Sharma
Ranch Hand

Joined: Aug 27, 2003
Posts: 152
Hi,

I know how to invoke a <bean:message key> from javascript but is there a way i can pass a javascript variable to the arg parameter of bean message.
Something like this in javascript function

var value = "abc";
<bean:message key="some.key" arg0="var"/>

Thanks
Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902
    
    1

The answer is "NO". The JS is client side action, and the bean:message is JSP tag which gets complied and rendered into HTML at server side and then gets displayed on client's browser.

HTH


[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
Sahil Sharma
Ranch Hand

Joined: Aug 27, 2003
Posts: 152
thanks sagar.
Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902
    
    1

Welcome that's why they come up with the AJAX .
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: bean message in javascript