[richfaces-issues] [JBoss JIRA] Updated: (RF-2776) Empty string value in h:selectOneRadio causes validation failure

First Last (JIRA) jira-events at lists.jboss.org
Wed Mar 26 10:31:48 EDT 2008


     [ http://jira.jboss.com/jira/browse/RF-2776?page=all ]

First Last updated RF-2776:
---------------------------

    Description: 
Code to reproduce:
<h:selectOneRadio value="#{bean.radioValue}" layout="lineDirection">
     <f:selectItem itemValue="" itemLabel="All"/>
     <f:selectItem itemValue="yes" itemLabel="Yes"/>
     <f:selectItem itemValue="no" itemLabel="No"/>
     <a4j:support event="onchange" reRender="radioValue"/>
</h:selectOneRadio>

<h:outputText value="#{bean.radioValue}" id="radioValue"/>

The problem is that AJAX.js script (line 1980) converts empty string to "on" value during request submit. Thus, the validation phase fails since "on" value is absent in the SelectItem's collection. The Update model phase is being skipped also and h:outputText will never change it's value.

  was:
Code to reproduce:
<h:selectOneRadio value="#{bean.radioValue}" layout="lineDirection">
     <f:selectItem itemValue="" itemLabel="All"/>
     <f:selectItem itemValue="yes" itemLabel="Yes"/>
     <f:selectItem itemValue="no" itemLabel="No"/>
     <a4j:support event="onchange" reRender="radioValue"/>
</h:selectOneRadio>

<h:outputText value="bean.radioValue" id="radioValue"/>

The problem is that AJAX.js script (line 1980) converts empty string to "on" value during request submit. Thus, the validation phase fails since "on" value is absent in the SelectItem's collection. The Update model phase is being skipped also and h:outputText will never change it's value.


> Empty string value in h:selectOneRadio causes validation failure
> ----------------------------------------------------------------
>
>                 Key: RF-2776
>                 URL: http://jira.jboss.com/jira/browse/RF-2776
>             Project: RichFaces
>          Issue Type: Bug
>    Affects Versions: 3.1.4
>         Environment: RichFaces 3.1.4.G
> my-faces 1.2.2
> FireFox 2.0.0.12
> Jetty 6.1.8
>            Reporter: First Last
>
> Code to reproduce:
> <h:selectOneRadio value="#{bean.radioValue}" layout="lineDirection">
>      <f:selectItem itemValue="" itemLabel="All"/>
>      <f:selectItem itemValue="yes" itemLabel="Yes"/>
>      <f:selectItem itemValue="no" itemLabel="No"/>
>      <a4j:support event="onchange" reRender="radioValue"/>
> </h:selectOneRadio>
> <h:outputText value="#{bean.radioValue}" id="radioValue"/>
> The problem is that AJAX.js script (line 1980) converts empty string to "on" value during request submit. Thus, the validation phase fails since "on" value is absent in the SelectItem's collection. The Update model phase is being skipped also and h:outputText will never change it's value.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the richfaces-issues mailing list