[
http://issues.apache.org/jira/browse/MYFACES-592?page=comments#action_12330142
]
Jamie Cash commented on MYFACES-592:
------------------------------------
The source of the problem is in the UISelectOne class, which now validates
whether the value of a select is in the list of select items.
This validation will fail if the SelectOneRadio is used in a data table with
forceId set to true and forceIdIndex set to false, where a selectOneRadio is
used for every row in the table, each containing only one selectItem, as the
validation should occur over all radio buttons with the same id, not necessarly
ojnly those within the selectOne component.
I have overriden the validateValue method in the tomahawk HtmlSelectOneRadio
class as follows:
/**
* Overridden method, as extended select one value doesn't necessaraly
* have to be contained within select list, for example, forceId="true" and
* forceIdIndex="false" then component may be used in datatable.
*/
protected void validateValue(FacesContext context, Object value)
{
if (value == null)
{
return;
}
}
I will supply a patch shortly.
> tomahawke SelectOneRadio in datatable no longer working
> -------------------------------------------------------
>
> Key: MYFACES-592
> URL: http://issues.apache.org/jira/browse/MYFACES-592
> Project: MyFaces
> Type: Bug
> Components: Tomahawk
> Versions: 1.1.0, Nightly Build
> Environment: Tomcat 5.5 running under JBoss on Windows Server 2003
> Reporter: Jamie Cash
> Attachments: screenprint.bmp
>
> The tomahawke selectOneRadio (t:selectOneRadio previously x:selectOneRadio)
> in a datatable no longer works correctly. On selection of an item and
> submission of the form a ('Validation Error', "{0}": Value is not a valid
> option') message is added to the messages.
> This worked correctly in myfaces 1.0.9 but not in the last nightly build.
> Below is a subset of my jsp that outputs the column:
> <h:column>
> <f:facet name="header">
> <h:outputText value="#{bundle.label_select}"/>
> </f:facet>
> <t:selectOneRadio id="selectRadio" forceId="true" forceIdIndex="false"
> required="true" value="#{ClientSearchBean.selectedExtClientId}">
> <f:selectItem itemValue="#{client.extClientId}" itemLabel=""/>
> </t:selectOneRadio>
> </h:column>
> The 'value; points to a string value in the backing bean and the itemValue
> points to the same string value in the Client domain object, of which the
> table is driven from.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira