> -----Original Message-----
> From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 14, 2001 6:43 PM
> To: [EMAIL PROTECTED]; Dean Wampler (E-mail)
> Subject: Re: Proposal: Support nested tags where only
> attributes can be
> used
>
> On Thu, 14 Jun 2001, Dean Wampler wrote:
>
> > <h1>Title is
> >   <bean:message>
> >     <bean:key>
> >       <template:get name="pageName"/>.title
> >     </bean:key>
> >   </bean:message>
> > </h1>
> >
>
> There's a pretty significant problem with this -- the JSP
> page compiler
> will consider ".title" to be template text, and will just
> copy it to the
> output page.

This isn't fundamentally different than the way tags like <logic:notPresent>
work, which conditionally suppress writing template text to the output page.
In my case, <bean:key> returns "SKIP_BODY" in "doEndTag()", similar to the
way the <logic:*> conditional tags are implemented.

>
> That's not to say we couldn't make the <bean:message> tag
> smarter about
> where it gets its key from, but we have to obey the rules of
> the language
> we're writing for.  The typical way to deal with dynamic
> stuff at runtime
> is to use a runtime expression.

I'm not sure which JSP rules are being broken here, but isn't it true that
one of the goals of taglibs is to "off-load" Java logic from pages, to
separate the presentation aspects from code, to encapsulate code behavior
into markup tags?  As we all know, it's a real problem for web designers and
coders to collaborate on the same web pages, where I insert Java expressions
in places and they do the usually HTML magic.  If I can give my web
designers tags to use with minimal embedded Java expressions, that's a major
step forward.

It's true that the <bean:key> syntax I've shown is a bit verbose, etc., but
you only have to use it when you want the sort of dynamic behavior I'm
after.  Otherwise, you would be better off sticking with <bean:message
key="..."/>.

>
> > ... (old stuff removed) ...
>
> You might want to have a look at the JSP Specification as
> well.  Some of
> the things you discuss are just plain not legal in JSP.

I'll review the JSP spec. I admit that I'm approaching this with a more XML
frame of reference.

Thanks,
dean

>
> > Thanks,
> > dean
> >
> > Dean Wampler, Ph.D.
> > [EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>
> > http://www.powerhousetechnology.com/
> >
> > I want my tombstone to say:
> >
> >   Unknown Application Error in Dean Wampler.exe.
> >   Application Terminated.
> >                                                  [OK] [Cancel]
> >
> >
> Craig
>
>
>

Reply via email to