I do something like this:

<app:MemberSelect id="memberVector">ORDER BY LASTNAME,
FIRSTNAME</app:MemberSelect>
<logic:present name="memberVector">
  <logic:iterate id="member" type="classname here" name="memberVector">
          do stuff here
  </logic:iterate>
</logic:present>
<logic:notpresent>
  Whine here
</logic:notpresent>

The trick is that the MemberSelectTag returns null, not an empty Vector, if
it doesn't find any matching records.

----- Original Message -----
From: "Richard Raquepo" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, February 20, 2003 10:04 PM
Subject: Help in Logic Tag


i want to be able to show a message like
"No records found" is there was no records found or logic/iterate did not do
any iteration.

Can anybody provide us a solution to this kind of problem?

thanks a lot!.

i have this in my JSP:

 <logic:iterate id="referralsInfo" name="referralsinfos">
    <tr>
      <td width="0%">&nbsp;</td>
      <td width="15%" class="tablecontentdata">
       &nbsp;<bean:write name="referralsInfo" property="lastname"/>
      </td>
      <td width="16%" class="tablecontentdata">
       &nbsp;<bean:write name="referralsInfo" property="name"/>
      </td>
      <td width="11%" class="tablecontentdata">
       &nbsp;<bean:write name="referralsInfo" property="mi"/>
      </td>
      <td width="14%" class="tablecontentdata">
       &nbsp;<bean:write name="referralsInfo" property="phone"/>
      </td>
      <td width="19%" class="tablecontentdata">
       &nbsp;<bean:write name="referralsInfo" property="mobile"/>
      </td>
      <td width="25%">&nbsp;</td>
     </tr>
 </logic:iterate>


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

Reply via email to