struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bill Page <Bi...@DigitalGarden.com>
Subject RE: <logic:equal> within <logic:iterate>
Date Fri, 19 Apr 2002 13:19:57 GMT
something like this?

    <logic:iterate name="DisplayJobBriefForm" property="skillList" id="list"
type="JobBriefSkillBean">
    <tr>
        <td><bean:write name="list" property="name"/></td>
<%
 
if(list.getRequiredInd().equalsIgnoreCase(dgApplication.SKILL_IS_REQUIRED_AL
L_REQS))
            out.println("<td>" +
ServletUtilities.getResourceMessage(pageContext,
"jobbrief.label.skill.required.allreq")+ "</td>");
        else
if(list.getRequiredInd().equalsIgnoreCase(dgApplication.SKILL_IS_REQUIRED_SO
METIMES))
            out.println("<td>" +
ServletUtilities.getResourceMessage(pageContext,
"jobbrief.label.skill.required.somereq")+ "</td>");
        else
if(list.getRequiredInd().equalsIgnoreCase(dgApplication.SKILL_IS_REQUIRED_OR
_DESIRED))
            out.println("<td>" +
ServletUtilities.getResourceMessage(pageContext,
"jobbrief.label.skill.required.req_or_des")+ "</td>");
        else
if(list.getRequiredInd().equalsIgnoreCase(dgApplication.SKILL_IS_DESIRED))
            out.println("<td>" +
ServletUtilities.getResourceMessage(pageContext,
"jobbrief.label.skill.required.desired")+ "</td>");

%>
    </tr>
    </logic:iterate>

> -----Original Message-----
> From: Ric Searle [mailto:ric@dialogue.co.uk]
> Sent: Friday, April 19, 2002 8:58 AM
> To: struts-user@jakarta.apache.org
> Subject: <logic:equal> within <logic:iterate>
> 
> 
> Hi,
> 
> I'm sure someone has an easy answer to this.  I'm using the 
> <logic:iterate> tag, and depending on the value of an 
> attribute of one 
> of the beans the iterate returns (i.e. the value of an 
> attribute of one 
> of the objects in the collection I'm iterating through), I want to do 
> something.  The code snippet...
> 
> -------------------------------------------
> <logic:iterate id="app" name="user" property="applications">
> 	<image src="blank.gif" width="10" height="1">
> 	
> 	<logic:equal name="app" property="populated" scope="request" 
> value="true">
> 		[populated]
> 	</logic:equal>
> 
> 	<bean:write name="app" property="name" filter="true"/><br>
> 	<logic:iterate id="prodList" name="app" property="productLists">
> 		<image src="blank.gif" width="30" height="1">
> 		<bean:write name="prodList" property="name" 
> filter="true"/>
> 		<logic:iterate id="prod" name="prodList" 
> property="products">
> 			<image src="blank.gif" width="50" height="1">
> 			<bean:write name="prod" property="name" 
> filter="true"/>
> 		</logic:iterate>
> 	</logic:iterate>
> </logic:iterate>
> -------------------------------------------

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


Mime
View raw message