1 Reply Latest reply on Jan 7, 2013 6:05 AM by kevin 2

    [RF4.1] rich:select does not work when typing a value not in the list

    kevin 2 Newbie

      Hi,

       

      I'm using JSF2.1.14 with the RF4.1 Final. I have a rich:select with enableManualInput=true and a validator.

      Here is my (truncated) code :

       

      <rich:select id="valueList" enableManualInput="true"
        value="#{search.value}" validator="#{search.valueValidator}" >
        <f:selectItems value="#{search.valueList}" />
      </rich:select>
      
      <a4j:commandButton id="search" type="submit" value="Search" 
        action="#{search.search}" execute="@region"/>
      
      

       

      I encouter two issues:

       

      1. When I type a value in the rich:select that is not into the valueList and submit, the validator is not called and the bean value is not set.

       

      2. When I select a value in the list, submit, type a value not in the list and submit, bean value still got the old value and the validator is called with old value.

       

      I think this is a bug, which I try to workaround either by retrieving the value from the request (from the id "valueListInput") either by using a hidden input...

      What is the best solution ?

       

      Thanks by advance.