3 Replies Latest reply on Apr 21, 2007 3:25 PM by Pete Muir

    Seems to be a bug

    Konstantin Kauz Novice

      Environment jboss as 4.2.0CR2, seam 1.2.1 cvs today.

      Value of selectOneMenu will not be set:


       private Kfz kfz;
       private List<Kfz> bearbkfzList;
       public String searchKfz(){
       if ( ! bid.equals("") ){
       lid = Long.parseLong(bid);
       }catch(NumberFormatException ex){
       facesMessages.add("FNr ist keine Ziffer!");
       return "null";
       lid = 0L;
       if ((bearbkfzList == null) || (bearbkfzList.isEmpty()) ){
       facesMessages.add("Keine Treffer");
       return "null";
       return "/kfzresultbearb";

      2.From kfzresultbearb

       Kfz selectedKfz;
       public String editKfz() {
       kfz = selectedKfz;
       return "/editkfz";

      Than to follow view

       <h:panelGroup id="frms">
       <h:panelGrid columns="2">
       <h:outputText value="FNr: "/> <h:outputText value="#{kfz.id}"/>
       <h:panelGrid columns="3">
       <h:outputText value="Fabrikat: "/>
       <h:panelGroup style="display:block">
       <a4j:region renderRegionOnly="false">
       <h:selectOneMenu id="hrs23" value="#{kfz.hersteller}" required="true">
       <s:convertEntity />
       <s:selectItems value="#{hListe.resultList}" var="her" label="#{her.bezeichnung}" noSelectionLabel="Bitte waehlen..." />
       <a4j:support event="onchange"
       reRender="modelsel" />
       <h:message for="hrs23" />

      <framework:entity-query name="hListe" ejbql="select h from Hersteller h" />

      All take place in a session statefull bean

        • 1. Re: Seems to be a bug
          Pete Muir Master

          No error messages? What you are doing is very close to the ui example - so take a look at that to :) You'll probably find it easier to get it working with a4j support, then add that in later.

          • 2. Re: Seems to be a bug
            Konstantin Kauz Novice

            thanks for answer,

            you don't understand me, sorry for my terriblly english!

            the functions work fine,

            after update seam with occurs on the side the values of selectOneMenus are not set,

            Items are in but <h:selectOneMenu id="hrs23" value="#{kfz.hersteller}" required="true">

            default value "value="#{kfz.herteller}"" is not set.

            if i add to the Page h:outputText value="#{kfz.herteller.bezeichung}"/> this string is shown.

            Logs are clear and no errro messages.


            Ajax4j and functionalities work fine, this is not the problem.

            • 3. Re: Seems to be a bug
              Pete Muir Master

              Again, I'd point you at the ui example. Things to look at - is the the value from #{kfz.herteller} .equals() to the value that should be selected in the list. Remember you need to be in a conversation (or use ID equality)