You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Joe Zendle <jo...@vericept.com> on 2003/07/09 23:20:09 UTC
logic:empty inside logic:iterate
I'm trying to display a checkbox only if a field is not empty. This
logic is applied in a <logic:iterate> tag as in the code below. No
matter what the property values are, the checkbox is always displayed as
if the logic check is not made. I have tried logic:empty,
logic:notEmpty, logic:equals, logic:notEquals and I always get the same
result - the checkbox is always displayed. Am I doing something in
non-kosher manner?
Thanks in advance.
Joe
<table border="0" cellpadding="0" cellspacing="0" class="form_block
width="544">
<tr>
<td class="form_title">Address</td>
<td class="form_title">Description</td>
<td class="form_title">Delete</td></tr>
<logic:iterate id="address" indexId="i" name="EmailSettingsForm"
property="addresses">
<tr>
<td>
<html:text property='<%= "addresses[" + i + "].emailAddress" %>'
/>
</td>
<td>
<html:text property='<%= "addresses[" + i + "].description" %>'/>
</td>
<logic:notEmpty name="address" property="emailAddress"/>
<html:checkbox property='<%= "addresses[" + i + "].deleteFlag"
%>'/>
</logic:notEmpty>
</td>
</tr>
</logic:iterate>
<tr>
<td colspan="3"> </td>
</tr>
<tr>
<td colspan="3"><h6> </h6></td>
</tr>
<tr><td> </td><td class="form_field"> <html:submit
property="btnSubmit" value="OK"/> <html:reset value="Cancel"
/></td><td> </td></tr>
</table>
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org