Re: Niall's if/then/else tags and switch/case/default?

2001-09-10 Thread Ted Husted

It's my personal belief that Struts is best positioned as a lightweight
framework that fills in the gaps between other technologies. If we
continue to work on general-purpose tags here, I believe it sends the
wrong message.

Since we have already moved the bean-utils and digester to the commons,
do we want to propose the Struts-Logic and Struts-Bean libraries to
Jakata Taglibs?

I do not personally feel a need for advanced logic constructs, but have
no qualm with people who do. If we moved the Struts-logic tags to
Jakarta Taglibs, and Niall wanted to work on them there, then everyone
would be happy. 

We would just have to decide what to do about the three tags here that
are Struts reliant: logic:forward, logic:redirect, and bean:struts. The
simplest thing might be to just move them into Struts-HTML.

We might also think about packaging the tags in a separate JAR, so that
there would be a struts.jar and struts-tags.jar. We could then offer a
struts-tags10.jar to people who didn't want to change over to the
Jakarta Taglibs versions right way. This would also give us more
flexibility later as the taglibs undergo more drastic changes when JSPTL
shakes out.


-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel +1 716 737-3463
-- http://www.husted.com/about/struts/



RE: Niall's if/then/else tags and switch/case/default?

2001-09-09 Thread Niall Pemberton

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: [EMAIL PROTECTED]
 Subject: Re: Niall's if/then/else tags?




 On Thu, 6 Sep 2001 [EMAIL PROTECTED] wrote:

  Date: Thu, 6 Sep 2001 20:49:36 -0700
  From: [EMAIL PROTECTED]
  Reply-To: [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  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 [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  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.
  
   [EMAIL PROTECTED] wrote:
   
Hi.  Just wondering what the status is on Niall's IF/THEN/ELSE tags
  being added
to the nightly build?
   
Cheers,
   
Dave