You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Richard Murray <Ri...@qspgroup.com> on 2001/05/04 11:29:59 UTC
nesting logic:equals tags
Hi,
I'm iterating over an array of Strings containing the following dummy data {
"1", "2", "3", "4", "true", "6", "7"}. I want to apply the following logic:
if the String is "true" or "false" display a checkbox, else display the
String.
I attempted to nest the tags as follows, but this does not work:
<struts_logic:equal value="true" name="element">
<struts_logic:equal value="false" name="element">
<td class=row><input type=checkbox></td>
</struts_logic:equal>
</struts_logic:equal>
I can only get this working as shown below:
<struts_logic:iterate id="element" name="rows">
<struts_logic:equal value="true" name="element">
<td class=row><input type=checkbox checked></td>
</struts_logic:equal>
<struts_logic:equal value="false" name="element">
<td class=row><input type=checkbox></td>
</struts_logic:equal>
</struts_logic:notEqual value="true" name="element">
</struts_logic:notEqual value="false" name="element">
<td class=row><struts_bean:write
name="element"/></td>
</struts_logic:equal>
</struts_logic:equal>
</struts_logic:iterate>
However, this does not work properly as I have nested the notEquals logic
tags.
Is there a way to nest these tags or supply conditional operators ( e.g. &&,
|| ). Is there anyway to supply an else statement. I'm not sure I can
achieve what I want with these tags and may be better of with a scriptlet.
Hope someone can help.
Richard.
**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager at ExchangeAdmin@qspgroup.com
This footnote also confirms that this email message has been swept by
for the presence of computer viruses.
http://www.qspgroup.com
**********************************************************************