2 Replies Latest reply on Nov 26, 2010 7:35 AM by mbasilico

    h:selectOneMenu is rendering two selected="selected" items after post

    mbasilico
      Hi all !

      A little background, I'm testing the upgrade from (JBoss 4.2.2 and Java 5) to (JBoss 4.2.3 and Java 6)

      I'm having trouble with the h:selectOneMenu component.
      After a postback and in "some situation" (When I choose one specific value) the component is rendering the following HTML code:


      `

      <label>Type of X</label><select ...> 

              <option value="org.jboss.seam.ui.NoSelectionConverter.noSelectionValue">Please Select...</option>
              <option value="0" selected="selected">Type1</option>

              <option value="1">Type2</option>
              <option value="2">Type3</option>
              <option value="3" selected="selected">Type4</option>
              <option value="4">Type5</option>
      </select>
      `





      The steps where the following:
      1. I select "Type1", do a post and to the server
      2. with debugging, I see that the posted value is Type1,
      3. all the logic search Objects of type1,
      4. then the Page render with the result of searching items of type1 (the result list in html show that)
      5. When the page finish loading in the browser the drop-down combo change from Type1 to Type4 ('cause in alphabetical order it makes sense)


      In JBoss 4.2.2 and Java 5 this situation doesn't happen and the application code is the same (xhtml, JSF beans, Seam Components and persistence).

      The onlye thing that make me think a bit es that JBoss 4.2.3 upgrade the sun-jsf upgraded to v1.2_09-b01 (from v1.2_04_P02), somebody know if the h:selectOneMenu can be affected by this upgrade?.

      I google a lot but I don't found the problem yet...why are two items with selected? How this can happen
      'cause is a selectOneMenu! please help!

      Thanks in advance!!


        • 1. Re: h:selectOneMenu is rendering two selected="selected" items after post
          mbasilico

          I'm still trying to resolve this but I more close.


          Now I know that JBoss 4.2.3 is who is putting the noise.
          With JBoss 4.2.2 and Java 6 the combo box function as expected but with
          JBoss 4.2.3 and Java 6 doesn't.


          Now I'm searching which JAR I have to replace...somebody know where is the sun-jar JAR or other that maybe interfere with the h:selectOneMenu?


          I'm in the right direction?


          Thanks...

          • 2. Re: h:selectOneMenu is rendering two selected="selected" items after post
            mbasilico

            Hi all again...


            More advances here :)


            Just now I replaced the following JARs:
            jboss-4.2.3.GA/server/default/deploy/jboss-web.deployer/jsf-libs/jboss-faces.jar
            jboss-4.2.3.GA/server/default/deploy/jboss-web.deployer/jsf-libs/jsf-api.jar
            jboss-4.2.3.GA/server/default/deploy/jboss-web.deployer/jsf-libs/jsf-impl.jar


            with the JARs that come with JBoss 4.2.2 and Now It works!! :)


            Now My question is...It is secure to do this replace, I'm evaluating the upgrade to JBoss 4.2.3 and Java 6 for production....


            Please, If you can share your thoughts It will help me a lot.


            Thanks for reading me :)