struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Niall Pemberton" <niall.pember...@btInternet.com>
Subject RE: Niall's if/then/else tags and switch/case/default?
Date Sun, 09 Sep 2001 23:27:20 GMT
I dont know how good JSPTL is because its dependant on Tomcat 4 (and/or JSP
1.2) and thats where the problem lies - we are using Tomcat 3 so I haven't
looked at it. When Nivarna comes and JSPTL is part of the JSP spec (1.3
perhaps?) and everyones using servlet containers that support it then this
stuff is redundant.

The question is, when is that going to be and whats the best thing to do in
the meantime for a) people using JSP 1.1 and b) people using JSP 1.2?

My tags also included a switch/case/default which is equivalent to the
choose/when/otherwise pattern in JSPTL and the if/else also supports
and/or/elseif tags.

I could re-engineer the if/else/elseif to not need a "then" and I believe
this would make them as elegant as they could be. However its not worth it
if theres no enthusiasm for the tags and everyones either switching to JSPTL
or happy to go with whats already there (scriptlet or the current logics
tags) until they switch to JSPTL.

Niall


> -----Original Message-----
> From: craigmcc@localhost [mailto:craigmcc@localhost]On Behalf Of Craig
> R. McClanahan
> Sent: 07 September 2001 07:17
> To: struts-dev@jakarta.apache.org
> Subject: Re: Niall's if/then/else tags?
>
>
>
>
> On Thu, 6 Sep 2001 martin.cooper@tumbleweed.com wrote:
>
> > Date: Thu, 6 Sep 2001 20:49:36 -0700
> > From: martin.cooper@tumbleweed.com
> > Reply-To: struts-dev@jakarta.apache.org
> > To: struts-dev@jakarta.apache.org
> > Subject: Re: Niall's if/then/else tags?
> >
> > I agree with this. In particular, I'd like to see tags of this type
> > incorporated in JSPTL. They currently have <if>, and
> > <choose>/<when>/<otherwise>, but no explicit <then> or <else>
> (although I
> > believe those can be constructed from the others).
> >
>
> The if/then/else pattern can indeed be constructed from
> choose/when/otherwise tags in JSPTL.
>
> The reason that Struts never had an "else" tag in the first place is that
> the syntax choices were all incredibly ugly, IMHO, given the restrictions
> on the way you need to nest things to make it work.  The
> choose/when/otherwise pattern in JSPTL is the least objectionable, and has
> the additional advantage of gracefully implementing if ... else if ...
> else if ... type patterns as well.
>
> Given that choose/when/otherwise does this (and more), I would be somewhat
> surprised if the JSPTL expert group was willing to consider adding
> explicit if/then/else tags as well (because they would be redundant).  But
> the best way to find that out would be to provide feedback on the JSPTL
> early access release (available via <http://jakarta.apache.org/taglibs>)
> to the email address included in the docs.
>
> > --
> > Martin Cooper
> >
>
> Craig
>
>
> >
> > ----- Original Message -----
> > From: "Ted Husted" <husted@apache.org>
> > To: <struts-dev@jakarta.apache.org>
> > Sent: Thursday, September 06, 2001 12:57 PM
> > Subject: Re: Niall's if/then/else tags?
> >
> >
> > > My take on this is here
> > >
> > > <
> > >
> http://www.mail-archive.com/struts-user@jakarta.apache.org/msg14158.html
> > > >
> > >
> > > I'm personally not in favor of distributing tags with Struts
> that do not
> > > depend on Struts application resoures (mappings, messages). General
> > > purpose tags can be hosted at Jakarta Taglibs. At some point,
> the Struts
> > > bean and logic tags will end up over there too.
> > >
> > > If someone wanted to re-package the Struts logic tags for Jarkarta
> > > Taglibs, and included Nial's extensions, I'm sure they would be well
> > > received. Ditto for the bean tags. They already have i18n and
> form tags
> > > that are similar to the Struts versions.
> > >
> > > -Ted.
> > >
> > > dhay@lexmark.com wrote:
> > > >
> > > > Hi.  Just wondering what the status is on Niall's IF/THEN/ELSE tags
> > being added
> > > > to the nightly build?
> > > >
> > > > Cheers,
> > > >
> > > > Dave
> >
> >
> >
>


Mime
View raw message