struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Fumo, Vince" <>
Subject RE: status messages in <html:link> tag
Date Thu, 31 Mar 2005 18:54:47 GMT
ok follow-up and I'm sure this one will take 2 seconds to answer.. 

part 1) is there a JSTL way to do the <bean:define>? 
part 2) What does it mean when the status message from the below code by Bob
comes out as a literal (i.e.. <%=rollOverText%>) instead of the string it
represents? I've checked the scriptlet outside of the tag and it outputs
correctly. I'm thinking that the <html:link> tag isn't pre-processing the

-----Original Message-----
From: Bob Arnott []
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="" 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
> message-resources bundle for I18N. The only way I can think to do this is
> use a scriptlet like :
> <html:link href="" 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="" target="_blank"
onmouseover="window.status='<%=rollOverText%>'; return true;">...

Bob Arnott

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message