You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Kamholz, Keith (corp-staff) USX" <kk...@moog.com> on 2003/05/30 16:52:32 UTC

Nesting logic tags

Hey,
I'm using a table to display a form, but there's one row that I want to
hide, depending on a previous user selection.
Right now, my code is:

<table>
	<tr>
		<td>
			<b>
				<bean:message key="app.label.numberType"/>: 
			</b>
		</td>
		<td>
			<html:hidden name="ansm" property="numberType"
write="true"/>
		</td>
	</tr>
	
	<logic:equal value="subformat" name="ansm" property="entryType">
		<tr>
			<td>
				<b>
					<bean:message
key="app.label.subType"/>: 
				</b>
			</td>
			<td>
				<html:hidden name="ansm" property="subType"
write="true"/>
			</td>
		</tr>
	</logic:equal>
	
	<tr>
		<td>
			<b>
				<bean:message key="app.label.typeDesc"/>: 
			</b>
		</td>
		<td>
			<html:text name="ansm" property="typeDesc" size="50"
maxlength="50"/>
		</td>
	</tr>
	
	<logic:notEqual value="group" name="ansm" property="entryType">
		<tr>
			<td>
				<b>
					<bean:message
key="app.label.typeFormat"/>: 
				</b>
			</td>
			<td>
				<html:text name="ansm" property="typeFormat"
size="60" maxlength="60"/>
			</td>
		</tr>
		<tr>
			<td>
				<b>
					<bean:message
key="app.label.tabulatedFormat"/>: 
				</b>
			</td>
			<td>
				<html:text name="ansm"
property="tabulatedFormat" size="60" maxlength="60"/>
			</td>
		<tr>
			<td>
				<b>
					<bean:message
key="app.label.lastUsed"/>: 
				</b>
			</td>
			<td>
				<html:text name="ansm" property="lastUsed"
size="30" maxlength="30"/>
			</td>
		</tr>
	</logic:notEqual>
	
</table>

Unfortunately, it doesn't like me nesting the logic tags in the table code.
I've never used the struts nested taglib, would this be an appropriate place
to use it?  If not, does anyone know of a workaround I could use?

Thanks in advance.


~ Keith

http://www.buffalo.edu/~kkamholz



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org