You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Michael Laufer <mi...@web.de> on 2001/03/04 19:08:15 UTC
Strange logic:notPresent behavoiur !!
Hi there,
I'm facing the following problem with the <logic:notPresent>-tag:
my code:
<logic:present name="traderForm" property="depot">
<table width="100%">
<logic:iterate id="stocks" name="traderForm" property="depot"
type="com.entory.personalus.struts.StockBean">
<tr>
<td align="center" width="20%"><font face="Arial"><bean:write
name="stocks"
property="name"/></td>
<td align="center" width="20%"><font face="Arial"><bean:write
name="stocks"
property="section"/></td>
<td align="center" width="20%"><font face="Arial"><bean:write
name="stocks"
property="number"/></td>
<td align="center" width="20%"><font face="Arial"><bean:write
name="stocks"
property="purchaseValue"/></td>
<td align="center" width="20%"><font face="Arial"><bean:write
name="stocks"
property="currentValue"/></td>
</tr>
</logic:iterate>
</table>
</logic:present>
<logic:notPresent name="traderForm" property="depot">
No data in the database!!!!
</logic:notPresent>
the <logic:present name="traderForm" property="depot"> part of the code
is working,
but the <logic:notPresent name="traderForm" property="depot">
unfortunately not, even if I make sure
that the "depot"-property is null, the programm's output isn't the
nested
"No data in the database!!!!"
Am I making something terribly wrong, or ... ?
Any help would be appreciated.
Thanks in advance.
Michel