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

Category: main tag library
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: andy pruitt (rapruitt)
Assigned to: Nobody/Anonymous (nobody)
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.

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

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:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
displaytag-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/displaytag-devel

Reply via email to