You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Sneha Shah (JIRA)" <de...@myfaces.apache.org> on 2007/10/15 16:13:50 UTC

[jira] Commented: (TRINIDAD-395) Iterator tag doesn't work when inside a selectOneChoice tag

    [ https://issues.apache.org/jira/browse/TRINIDAD-395?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12534852 ] 

Sneha Shah commented on TRINIDAD-395:
-------------------------------------

I tried using f:selectItems  as below but it doesn't fetch the items yet.

 <tr:selectOneRadio 
	value="#{row.selectedDevice}" layout="horizontal">
	<tr:iterator var="item" 	                    
	          value="#{row.possibleDevices}" >
                  <f:selectItem value="#{item}" itemLabel="#{item}"></f:selectItem>
       </tr:iterator>
</tr:selectOneRadio>



> Iterator tag doesn't work when inside a selectOneChoice tag
> -----------------------------------------------------------
>
>                 Key: TRINIDAD-395
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-395
>             Project: MyFaces Trinidad
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: 1.0.1-incubating-core-SNAPSHOT
>            Reporter: Chris Hansen
>
> I'm trying to display a list of objects that are within a list of objects as selectItems without using f:selectItems.
> Here is an example:
> <tr:iterator value="#{bean.list1}" var="list1">
> 	<tr:selectOneChoice>
> 		<tr:iterator value="#{list1.list2}" var="list2broken">
> 			<tr:selectItem label="#{list2broken.label}" />
> 		</tr:iterator>
> 	</tr:selectOneChoice>
> 	<tr:iterator value="#{list1.list2}" var="list2works">
> 		<tr:outputText value="#{list2works.label}" />
> 	</tr:iterator>
> </tr:iterator>
> The "list2broken" list does not display any selectItems in the select, but the "list2works" list does output the text (so I know that list2 is not empty). I tried using f:selectItem with the same result.
> As a workaround, I am creating a list of SelectItem objects and using f:selectItems, but I would like to avoid this.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.