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

    Rich:combobox and a4j:support problems

    Enrico Drusiani Newbie

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

      this is my combobox

       <a4j:support event="onfocus" eventsQueue="reg">
       <f:setPropertyActionListener value="#{attributoReg}" target="#{arcRegManager.arBeanList.selectedBean}" />
       <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" />

      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.