You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Bauke Scholtz (JIRA)" <de...@myfaces.apache.org> on 2010/02/01 19:14:19 UTC
[jira] Created: (TOMAHAWK-1485) t:dataList should not render
element when iterated element is not renderedt: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
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.
Re: [jira] Resolved: (TOMAHAWK-1485) t:dataList should not render
element when iterated element is not rendered
Posted by Mike Kienenberger <mk...@gmail.com>.
Really?
I'd think if the direct child t:dataList isn't rendered, we probably
shouldn't output the tag.
But it's our own component, so we can make whatever rules we want.
On Wed, Feb 3, 2010 at 2:31 PM, Leonardo Uribe (JIRA)
<de...@myfaces.apache.org> wrote:
>
> [ https://issues.apache.org/jira/browse/TOMAHAWK-1485?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
>
> Leonardo Uribe resolved TOMAHAWK-1485.
> --------------------------------------
>
> Resolution: Not A Problem
> Assignee: Leonardo Uribe
>
> t:dataList iterate over a list without check for rendered property on the component. The fact that the component is not rendered does not means that the value is "skipped". t:dataList works as expected.
>
>> 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.
>
>
[jira] Commented: (TOMAHAWK-1485) t:dataList should not render
element when iterated element is not rendered
Posted by "Mike Kienenberger (JIRA)" <de...@myfaces.apache.org>.
[ 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.
[jira] Commented: (TOMAHAWK-1485) t:dataList should not render
element when iterated element is not rendered
Posted by "Bauke Scholtz (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/TOMAHAWK-1485?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12829299#action_12829299 ]
Bauke Scholtz commented on TOMAHAWK-1485:
-----------------------------------------
Well, I know that, that's also why I didn't report it as a bug. but as an improvement. It could just check if none of its direct children are rendered.
> 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.
[jira] Resolved: (TOMAHAWK-1485) t:dataList should not render
element when iterated element is not rendered
Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/TOMAHAWK-1485?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Leonardo Uribe resolved TOMAHAWK-1485.
--------------------------------------
Resolution: Not A Problem
Assignee: Leonardo Uribe
t:dataList iterate over a list without check for rendered property on the component. The fact that the component is not rendered does not means that the value is "skipped". t:dataList works as expected.
> 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.