From jira-events at lists.jboss.org Fri Oct 28 10:21:45 2011 Content-Type: multipart/mixed; boundary="===============5038816332575364752==" MIME-Version: 1.0 From: Frederic Allard (Updated) (JIRA) To: richfaces-issues at lists.jboss.org Subject: [richfaces-issues] [JBoss JIRA] (RF-11606) rich:select : doesn't cast selectItem value Date: Fri, 28 Oct 2011 10:21:45 -0400 Message-ID: <770132365.37793.1319811705301.JavaMail.tomcat@jira02.app.mwc.hst.phx2.redhat.com> In-Reply-To: 1015553429.37674.1319809245181.JavaMail.tomcat@jira02.app.mwc.hst.phx2.redhat.com --===============5038816332575364752== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable [ https://issues.jboss.org/browse/RF-11606?page=3Dcom.atlassian.jira.p= lugin.system.issuetabpanels:all-tabpanel ] Frederic Allard updated RF-11606: --------------------------------- Steps to Reproduce: = - Declare an Integer property in a managed bean and set a default value; {code:title=3DPagerBean.java|borderStyle=3Dsolid} private Integer page =3D 20; public Integer getPage() {...} public Integer setPage(Integer page) {...} {code} - Bind the property to a rich:select; - Define f:selectItem(s); {code:title=3Dpage.xhtml|borderStyle=3Dsolid} {code} - Render the page and the value 20 will not be selected, but it will be ren= dered in the input:hidden of the component in the page source. {code:title=3Dpage.xhtml source|borderStyle=3Dsolid}
5
10
20
40
{code} - If you change the property page's type in the PageBean to String, the val= ue will be selected after rendering the page. was: - Declare an Integer property in a managed bean and set a default value; {code:title=3DPagerBean.java|borderStyle=3Dsolid} private Integer page =3D 20; public Integer getPage() {...} public Integer setPage(Integer page) {...} {code} - Bind the property to a rich:select; - Define f:selectItem(s); {code:title=3Dpage.xhtml|borderStyle=3Dsolid} {code} - Render the page and the value 20 will not be selected, but it will be ren= dered in the input:hidden of the component in the page source. {code:title=3Dpage.xhtml source|borderStyle=3Dsolid}
5
10
20
40
{code} = > rich:select : doesn't cast selectItem value > ------------------------------------------- > > Key: RF-11606 > URL: https://issues.jboss.org/browse/RF-11606 > Project: RichFaces > Issue Type: Bug > Security Level: Public(Everyone can see) = > Components: component-selects > Affects Versions: 4.1.0.Milestone2 > Environment: Internet Explorer 8, Google Chrome 14, Oracle Weblog= ic 11g > Reporter: Frederic Allard > Labels: rich:select, richfaces4 > > If you define f:selectItem(s) directly in the xhtml file as children of a= rich:select, the values of the selectItem(s) are not cast to the bound val= ue of the rich:select. = > This results in the value to be not selected by the rich:select after ren= dering the page. > As the documentation of the component says: "The rich:select component is= designed to replace standard h:selectOneMenu." > The h:selectOneMenu casts and selects the value in this case. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrato= rs: https://issues.jboss.org/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira =20 --===============5038816332575364752==--