Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Struts 2 »

RE: How To Use Existing Tags to Test and Write Out the Value of
the Size of a Collection?

Kalcevich, Daniel

2006-03-06


You can use the <logic:greaterThan>, <logic:greaterEqual>,
<logic:lessThan> or <logic:lessEqual> tags.

http://struts.apache.org//struts-doc-1.2.8/userGuide/struts-logic.html#g
reaterThan


-----Original Message-----
From: Caroline Jen [mailto:jiapei_jen@(protected)]
Sent: Monday, March 06, 2006 11:06 AM
To: user@(protected)
Subject: How To Use Existing Tags to Test and Write Out the Value of the
Size of a Collection?

I have a Collection called 'remarks'. I can use the
<logic:notEmpty> or <logic:empty> tags to test out if
the Collection has some elements in it or not.

1. Is there any tag I can use to test the size value
of that Collection to be zero or greater than zero?
Or I have to use the Java code in my JSP page?

2. Is there any tag I can use to output the

 remarks.size();

 to the browser?

I simply think that it should not be too much Java
code in a JSP page.  


 


__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

©2008 junlu.com - Jax Systems, LLC, U.S.A.