You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Me...@ibsplc.com on 2002/03/04 06:17:11 UTC

Defining a bean for Message Resources label

Hi,
        Is it possible to define a bean to get a value of a property 
defined in the Application resources file.
The problem is that I would want to get the value of a message into a 
javascript function. 
I tried this....

function showConfirm()
{
  var t=<bean:message  key="allotment.new.prompt"/>;
confirm(t)
etccc
}

the value of the key is this:  "'Do you want to create another 
allotment?'"

But the html resolved is this.
function showConfirm()
{
  var t=<bean:message  key="allotment.new.prompt"/>;
confirm(t)
etccc
}


So i want to get the value into a bean of type String so that I can use 
this:
var t='<%=someId%>';


regards
Merrill