You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Shabada, Gnaneshwer" <sh...@toysrus.com> on 2004/10/21 20:56:51 UTC

tag

Hello,
In my application, I am trying to set a "exportIndex" variable to a "true"
or "false" value based on if the member is admin level or not. And I want to
use this "exportIndex" value to display or not display one of my attributes
in table. I am using <display:table> from DisplayTag. I am using
<bean:define> to this but its not picking the value. Can some one give me
some input on what is wrong here..

JSP code:

	<logic:equal name="member" property="accessLevel" value="1">
			<bean:define id="exportIndex" value="true"/>
	</logic:equal>
	<logic:notEqual name="member" property="accessLevel" value="1">
		<bean:define id="exportIndex" value="false"/>
	</logic:notEqual>

	<html:form action="/deleteRegistration" >
		<td rowspan="2" colspan="2" valign="top" height="200">
		<TABLE border="1" cellspacing="0" cellpadding="0"
width="100%">
		<TBODY>
		<TR>
		<TD> 
		<display:table name="sessionScope.searchResults"
pagesize="5" defaultsort="1" defaultorder="descending"
export="{exportIndex}"
	
id="register">
			<logic:equal name="member" property="accessLevel"
value="1">
			<display:column property="lastName" title="Last
Name" sortable="true" headerClass="sortable"
href="/registration/viewRegistration.do" paramId="memberName"
paramProperty="memberName" />
			</logic:equal>
			<logic:notEqual name="member" property="accessLevel"
value="1">
			<display:column property="lastName" title="Last
Name" sortable="true" headerClass="sortable"  
	
paramId="memberName" paramProperty="memberName" />
			</logic:notEqual>

	</display:table>


The export attribute in the <display:table> tag does not pick up the
true/false value set in the bean:define tag. Not sure what is wrong here. 

Please help

TIA
Gnan

======================================================================== 
This email message is for the sole use of the intended recipient (s) and may
contain confidential and privileged information. Any unauthorized review,
use, disclosure or distribution is prohibited. If you are not the intended
recipient, please contact the sender by reply email and destroy all copies
of the original message. To reply to our email administrator directly, send
an email to EmailAdmin@toysrus.com. 
Toys "R" Us, Inc.

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