use <choose></when>

On 5/13/06, J Gotsch <[EMAIL PROTECTED]> wrote:
Hello All,

  How do I perform an If/else with <logic:iterate> ?

  In the below logic:iterate tag, If my collection contains both ROLE1 AND 
ROLE2, Then both statements will be displayed. And that's now what I want.

  I want to implement something like this:

  if(securityRoleName.equals("ROLE1"))
    // print You have ROLE1 !
  else if (securityRoleName.equals("ROLE1"))
   //print You have ROLE2 !
  else
   //print you have NO ROLE!

  This is what I have now:

  <logic:iterate id="securityRoleTO" name="abc"
        property="xyz"    scope="session">
    <logic:present name="securityRoleTO">
      <logic:match name="securityRoleTO"
            property="securityRoleName" value="ROLE1">
         You have ROLE1 !
      </logic:match>
      <logic:match name="securityRoleTO"
            property="securityRoleName" value="ROLE2">
         You have ROLE1 !
      </logic:match>
      <logic:empty name="securityRoleTO"
            property="securityRoleName">
        You have no ROLE!
      </logic:empty>
    </logic:present>
  </logic:iterate>


---------------------------------
Blab-away for as little as 1¢/min. Make  PC-to-Phone Calls using Yahoo! 
Messenger with Voice.


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

Reply via email to