4 Replies Latest reply on Sep 8, 2008 10:18 AM by Vincent Crepin

    rich:combobox problems

    Vincent Crepin Newbie


      I have many problems using combobox in my applications. The control is functionnaly very cool and it is exactly what I need. But it behaves strangely.

      The strangest thing is that the problems are not consistent.

      1) sometimes, when I post back my form, the value of certain comboboxes are resetted. It is not always the same that behaves like that.

      2) when I first load my page, the suggestion list is not always shown correctly. Sometimes, incomplete, sometimes totally absent, etc.

      I use richfaces 3.2.1.GA.

      I'm using comboboxes in a datalist.

      <rich:dataList var="ingredient" value="#{org_domain_recipes_session_uievents_ingredientList}"
       rows="10" id="ingredientDataList">
       <table cellspacing="0" cellpadding="0" border="0">
       <td><rich:comboBox selectFirstOnUpdate="false"
       value="#{ingredient.quantity}" listHeight="500">
       <td><rich:comboBox selectFirstOnUpdate="false"
       value="#{ingredient.quantityType}" listHeight="500">
       <td><rich:comboBox selectFirstOnUpdate="false"
       value="#{ingredient.description}" listHeight="500"
       reRender="ingredientsPanel" ajaxSingle="false"></a4j:commandButton>

      The suggestions are simply Lists of String objects.

      Have someone succeeded to make this kind of code work correctly ?

      Thanks in advance.

        • 1. Re: rich:combobox problems
          Vincent Crepin Newbie

          The partially shown problem was due to the fact that some items in the List of Strings were empty.

          Now I can't figure out why some values are resetted when posting data. It seems that they are resetted prior to posting (or in the update process) because server side, the values are not available.

          • 2. Re: rich:combobox problems
            Ilya Shaikovsky Master

            place rich:messages to the page please.

            • 3. Re: rich:combobox problems
              Vincent Crepin Newbie

              Yes there is already one. Nothing is shown in it. You suspected a validation error ?


              • 4. Re: rich:combobox problems
                Vincent Crepin Newbie

                Here it is if you want to see it.

                <a4j:outputPanel id="messagesPanel" ajaxRendered="true" >
                 <rich:messages passedLabel="No error" layout="list" globalOnly="true"
                 infoLabelClass="infoLabelClass" infoClass="infoClass"
                 fatalClass="fatalClass" fatalLabelClass="fatalLabelClass"
                 warnClass="warnClass" warnLabelClass="warnLabelClass"
                 errorLabelClass="errorLabelClass" errorClass="errorClass" styleClass="messagesClass">
                 <f:facet name="header">
                 <h:outputText value="Messages:"></h:outputText>
                 <f:facet name="errorMarker">
                 <h:graphicImage value="/img/attention.gif" />
                 <f:facet name="infoMarker">
                 <h:graphicImage url="/img/green.gif" />
                 <f:facet name="warnMarker">
                 <h:graphicImage url="/img/warning.gif" />
                 <f:facet name="fatalMarker">
                 <h:graphicImage url="/img/error.gif" />