jakarta-taglibs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pierre Delisle <pierre.deli...@sun.com>
Subject Re: New Taglib Proposal
Date Fri, 12 Jul 2002 17:58:17 GMT

> We proposed  to submit our directory tag library as new tag for jakarta project. I
> haven't heard from you about this proposal. We need to know your answer.

Sorry about the delay.

However, jakarta-taglibs has now adopted an (hopefully) improved process for the
submission of new projects. Please see 

By following this process, we will provide proper attention
to all new submissions. I've included below the submission I did 
recently using that new process.

Looking forward to see your submission.


    -- Pierre

-------- Original Message --------
Subject: [new taglib proposal] Iterators taglib
Date: Fri, 28 Jun 2002 16:49:00 -0700
From: Pierre Delisle <pierre.delisle@sun.com>
Reply-To: "Tag Libraries Developers List" <taglibs-dev@jakarta.apache.org>
To: taglibs-dev@jakarta.apache.org

In accordance with the process defined in the document
New Project Submission
please find below a proposal for a new tag library.

    -- Pierre

Proposal for "iterators" taglib

1. Motivation

Iterating over a collection of objects is common occurrence in 
a JSP page. 

The JSP Standard Tag Library (JSTL) provides 
useful actions to handle basic, generic cases. 
However, page authors often need to process the elements
of a collection in ways that are very specific and that cannot 
be handled by the generic JSTL tags.

This tag library is meant to provide a suite of iterators that
address these specific iteration needs.

2. Overview

A first release of this tag library includes iteration tags that
facilitate the generation of reports in JSP. 

More specifically:
  - generate lists with headers and footers according to the category
    that an item of the collection belongs to (<iter:forCategories>)
  - display items of a collection in a columnwise fashion

2.1 <iter:forCategories>

This iterator tag is exactly like <forEach>, with the addition that it
supports the concept of categories so that items can be displayed within
a specific category, with appropriate header and footer. 

For instance, in the example below, the collection contains a list of
athletes sorted by their associated country. By using the
<forCategories> tag, it is possible to display distinctive headers and
footers whenever a new country is encountered in the list.

  <iter:forCategories var="athlete" items="${athletes}">
    <iter:category value="${athlete.country}">
        <h3><c:out value="${athlete.country}"/></h3>
        <c:out value="${athlete.name}"/><br>

2.2 <iter:forColumns> 

This iterator tag allows the handling of the items of a collection in
a columnwise fashion. Each iteration makes available as many items as
there are columns, and they are provided such that the ordering
sequence is column-wise.

For instance, in the example below, the collection contains a list of
athletes sorted by their name. By using the <forColumns> tag, it is
possible to display the items of the collection in multiple columns,
keeping the display order on a column by column basis.

<table border="1" cellspacing="5">
<iter:forColumns var="athlete" items="${athleteNames}" columns="4">
    <td><c:out value="${athlete[0].lastName}" default=""/>,
        <c:out value="${athlete[0].firstName}" default=""/></td>
    <td><c:out value="${athlete[1].lastName}" default=""/>
        <c:out value="${athlete[1].firstName}" default=""/></td>
    <td><c:out value="${athlete[2].lastName}" default=""/>
        <c:out value="${athlete[2].firstName}" default=""/></td>
    <td><c:out value="${athlete[3].lastName}" default=""/>
        <c:out value="${athlete[3].firstName}" default=""/></td>

3. Requirements

This custom tag library requires a container that supports the
JavaServer Pages Specification, version 1.2 or higher. It also
requires the JSP Standard Tag Library (JSTL) version 1.0 or higher.

4. Commitment

I am committed to assume ownership of this tag library to ensure 
its quality and appropriate support. Should I become unable to 
assume this responsibility, I will make sure that a replacement
is found.


> If the person submitting the proposal is already a committer at Jakarta 
> Taglibs, the project can be added immediately to the sandbox. 

Since I am already a committer, the "iterators" tag library
will soon be added to the jakarta-taglibs-sandbox repository.


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

View raw message