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



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to