[prev in list] [next in list] [prev in thread] [next in thread]
List: struts-user
Subject: Re: if("N".equals(<bean:write name="college" property="noLunch"/>)),can I?
From: "Martin Gainty" <mgainty () hotmail ! com>
Date: 2006-10-31 13:45:10
Message-ID: BAY119-DAV10D06181E6D682BAA89097AEF90 () phx ! gbl
[Download RAW message or body]
Mallik/Dave
be aware of upperCase/lowerCase lexical compares
you can use a variable which stores the param and then test the value later on as \
in.. <c:set var="parameterVal" value="${param[" NoLunch"]}" />
<!-- %
if( "N".equals( <bean:write name="collegeDetails" property="noLunch"/> ))
{
% -->
<%
if ("N".equals(parameterVal))
%>
Anyone else?
Martin --
This e-mail communication and any attachments may contain confidential and privileged \
information for the use of the designated recipients named above. If you are not the \
intended recipient, you are hereby notified that you have received this communication \
in error and that any review, disclosure, dissemination, distribution or copying of \
it or its contents
----- Original Message -----
From: "Dave Newton" <DNewton@hibbertgroup.com>
To: "Struts Users Mailing List" <user@struts.apache.org>
Sent: Tuesday, October 31, 2006 8:06 AM
Subject: RE: if("N".equals(<bean:write name="college" property="noLunch"/>)),can I?
From: Mallik [mailto:malli345@yahoo.com]
> how can i do this ?
I have taken the liberty of formatting your included code to a) be
left-aligned, thus a bit more readable and b) including only the
information necessary to answer your question. Any errors introduced by
this reformatting are mine and I apologize if it is now more difficult
to meet somebody's byte quota for the day.
> <logic:iterate id="college" name="COLLEGEDETAILS">
> <%
> if ("N".equals(<bean:write name="collegeDetails"
property="noLunch"/>)) { %>
> <!-- Do something based on comparison. -->
> </logic:iterate>
You may want to look at the <logic:equal...> tag.
http://struts.apache.org/1.2.x/userGuide/struts-logic.html#equal
I'd consider using JSTL, though.
Mind you, you don't actually say what doesn't work, so much beyond this
will be problematic, but I am also suspicious of referencing both
"collegeDetails" and "COLLEGEDETAILS".
Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic