Kevin,

if you have a chance (or time), could you post that on your site. i would be
interested in taking a look at. thanks

-h.

ps. and let me know the url.

-----Original Message-----
From: Kevin Jones [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 25, 2000 11:35 AM
To: [EMAIL PROTECTED]
Subject: Re: Lists in a JSP


with tags a better way would be to have two tags, one that manages the data
and one that controls the ouput, so you have this

<xx:dataTag>
        <xx:outputTag />
</xx:dataTag>

The data Tag returns EVAL_BODY_TAG from doAfterBody until all the 'rows'
have been consumed by the outputTag.

Why do it this way? well you could easily plug in different ouput tags for
the same data (so an unordered list, an ordered list or a table say), and
obviously have different data tags for each output.

I have some code to do this somewhere, if I get a chance (or if anybody is
interested) I'll tidy it up and post  it to my web site,

Kevin Jones
DevelopMentor
www.develop.com

> -----Original Message-----
> From: A mailing list about Java Server Pages specification and reference
> [mailto:[EMAIL PROTECTED]]On Behalf Of David Castro
> Sent: 25 May 2000 19:04
> To: [EMAIL PROTECTED]
> Subject: Re: Lists in a JSP
>
>
> Actually, this seems to me to be the perfect opportunity to
> create a custom
> tag. So far, I have only created tags to conditionalize our
> online help, but I
> know that you can create tags for iteration. You could put in
> something like
> this:
>
>   <mylib:List type="pull-down" source="USStates" />
>
> and then code the corresponding Java class to blow this out into
> a full HTML
> pull-down list box. Sure is a lot cleaner than putting in a bunch of <% %>
> code. And a lot easier to maintain, too.
>
> -David Castro
>  [EMAIL PROTECTED]
>
> --- Jim Preston <[EMAIL PROTECTED]> wrote:
> > A question for experienced JSP/bean developers:
> >
> > It seems to me that a common task in a JSP is to output a list
> of some sort
> > where the contents and length of the list are variable and
> obtained from a
> > bean (for example, when creating a pull-down menu of dynamic
> options). And
> > from what I've read, there's no automatic way to do that (by automatic
> > I mean something akin to "jsp:getProperty"). So it has to be programmed,
> > having the bean return an array or an Enumeration (etc.), and then using
> > a scriplet to loop through the elements.
> >
> > But for the same reasons that "jsp:getProperty" is preferred over using
> > an expression tag to access the bean's "get" method directly, I would
> > think that there'd be something similar for looping through
> dynamic lists.
>
> __________________________________________________
> Do You Yahoo!?
> Kick off your party with Yahoo! Invites.
> http://invites.yahoo.com/
>
> ==================================================================
> =========
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to