title: Richfaces pickList ajax event when item has been added/removed
body: <p>Is there an ajax event being fired when an item has been added to a richfaces (4.3.1.Final) <code>pickList</code>? I need to enable disable a button depending on if any items have been selected or not.</p>
  
  <p>The developer guide does not mention this at all, but I found <a href="https://community.jboss.org/message/736038" rel="nofollow noreferrer">this</a> when googling. Using the suggested solution, I used the following ajax events:</p>
  
  <pre><code>&lt;rich:pickList 
          var="item"
          value="#{someBean.selectedItems}"&gt;
      &lt;a4j:ajax event="sourceblur" render="somePanelGroupWithTheButton" /&gt;
      &lt;a4j:ajax event="targetblur" render="somePanelGroupWithTheButton" /&gt;
  &lt;/rich:pickList&gt;
  </code></pre>
  
  <p>This works. However, the event is fired each time the source or target list is blurred, which is too frequently for my needs.</p>
  
  <p>I also tried <code>&lt;a4j:ajax event="additems" /&gt;</code> and <code>&lt;a4j:ajax event="removeitems" /&gt;</code>. In this case, the event is fired only on removal or adding items, exactly like I want. However, <code>selectedItems</code> isn't populated with the new item until after the event has been fired. This means I cannot use it to re-render the button, since the list will be empty after adding the first item, and having size one after adding the second element.</p>
  
  <p>Is there an ajax event to listen for that fires after the target list (<code>selectedItems</code>) has been updated? (<em>and there must be a complete list of supported ajax events for this component somewhere, right?</em>)</p>
  
  <p><em>I also tried the change event, as suggested <a href="https://stackoverflow.com/questions/7678838/how-to-know-which-item-is-clicked-in-richfaces-picklist">here</a>, but it is not fired.</em></p>