Subset Tag Filter collection elements

Source: Internet
Author: User

The subset tag is used to filter elements in the collection. It uses a filter to filter out unqualified elements, leaving a subset of the original set. For example:

1 <%@ Page Language="Java"ContentType="text/html; Charset=utf-8"%>2 <%@ taglib URI="/struts-tags"prefix="Struts"%>3 <%@ taglib URI="/struts-tags"prefix="s"%>4 <!DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en">5 <HTML>6 <Head>7 <title>My JSP ' index.jsp ' starting page</title>8 <Metahttp-equiv= "Pragma"content= "No-cache">9 <Metahttp-equiv= "Cache-control"content= "No-cache">Ten <Metahttp-equiv= "Expires"content= "0"> One <Metahttp-equiv= "keywords"content= "Keyword1,keyword2,keyword3"> A <Metahttp-equiv= "description"content= "This is my page"> - <!-- - <link rel= "stylesheet" type= "Text/css " href= "Styles.css" > the      - -  - <Struts:headTheme= "Ajax" /> -  + <styletype= "Text/css"> - BODY,TD{ + font-size:12px; A } at </style> - </Head> -  - <Body> -  -  in <H3><FontColor= "#0000FF"> &lt;Struts:append/&gt;Label</Font></H3> -  to <!--can be combined with subsetaction, through subset.action test effect - + <S:subsetSource= "Malelist"decider= "Decider">    <!--Filter Labels - -     <S:iterator>                                  <!--Traverse Filtered Results - the         <S:property/>                            <!--output values for each traversal - *         <BR> $     </S:iterator>Panax Notoginseng </S:subset> -  the </Body> + </HTML>

Malelist is the collection property in action, and decider is the Filter property in action. The decider must implement the Subsetiteratorfilter interface and the decide () method.

Subset Tag Filter collection elements

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.