code: @Override
      public void queueEvent(final FacesEvent event) {
          final FacesContext fc = FacesContext.getCurrentInstance();
  
          if (isSelfRequest(fc)) {
              final Map<String, String> params = fc.getExternalContext().getRequestParameterMap();
              final String eventName = params.get(Constants.RequestParams.PARTIAL_BEHAVIOR_EVENT_PARAM);
              final AjaxBehaviorEvent behaviorEvent = (AjaxBehaviorEvent) event;
  
              if (WaypointEvent.NAME.equals(eventName)) {
                  final String direction = params.get(this.getClientId(fc) + "_direction");
                  final String waypointId = params.get(this.getClientId(fc) + "_waypointId");
  
                  final WaypointEvent waypointEvent = new WaypointEvent(this, behaviorEvent.getBehavior(),
                              direction != null ? WaypointEvent.Direction.valueOf(direction.toUpperCase(
                                          Locale.ENGLISH))
                                          : null,
                              waypointId);
                  waypointEvent.setPhaseId(behaviorEvent.getPhaseId());
                  super.queueEvent(waypointEvent);
  
                  return;
              }
          }
  
          super.queueEvent(event);
      }
docs: {@inheritDoc}