Basic JSTL Question...

2003-11-06 Thread Jacob Wilson
Hi...
I would appreciate if someone out there helps me with these basic JSTL questions...
 
1. In c:foreach how do I check whether the collection contains values??? When it has 
values, it iterates a loop fine... Now, if I want to specify 'No records' how do I do 
that???
 
2. How do I check condition.s.. for eg.
 
I wanna alternate row colors... when I do  this, it doesn't work...
c:when test=${ (count.index%2) != 0 }
  tr bgcolor=aa
/c:when 
c:otherwise
  tr bgcolor=bb
/c:otherwise
Wat's the right way to do this???

Thanx.
-Jacob



-
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard

RE: Basic JSTL Question...

2003-11-06 Thread Arik Levin ( Tikal )
1) See operators (empty)
http://developer.java.sun.com/developer/technicalArticles/javaserverpages/fa
ster/

2) it goes : c:choose c:when/c:when c:otherwise/c:otherwise
/c:choose


-Original Message-
From: Jacob Wilson [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 06, 2003 1:04 PM
To: [EMAIL PROTECTED]
Subject: Basic JSTL Question...

Hi...
I would appreciate if someone out there helps me with these basic JSTL
questions...
 
1. In c:foreach how do I check whether the collection contains values???
When it has values, it iterates a loop fine... Now, if I want to specify 'No
records' how do I do that???
 
2. How do I check condition.s.. for eg.
 
I wanna alternate row colors... when I do  this, it doesn't work...
c:when test=${ (count.index%2) != 0 }
  tr bgcolor=aa
/c:when 
c:otherwise
  tr bgcolor=bb
/c:otherwise
Wat's the right way to do this???

Thanx.
-Jacob



-
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard

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



Re: Basic JSTL Question...

2003-11-06 Thread Martin Cooper

Jacob Wilson [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Hi...
 I would appreciate if someone out there helps me with these basic JSTL
questions...

JSTL questions should be addressed to taglibs-user, not struts-user. Please
respect the focus of this list, and any others you subscribe to.

--
Martin Cooper



 1. In c:foreach how do I check whether the collection contains values???
When it has values, it iterates a loop fine... Now, if I want to specify 'No
records' how do I do that???

 2. How do I check condition.s.. for eg.

 I wanna alternate row colors... when I do  this, it doesn't work...
 c:when test=${ (count.index%2) != 0 }
   tr bgcolor=aa
 /c:when
 c:otherwise
   tr bgcolor=bb
 /c:otherwise
 Wat's the right way to do this???

 Thanx.
 -Jacob



 -
 Do you Yahoo!?
 Protect your identity with Yahoo! Mail AddressGuard




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