jakarta-taglibs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joseph B. Ottinger" <j...@epesh.com>
Subject RE: taglib roadmap and practices
Date Fri, 22 Dec 2000 01:26:29 GMT
This is getting too deep for convenient quoting!

I like the idea of using <jsp:setProperty /> for local tags,
but... something in me rebels. It changes the focus of setproperty from
the page/session/application scope to include a tag scope, and while
possibly workable, it doesn't seem very orthogonal.

Note that for the jakarta taglibs project, it doesn't matter WHAT *I*
think - I'm a member of the list, not a committer or on any boards here. I
*am* on the JSR-052 committee, which was why I mentioned it in the first
thread, but it makes sense (to *me*, anyway, heh heh) to pay attention to
the body of work already existing... which means considering what Mike
Cannon-Brookes and I (and others!) have done with the IN16 project on
sourceforge, jakarta, and other possible contributors.

BTW, the roadmap I mentioned, while still VERY skimpy, can be found at
http://epesh.com/tagroadmap.html :)

On Thu, 21 Dec 2000 mdelagra@us.britannica.com wrote:

> Hi all, 
> Sorry for the truncation.  It a long thread! 
> > ... 
> > I agree as far as the coding target - the attributes are 
> > familiar, they're 
> > easier, they're shorter, they're far less likely to alienate 
> > those who are 
> > only HTML programmers and yet don't use tools to generate 
> > everything. However... I don't think an additional variable addressing
> > scheme is good for JSP (<mail:send to="$recipient">..</mail:send>),

> > although that *does* address one aspect of the need. 
> > 
> > The most direct solution is to relax the ability to use tags inside 
> > attributes where rtexprvalue is true; to wit: 
> > 
> > <mail:send 
> >   to="<jsp:getProperty name="recipient" property="email" />" 
> >   ... 
> > > 
> >   ... 
> > </mail:send> 
> > ... 
> That's an interesting idea, although including tags within attributes is
> not very XML-like.  Another way to relax the spec, which would
> accomplish the same end in many cases, would be to allow the
> <jsp:setProperty ../> tag to have a body in lieu of a "value" attribute.
> Consider what kind of flexibility that would provide in conjunction with
> the TagExtraInfo interface:
> <mail:send id="mail"> 
>   <jsp:setProperty name="mail"
> property="smtp-server"><DEFANGED_application:initparmeter
> name="smtp-server"/></jsp:setProperty> 
>   <jsp:setProperty name="mail" property="user">joeo</jsp:setProperty> 
>   <jsp:setProperty name="mail"
> property="password">blankman</jsp:setProperty> 
>   <jsp:setProperty name="mail"
> property="to"><%=userEmail%></jsp:setProperty> 
>   <jsp:setProperty name="mail" property="subject">An email for
> <%=userName%></jsp:setProperty> 
>   <%-- a separate tag for the body eliminates unwanted whitespace --%> 
>   <jsp:setProperty name="mail" property="body">This is a
> test.</jsp:setProperty> 
> </mail:send> 
> Note that you get the flexibility of elements without having to write
> extra tags.  The lack of extra tags also makes it more IDE-friendly
> (particularly for a Java-enabled IDE, which could retrieve the potential
> getter/setter properties via reflection).  The principal drawback is
> that you can't use a TLD to insure that the configuration parameters are
> set at compile-time.

Joseph B. Ottinger                           joeo@epesh.com
http://epesh.com/                             IT Consultant

View raw message