RE: Re: Embedded bean/param values

2001-08-03 Thread Dudley [EMAIL PROTECTED]

Hi There

Excuse my ignorance, but what is JSPTL?

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 03, 2001 11:08 AM
To: [EMAIL PROTECTED]
Subject: RE: Re: Embedded bean/param values


> Using your example:
> 
>">
> 
> This could be done in JSPTL in the following way:
> 
>   
>   

I missed that on my brief tour of the JSPTL docs. Yes,
that does solve the problem.

> Would that make you dance on your desk? ;-)

Hmm... not sure. Dancing is usually reserved for elegant
solutions. This works but still looks too much like
a hack. Most important, though, is that the problem at
least has a possible solution now. So it's certainly
worth a little jig. ;-)

Devon


**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**



Re: Embedded bean/param values

2001-08-03 Thread Pierre Delisle

Hi Devon,

See below...

[EMAIL PROTECTED] wrote:
> 
> > JSPTL allows you to do the following by using the Simplest
> > Possible Expression Language (SPEL) provided with the
> > reference implementation:
> >
> >   
> >   
> 
> The above examples make things prettier but don't really
> add much functionality over JSP expressions. The original
> author in this thread was looking for something like:
> 
>   
> 
> The problem is that the example isn't very good because it
> is only a  which is pretty much just a lookup
> and can be handled with JSP expressions. But if we take
> another example such as:
> 
>   ">
> 
> The problem is clearer. The  taglib adds some
> significant functionality and isn't just a bean access. Stuff
> like this has caused me endless frustration.
> 
> If SPEL had some way of calling a taglib as if it were a
> function, I'd be dancing on my desk. Something like:
> 
>   
> 
> Seems like the hardest part of adding this is coming up with
> a reasonable syntax. But I don't believe it's been done yet.
> I do note, however, that that JSPTL provides a way of plugging
> in expression languages. So maybe this will encourage future
> experimentation in this direction.
> 
> Devon

Using your example:

   ">

This could be done in JSPTL in the following way:

  
  

Would that make you dance on your desk? ;-)

-- Pierre


>From the JSPTL docs:

Setting the value of a JSP scoped attribute from the tag's body content  
is useful to solve the problem associated with the fact that a tag 
attribute's value cannot be set from a tag. In the past, a tag developer
would have to offer extra "attributes as tags" so the value of these attributes 
could be set from other tags. For example: 

   
mumbojumbo 
   

With the  tag, this can be handled without requiring the extra  tag. 

  mumbojumbo 
  



RE: Re: Embedded bean/param values

2001-07-31 Thread devon . bowen

> JSPTL allows you to do the following by using the Simplest
> Possible Expression Language (SPEL) provided with the
> reference implementation:
>
>   
>   

The above examples make things prettier but don't really
add much functionality over JSP expressions. The original
author in this thread was looking for something like:

  

The problem is that the example isn't very good because it
is only a  which is pretty much just a lookup
and can be handled with JSP expressions. But if we take
another example such as:

  ">

The problem is clearer. The  taglib adds some
significant functionality and isn't just a bean access. Stuff
like this has caused me endless frustration.

If SPEL had some way of calling a taglib as if it were a
function, I'd be dancing on my desk. Something like:

  

Seems like the hardest part of adding this is coming up with
a reasonable syntax. But I don't believe it's been done yet.
I do note, however, that that JSPTL provides a way of plugging
in expression languages. So maybe this will encourage future
experimentation in this direction.

Devon




Re: Embedded bean/param values

2001-07-30 Thread Pierre Delisle



"Craig R. McClanahan" wrote:
> 
> On Tue, 17 Jul 2001, Nino Walker wrote:
> 
> > Hi,
> >
> > I've noticed a number of postings asking about syntax using embedded
> > tags, a la: 
> > .../>
> >
> > It's clear that this is not supported, but has anyone implemented a
> > different solution to address this?
> >
> 
> In case people aren't aware, it's a restriction in the JSP spec ... and,
> the ultimate reason is that it's invalid XML syntax as well.
> 
> > I'm coming form the world of ATG/JHTML, where they support syntax like:
> >  and  > attribute="param:ParamName">
> >
> 
> The standard approach to this requirment in JSP is to use runtime
> expressions.  Where you might want to write
> 
>   " />
> 
> you can write this instead:
> 
>   
>   
> 
> > This has been very convenient, and I'm curious if there are solutions
> > existing, or on the horizon, that solve this problem.

Yes. Have a look at JSPTL
(http://jakarta.apache.org/taglibs/doc/jsptl-doc/jsptl-ea1/index.html).

JSPTL allows you to do the following by using the Simplest
Possible Expression Language (SPEL) provided with the reference 
implementation:

  
  

-- Pierre


> >
> > Thanks,
> >
> > Nino
> >
> >
> 
> Craig



Re: Embedded bean/param values

2001-07-30 Thread Craig R. McClanahan



On Tue, 17 Jul 2001, Nino Walker wrote:

> Hi,
> 
> I've noticed a number of postings asking about syntax using embedded
> tags, a la: 
> .../>
> 
> It's clear that this is not supported, but has anyone implemented a
> different solution to address this?
> 

In case people aren't aware, it's a restriction in the JSP spec ... and,
the ultimate reason is that it's invalid XML syntax as well.

> I'm coming form the world of ATG/JHTML, where they support syntax like:
>  and  attribute="param:ParamName">
> 

The standard approach to this requirment in JSP is to use runtime
expressions.  Where you might want to write

  " />

you can write this instead:

  
  

> This has been very convenient, and I'm curious if there are solutions
> existing, or on the horizon, that solve this problem.
> 
> Thanks,
> 
> Nino
> 
> 

Craig