Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Comparing values in logic:iterator

 
Anurag Mishra
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Sheldon Fernandes
Ranch Hand
Posts: 157
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic