Bugs item #814462, was opened at 2003-09-29 16:09
Message generated for change (Comment added) made by fgiust
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=536613&aid=814462&group_id=73068

Category: main tag library
Group: v 1.0-b1
>Status: Closed
Resolution: None
Priority: 8
Submitted By: andy pruitt (rapruitt)
Assigned to: fabrizio giustina (fgiust)
Summary: column JSP body should not execute if the list is empty

Initial Comment:
The body of a display:column should not execute when
the list is empty.  This is forcing is null checks
whenever the page  author uses the implicit row object;
this is very counterintuitive and cluttered.

Something as simple as:
<display:table id="d" name="all"  >
<display:column><%=d.toString()%></display:column>
</display:table>

Has to be rewritten with a null check?  

<display:table id="d" name="all"  >
<display:column>
<%=( d != null ) ? d.toString() : "" %></display:column>
</display:table>

Uggh.


Adding something like:
public int doStartTag() throws JspException {
         TableTag lTableTag = (TableTag)
findAncestorWithClass(this, TableTag.class);
        if ( tableTag.getViewableData().isEmpty() ){
                return SKIP_BODY;
        }
}

to ColumnTag should do the trick.

----------------------------------------------------------------------

>Comment By: fabrizio giustina (fgiust)
Date: 2003-11-06 00:41

Message:
Logged In: YES 
user_id=798060

fixed in cvs for 1.0-b2

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=536613&aid=814462&group_id=73068


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
displaytag-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/displaytag-devel

Reply via email to