myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason Allen (JIRA)" <>
Subject [jira] Created: (MYFACES-680) x:selectOneRadio tag cannot be nested within the h:dataTable tag in version 1.1.0
Date Fri, 07 Oct 2005 16:44:48 GMT
x:selectOneRadio tag cannot be nested within the h:dataTable tag in version 1.1.0

         Key: MYFACES-680
     Project: MyFaces
        Type: Bug
    Versions: 1.1.0    
 Environment: Windows XP Pro sp2, Tomcat 4.1.31
    Reporter: Jason Allen
    Priority: Minor

I've run into an issue with version 1.1.0 when trying to implement a x:selectOneRadio tag
within the h:dataTable tag where only one row from the data table can have the radio button
selected.  In version 1.0.9, I used the forceId and forceIdIndex attributes in the x:selectOneRadio
tag to force the id of each x:selectOneRadio to be the same.  Each row in the h:dataTable
will have x:selectOneRadio with only one SelectItem in it, but since the id's are the same,
the browser handles it correctly.

However, with version 1.1.0 in the validateValue(FacesContext, Object) method of the javax.faces.component.UISelectOne
class, there is a call to _SelectItemsUtil.matchValue(FacesContext, Object, Iterator, _ValueConverter)
which checks to see if the selected value of the x:selectOneRadio exists in the list of SelectItems.
 Since each row in the data table has a x:selectOneRadio with only one SelectItem, this check
will only return true for the row where the radio button is selected.  All other rows cause
this check to fail and add a 'Value is not a valid option' error to the context messages list,
which prevents the page from performing any other actions.

Here is an example of how I am using the x:selectOneRadio:

	style="padding-top: 0px; padding-bottom: 0px;"
		<h:outputText value="#{person.firstName} #{person.lastName}" escape="false" />

		<x:selectOneRadio id="preside" 
			style="margin: 0px; border: 0px;"
			<f:selectItem itemValue="#{person.personId}" itemLabel="" />

It's not completely clear to me why the existence of the x:selectOneRadio value in it's child
SelectItems needs to be enforced so strictly.  I propose that this check be either optional
or eliminated all toghether.


Jason Allen

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message