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 2012/09/19 18:43:07 UTC

[jira] [Resolved] (MYFACES-3609) rendered attribute of f:selectItem is not evaluated within h:selectOneListbox

     [ https://issues.apache.org/jira/browse/MYFACES-3609?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mike Kienenberger resolved MYFACES-3609.
----------------------------------------

    Resolution: Not A Problem

f:selectItem does not have a rendered attribute.

http://javaserverfaces.java.net/nonav/docs/2.0/pdldocs/facelets/index.html
                
> 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