1 Reply Latest reply on Mar 9, 2015 10:10 AM by Michal Petrov

    rich:select enableManualInput and empty string value problem

    Stanislav Pacvoň Newbie

      Hi,

       

      I have a rich:select with enableManualInput and empty selectItem that is representing no selection option. When I click on down arrow, there is js error in Select.js line 356.

       

      In function  __getClientItemFromCache is code:

       

      if (label) {

                          return {'label': label, 'value': value};

                      }

       

      where label is empty string and function return undefined.

       

      in xhtml

       

      <r:select

                                  id="richSelect"

                                  value="#{selectModel.user}"

                                  enableManualInput="true">

                                  <f:selectItem

                                          itemLabel=""

                                          itemValue="#{null}" />

                                  <f:selectItems

                                      value="#{users}"

                                      var="user"

                                      itemLabel="#{user.login}"

                                      itemValue="#{user}" />

                                  <f:ajax

                                      event="selectitem"

                                      execute="@this"

                                      render="richSelect" /> 

                              </r:select>