Have you looked at the <html:img> tag in Struts? It contains an attribute
called pageKey which you can use to specify a key that maps to an
application relative image path in the message resource file. You can
combine this with the <logic:equal> tag or something similar to determine
which image type to display (standard or none).

----- Original Message -----
From: "James Childers" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, January 15, 2003 3:47 PM
Subject: RE: image tag question


I think you're doing the right thing here. I recently had to implement a
custom tag which did something very similar to what you are doing: it needed
to be "I18N-able", but also differed on another attribute. I wound up
rewriting the ImageTag out of the Sturts source, and coming up with a
slightly different TLD definition.

But basically you're on the right track. You're just going to have to write
your own ImageTag.

-= J

> -----Original Message-----
> From: Khalid K. [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 15, 2003 3:42 PM
> To: Struts Users Mailing List
> Subject: image tag question
>
>
> <imag> tag can refer to a:
>
> 1. Spanish version of the image
> 2. English version of the image
> 3. Spanish none standard image
> 4. English none standard image
>
> So far, I have thought of the following solution:
>
> 1. Build a custom tag called "ImagePath" as follow:
>
> This tag would have 3 attributes, image name, locale, var1
> (to specify standard or none standard)
> Tag's implementation would read a properties file to get the
> appropriate image path for a particular image.
>
> an example would be:  <img src="<mytag:ImagePath imageName,
> Locale, var1>">
>
> Please let me know if there is an easy solution, or if this
> example/solution that I proposed makes any sense :)

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.435 / Virus Database: 244 - Release Date: 1/1/2003

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to