Rene O created MYFACES-3609:
-------------------------------

             Summary: rendered attribute of f:selectItem is not evaluated 
within h:selectOneListbox
                 Key: MYFACES-3609
                 URL: https://issues.apache.org/jira/browse/MYFACES-3609
             Project: MyFaces Core
          Issue Type: Bug
    Affects Versions: 2.1.8
            Reporter: Rene O


If you use the rendered attribute of f:selectItem within h:selectOneListBox, it 
is not evaluated. In the example below you can see, that an item with 
rendered-condition false is rendered, which is not the expected behaviour.

Example:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
<html xmlns="http://www.w3.org/1999/xhtml";
          xmlns:h="http://java.sun.com/jsf/html";
          xmlns:f="http://java.sun.com/jsf/core";
          xmlns:ui="http://java.sun.com/jsf/facelets";
         >
        <h:head>
                <title>JSF Test</title>         
        </h:head>

        <h:body>
                <h:form id="myForm">
                        <h:selectOneListbox id="mySelect" value="none" size="1" 
style="width:100px;">
                                <f:selectItem itemValue="A" itemLabel="A" />
                                <f:selectItem itemValue="B" itemLabel="B" 
rendered="#{'1' eq '2'}"/>
                        </h:selectOneListbox>
                        
                        <br/>
                        output rendered condition selectItem 'B': #{'1' eq '2'}
                        <br/>
                        you can see, that selectItem is rendered while rendered 
condition is false.
                        <br/>
                        it looks like, that attribute 'rendered' is not 
evaluated at all.
                </h:form>
        </h:body>
</html>

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to