You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Pirmez <pi...@snap.com.br> on 2003/07/07 20:09:39 UTC
Re: locale-sensitive tag: how can I show an image-path out of a property-file
Try this:
<html:img srcKey="key.to.your.image.file" border="0" />
> Hi,
>
> I have a property-file including urls of my images.
> I have a tag inside a JSP as follows:
>
> <html:img src='../../../images/buttons/New.gif' border='0'/>
>
> And now I want to replace "images/buttons" inside the HTML with the appropriate value out of my property-file because I'm not allowed to place a tag inside another tag like this: "<html:img src='../../../<bean:message name..../>New.gif' border='0'/>".
>
> Is there a possibility to solve this problem?
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: locale-sensitive tag: how can I show an image-path out of a property-file
Posted by Konstadinis Euaggelos <Va...@eurodyn.com>.
I had a similiar problem, I want to put an alt property in html button,
I solve the problem like this,
I use bean define to declare a variable named filter,
<bean:define id="filter"><bean:message bundle="BUTTON_RESOURCE_KEY"
key="button.filter"/></bean:define>
and then u can use this variable(filter ) as follow, so you can take from a
resource-file any message you want.
<html:button styleClass="Button" title="<%="["+filter+"]"%>"
property="Filter" >
<bean:message bundle="BUTTON_RESOURCE_KEY"
key="button.filter"/>
</html:button>
Hope this help,
Vangos
----- Original Message -----
From: "Pirmez" <pi...@snap.com.br>
To: <st...@jakarta.apache.org>
Sent: Monday, July 07, 2003 9:09 PM
Subject: Re: locale-sensitive tag: how can I show an image-path out of a
property-file
> Try this:
> <html:img srcKey="key.to.your.image.file" border="0" />
>
> > Hi,
> >
> > I have a property-file including urls of my images.
> > I have a tag inside a JSP as follows:
> >
> > <html:img src='../../../images/buttons/New.gif' border='0'/>
> >
> > And now I want to replace "images/buttons" inside the HTML with the
appropriate value out of my property-file because I'm not allowed to place a
tag inside another tag like this: "<html:img src='../../../<bean:message
name..../>New.gif' border='0'/>".
> >
> > Is there a possibility to solve this problem?
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org