jakarta-taglibs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matti Härö <matti.h...@infosto.fi>
Subject Re: New fitIn tag for image taglib
Date Wed, 21 Apr 2004 05:19:29 GMT
This 'bestfit' solution is ok also, even though the handling of the resizetag
attributes and their combinations are now a bit cumbersome. Having two distinct
tags would be a cleaner solution, for the same reason you just mentioned in your
email: tag attribute handling in the resizetag (mandatory/non-mandatory in
various combinations). Now we get a lots of runtime exceptions, instead of
having a clever validation by the DTD.

Matti Härö


Lainaus Abey Mullassery <abey@mullassery.com>:

> 
> I added a boolean "bestfit" attribute to the ResizeTag. If it is set, the
> width and height should also be specified.
> It throws a JSPException if it both are not specified (just like the
> framework does) but I cannot make them mandatory in the tld file :(. I am
> already doing this kind of "dirty" checks in Resize since I cannot make any
> of its attributes mandatory in the tld file since it accepts different
> combinations as you have already seen. 
> 
> Would this suffice for now or do we need to split Resize into multiple tags?
> Let me know your opinion.
> 
> Thanks,
> 
> Abey Mullassery
> http://www.mullassery.com
> 
> 
> > ------------Original Message------------
> > From: Matti Härö <matti.haro@infosto.fi>
> > To: Tag Libraries Developers List <taglibs-dev@jakarta.apache.org>, Felipe
> Leme <jakartalists1@felipeal.net>
> > Cc: Abey Mullassery <abey@mullassery.com>
> > Date: Fri, Mar-26-2004 1:45 PM
> > Subject: Re: New fitIn tag for image taglib
> > 
> > Hello,
> > 
> > Lainaus Felipe Leme <jakartalists1@felipeal.net>:
> > 
> > > Regarding Resize and the new FitIn, I think it would be nice if they
> > > shared a common structure, say a super class called
> ResizableTagSupport,
> > > with setters for width, length and scale, an abstract method to do the
> > > calculations and doStartTag()/doEndTag().
> > 
> > This is basically a good idea. While considering the creation of a common
> > superclass, we need to remember the difference in handling the tag
> attributes:
> > 
> > 1) FitIn tag has two attributes (width and height) which are both
> mandatory.
> > 2) Resize tag has three attributes (width, height and scale), of which
> none
> > alone is mandatory. Resize tag accepts multiple different combinations of
> the
> > tag attributes (width only, height only, scale only, width and height
> together).
> > 
> > Best regards,
> > Matti Härö
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: taglibs-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: taglibs-dev-help@jakarta.apache.org
> > 
> > 
> 



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


Mime
View raw message