jakarta-taglibs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Abey Mullassery" <a...@mullassery.com>
Subject RE: Generic Tags for Image Tag Actions
Date Thu, 06 Dec 2001 12:14:15 GMT

We can have generic tags such as

	<img:action name="contrast">
	<img:param name="amount" value="10" />

The advantage in the above case is that no more tags are necessary.
These generic ones will work for all actions.
To add a new action, all we need to add is the ImageAction Class only.

The disadvantage is that it has very poor validation.
Errors are detected only when trying to generate images.

OR we can have specific tags (for nested action tags only) such as

:> 	    <img:contrast value="10"/>
:> 	    <img:border width="5" color="#888888"/>
:> 	    <img:text value="Text!" valign="bottom" font="serif" size="8"/>

Here is advantage is the tighter specification where the tag specification
will force some required parameters.
However we will have to add tags for each action (not a great task though)

I am for Shawn's following modification too...
Web designers know colors in a hex format and we could reuse many keywords
from html itself for our tags too.

was a relevant article.

:> Other, more minor included modifications:
:>   - more HTML-like attribute names (e.g., "width" instead of "thickness")
:>   - HTML-style color specification ("#888888" instead of "125")

It is also better to iterate through the folder than specifying a whole
folder of images in a tag.

:> Also, what do you mean by "can be a file or folder"?  If we want
:> thumbnailing as a particular feature, I'd suggest that be a specific tag,
:> or perhaps an explicit iteration (using JSTL):
:> 	<file:directory path="/foo" var="dir">
:> 	<c:forEach items="$dir" var="file">
:> 	   <img:thumbnail src="$file"/>
:> 	</c:forEach>

I would like to know what all of you think.
Please post your comments too..

Abey M. Mullassery
e: abey@mullassery.com
w: http://www.Mullassery.com
Live; Don't just exist.

To unsubscribe, e-mail:   <mailto:taglibs-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:taglibs-dev-help@jakarta.apache.org>

View raw message