wood burning stoves 2.0*
The moose likes Struts and the fly likes Comparing values in logic:iterator Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Comparing values in logic:iterator" Watch "Comparing values in logic:iterator" New topic
Author

Comparing values in logic:iterator

Anurag Mishra
Ranch Hand

Joined: Jun 16, 2003
Posts: 121
Hi All,

How I can compare Values in a Vector when I am using logic:iterator tag?

Like this

<logic:iterate id="timeDetails" name="employeeTime"property="empTimeSchedules">

<bean:write property="StartTime" name="timeDetails"/>-<bean:write property="StopTime" name="timeDetails"/>
/** Comparison here */
<%
if(StartTime == StopTime){
}
else{
}
%>
</logic:iterate>

Can anyone tell me how can I compare these two Values??

Thanks in advance.


SCJP 1.2
Sheldon Fernandes
Ranch Hand

Joined: Aug 18, 2004
Posts: 157
You can use struts <logic:equal> and <logic:notEqual> tag libraries.

A lot of people from this forum recommend using JSTL. I have not yet started using it, but I think <c:if> and <c:choose> would satisfy your requirement.

Sheldon
 
Don't get me started about those stupid light bulbs.
 
subject: Comparing values in logic:iterator
 
Similar Threads
logic:iterate and objects containing objects
Struts TextBoxes
help :how to get value from logic:iterate
Accessing a list within a List
logic:iterate & DTO Problem