code: @Override
  	public void decode(FacesContext context, UIComponent component) {
  		ScrollSpy ss = (ScrollSpy) component;
  		super.decode(context, ss);
  
  		final ScrollSpyEventListener selectionListener = ss.getSelectionListener();
  		String params = context.getExternalContext().getRequestParameterMap().get("params");
  		if (params != null && selectionListener != null) {
  			if (params != null) {
  				params = params.replace("BsFEvent=", "");
  				String[] pair = params.split(":", 2);
  				String key = pair[0];
  				String value = null;
  				if (pair.length == 2) {
  					value = pair[1];
  				}
  				if (value != null) {
  					if ("itemSelected".equals(key)) {
  						selectionListener.itemSelected(value);
  					} else {
  						throw new FacesException("Unexpected event when trying to decode the scrollspy event: " + key);
  					}
  				}
  			}
  		}
  	}
docs: Decode ajax behaviours specific to the components