RE: Random tag library - dynamic range

"Eran Kalmanson" <[email protected]>
Newsgroups gmane.comp.jakarta.taglibs.user
Message-ID <006401c7c49b$91cf5ed0$0801a8c0@yaniv22c2b2296>
First of all, thanks Kris.

Sadly though, it didn't work. 

I keep getting the same error, even though I changed the TLD:
/WEB-INF/tags/scene4.tag(124,2) According to TLD or attribute directive in
tag file, attribute range does not accept any expressions


Eran

-----Original Message-----
From: Kris Schneider [mailto:[email protected]] 
Sent: Thursday, July 12, 2007 5:41 PM
To: Tag Libraries Users List
Subject: Re: Random tag library - dynamic range

Looking at the docs
(http://jakarta.apache.org/taglibs/doc/random-doc/index.html), it doesn't
appear that the taglib really supports request-time attr values. Strange.
Personally, I'd grab the TLD and change this:

<tag>
    <name>number</name>
    ...
    <attribute>
      <name>range</name>
      <required>no</required>
      <rtexprvalue>no</rtexprvalue>
    </attribute>
    ...

to this:

<tag>
    <name>number</name>
    ...
    <attribute>
      <name>range</name>
      <required>no</required>
      <rtexprvalue>yes</rtexprvalue>
    </attribute>
    ...

and see what happens...

Quoting Eran Kalmanson <[email protected]>:

> Howdy,
> 
>  
> 
> I've been having difficulties with the random taglib. I'm interested in
> getting a random number using a dynamic range. However I can't find a way
to
> do that.
> 
>  
> 
> I've tried
> 
>  
> 
> <c:set var="top" value="43" />
> 
>  
> 
> <rand:number id="randNumber" range="1-${top}" />
> 
>  
> 
> Didn't work. Syntax error.
> 
>  
> 
> I've also tried
> 
>  
> 
> <c:set var="range" value="1-43" />
> 
>  
> 
> <rand:number id="randNumber" range="${range}" />
> 
>  
> 
> Didn't work either. Couldn't find anything relevant on the web. Would love
> some help with that.
> 
>  
> 
> Thanks,
> 
> Eran Kalmanson

-- 
Kris Schneider <mailto:[email protected]>
D.O.Tech       <http://www.dotech.com/>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]





-- 
No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.476 / Virus Database: 269.10.4/897 - Release Date: 7/11/2007
9:57 PM
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.