struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Fumo, Vince" <Vince.F...@acs-inc.com>
Subject RE: status messages in <html:link> tag
Date Thu, 31 Mar 2005 18:05:11 GMT
cool.. thanks!

-----Original Message-----
From: Bob Arnott [mailto:boba@aungate.com]
Sent: Thursday, March 31, 2005 12:41 PM
To: Struts Users Mailing List
Subject: Re: status messages in <html:link> tag


Fumo, Vince wrote:
> I want to implement a status message on a rollover for some of my links. I
> was considering doing something like:
> 
> <html:link href="http://www.google.com" target="_blank"
> onmouseover="window.status='Go go google';return true">
> 
> which works fine. 
> 
> However, what I really want to do is pull the status message from my
struts
> message-resources bundle for I18N. The only way I can think to do this is
to
> use a scriptlet like :
> 
> <html:link href="http://www.google.com" target="_blank" 
> onmouseover="window.status='<% getMessage("message.key");%>';return true">

Off the top of my head, you could try something like this -

<bean:define id="rollOverText" type="java.lang.String"><bean:message
key="my.key" /></bean:define>
<html:link href="http://www.google.com" target="_blank"
onmouseover="window.status='<%=rollOverText%>'; return true;">...

-- 
Bob Arnott


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

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


Mime
View raw message