2 Replies Latest reply on Aug 4, 2009 5:26 AM by ilya_shaikovsky

    Rich:combobox and a4j:support problems

      Hi. I'm having a couple of problems using rich:combobox and a4j:support.

      this is my combobox

       <rich:comboBox
       id="GedTagCmb"
       value="#{attributoReg.valore}"
       suggestionValues="#{attributoReg.attributoregistrazione.attributo.getCurrentSuggestItem()}"
       directInputSuggestions="true"
       width="#{attributoReg.attributoregistrazione.attributo.attribArch_UI.getProperty('width')}"
       >
      
       <a4j:support event="onfocus" eventsQueue="reg">
       <f:setPropertyActionListener value="#{attributoReg}" target="#{arcRegManager.arBeanList.selectedBean}" />
       </a4j:support>
      
       <a4j:support actionListener="#{arcRegManager.arBeanList.onModify}" event="onselect" eventsQueue="reg" reRender="GedTagCmb, GedTagLongTxt, GedTagTxt, GedTagNum, GedTagDate" />
       <a4j:support actionListener="#{arcRegManager.arBeanList.onModify}" event="onblur" eventsQueue="reg" reRender="GedTagCmb, GedTagLongTxt, GedTagTxt, GedTagNum, GedTagDate" />
      
       </rich:comboBox>
      


      i have to fix the selectedbean property, then call onModify when user writes or selects a value from the suggest box. Onchange, as tested and read on JIRA, doesn't work, so i have to call both onselect (who does trigger the action when the user selects it from the suggestion list, but not when he writes down the value on himself) and onblur (wich doesn't help if you're setting values of other comboboxes, 'cause showing the values comes before the actual upgrade of the value list)

      this use of 2 different events has a huge problem: looks like that onblur sends a "" value AFTER onselect sends the correct one. and vice versa, sometimes.

      there has to be a smarter way. Any suggestions on that would be extremely appreciated.

      Thanks

      Enrico