You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Mike Kienenberger (JIRA)" <de...@myfaces.apache.org> on 2010/02/03 23:15:28 UTC

[jira] Commented: (TOMAHAWK-1485) t:dataList should not render
  • element when iterated element is not rendered
  •     [ https://issues.apache.org/jira/browse/TOMAHAWK-1485?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12829294#action_12829294 ] 
    
    Mike Kienenberger commented on TOMAHAWK-1485:
    ---------------------------------------------
    
    Note that you can workaround this behavior by using layout="simple" and generating your own <li></li> tags, rendered when you want them rendered, and prefixing/suffixing the t:dataList with <ul> and </ul>
    
    
    
    
    > t:dataList should not render <li> element when iterated element is not rendered
    > -------------------------------------------------------------------------------
    >
    >                 Key: TOMAHAWK-1485
    >                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1485
    >             Project: MyFaces Tomahawk
    >          Issue Type: Improvement
    >          Components: Data List
    >    Affects Versions: 1.1.9
    >         Environment: Tomcat 6.0.20, Mojarra 1.2_14, Tomahawk 1.1.9, commons-el 1.0, commons-fileupload 1.2.1, commons-io 1.4, commons-logging 1.1.1
    >            Reporter: Bauke Scholtz
    >            Assignee: Leonardo Uribe
    >
    > The following code example:
    > <%@taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
    > <%@taglib uri="http://myfaces.apache.org/tomahawk" prefix="t" %>
    > <%
    >     request.setAttribute("list", java.util.Arrays.asList(1, 2, 3, 4, 5));
    > %>
    > <f:view>
    >     <!doctype html>
    >     <html lang="en">
    >         <head>
    >             <title>Tomahawk t:dataList demo</title>
    >         </head>
    >         <body>
    >             <t:dataList value="#{list}" var="item" layout="unorderedList">
    >                 <t:outputText value="#{item}" rendered="#{item % 2 == 0}" /> 
    >             </t:dataList>
    >         </body>
    >     </html>
    > </f:view>
    > results in following:
    >     *
    >     * 2
    >     *
    >     * 4
    >     *
    > while the following is expected:
    >     * 2
    >     * 4
    
    -- 
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.