> Hi matt,
> I just had a look at your proposed patch...
>  
> I can't try it or check it accurately at the moment, so I'm asking 
> you some (maybe stupid) questions: - Why do you need to define an 
> addictional "items" attribute?  

The main reason for this is (1) to be consistent with JSTL's forEach tag and (2) to 
eliminate any 
additional logic needed to distinguish between a simple name and an actual collection. 
 There is 
some EL logic in el.TableTag that does this.list = ExpressionEvaluator... etc. and 
then a check in 
TableTag.evaluateExpressions - if list is not null, it skips the lookup.  I tried (for 
hours) to use name 
and/or list (which is deprecated) and simply found it *much* easier to add a new items 
attribute.

> - Why can't the list of items generated by jstl sql tag be handled like any other 
> collection? 

Because it's not a collection - it's a Result (http://tinyurl.com/2xew2), which acts 
as a disconnected 
ResultSet.  I really do like that JSTL's forEach tag can pretty much iterate over 
anything - Arrays, 
Collections, Sets or Maps.

> - What is the type of the jstl generated "items" object? Is it a sql RowSet?

The "rows" object actually returns a SortedMap as seen below:

    /**
     * Returns an array of SortedMap objects. The SortedMap
     * object key is the ColumnName and the value is the ColumnValue.
     * SortedMap was created using the CASE_INSENSITIVE_ORDER
     * Comparator so the key is the case insensitive representation
     * of the ColumnName.
     *
     * @return an array of Map, or null if there are no rows
     */
    public SortedMap[] getRows() {
        if (rowMap == null) {
            return null;
        }

        //should just be able to return SortedMap[] object
        return (SortedMap []) rowMap.toArray(new SortedMap[0]);
    }

Matt

>  
>  
> fabrizio
>  
>  
>  
> 
> From: [EMAIL PROTECTED] on behalf of Matt 
> Raible Sent: Tue 09/03/2004 22.12 To: [EMAIL PROTECTED]
> Subject: RE: [displaytag-devel] Support for displaying results from 
> JSTL SQL Tag
> 
> Should I assume that no reponse means "we don't care - go ahead and
> commit it?". ;0)
> 
> Matt
> 
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] <mailto:displaytag-devel-
[EMAIL PROTECTED]> ] On
> > Behalf Of Matt Raible
> > Sent: Sunday, March 07, 2004 10:15 PM
> > To: [EMAIL PROTECTED]
> > Subject: [displaytag-devel] Support for displaying results
> > from JSTL SQL Tag
> >
> >
> > All,
> >
> > I did some hacking this afternoon and managed to add the ability for 
> > the displaytag to render results from JSTL's SQL Tag.
> >
> > Demo here: http://demo.raibledesigns.com/appfuse/users.jsp <http://
demo.raibledesigns.com/appfuse/users.jsp> 
> >
> > Ehancement/Patch here: 
> > https://sourceforge.net/tracker/ <https://sourceforge.net/tracker/> ?
> > func=detail&atid=536613&aid=911760&group_id=73068
> >
> > This patch only effect the EL tag - so users must specify
> > that URI/TLD 
> > to use this feature.  Let me know what you think and I'll
> > commit it if 
> > everyone likes it.
> >
> > Matt
> >
> >
> >
> > -------------------------------------------------------
> > This SF.Net email is sponsored by: IBM Linux Tutorials
> > Free Linux tutorial presented by Daniel Robbins, President
> > and CEO of GenToo technologies. Learn everything from
> > fundamentals to system
> > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click <http://
ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click> 
> > _______________________________________________
> > displaytag-devel mailing list [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/displaytag-devel 
> > <https://lists.sourceforge.net/lists/
listinfo/displaytag-devel> 
> >
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by: IBM Linux Tutorials
> Free Linux tutorial presented by Daniel Robbins, President and CEO of
> GenToo technologies. Learn everything from fundamentals to system
> administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click <http://
ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click> 
_______________________________________________ displaytag-devel mailing list 
displaytag-
[EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/displaytag-devel 
<https://
lists.sourceforge.net/lists/listinfo/displaytag-devel>


--
Open WebMail Project (http://openwebmail.org)


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
displaytag-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/displaytag-devel

Reply via email to