You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Rafael Taboada <ka...@gmail.com> on 2005/04/14 08:40:19 UTC

TagLibs

Hi folks, i have a problem, please could u help me?

I'm using taglibs and when i'm using html:img i have to use ALT
attribute. But it has to call a key from myfile.properties.

<bean:define id="imagenNuevo">
    <bean:message key="Empleados.imagen.nuevo" />
</bean:define>

<html:img align="absmiddle" alt="<%= imagenNuevo %>" border="0"
height="24" src="../images/Nuevo.png" width="24" />

As u see, i'm using a scriptlet to call an id defined with bean:define

all work well. But...

Is there a possibility to do that but without using scriptlet???... I
mean, just using taglibs...

i tried with:

<html:img align="absmiddle" alt="<bean:message
key="Empleados.imagen.nuevo" />" border="0" height="24"
src="../images/Nuevo.png" width="24" />

But, it doesn't run :s

Please... tigers... could u help me??? Thanks a lot

-- 

 Rafael Taboada

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


Re: TagLibs

Posted by Rafael Taboada <ka...@gmail.com>.
thanks so much :)


-- 

 Rafael Taboada

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


Re: TagLibs

Posted by Niall Pemberton <ni...@blueyonder.co.uk>.
Use the altKey attribute (rather than alt) - its exactly what you're looking
for.

<html:img align="absmiddle" altKey="Empleados.imagen.nuevo" border="0"
height="24" src="../images/Nuevo.png" width="24" />

http://struts.apache.org/userGuide/struts-html.html#img

Also if you wanted to have different images for different locales you could
use either pageKey or srcKey

Niall

----- Original Message ----- 
From: "Rafael Taboada" <ka...@gmail.com>
Sent: Thursday, April 14, 2005 7:40 AM


Hi folks, i have a problem, please could u help me?

I'm using taglibs and when i'm using html:img i have to use ALT
attribute. But it has to call a key from myfile.properties.

<bean:define id="imagenNuevo">
    <bean:message key="Empleados.imagen.nuevo" />
</bean:define>



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