@SuppressWarnings("unchecked")
  @Override
  protected void decode(
      FacesContext facesContext,
      UIComponent component,
      @SuppressWarnings("unused") FacesBean facesBean,
      String clientId) {
    super.decode(facesContext, component, facesBean, clientId);

    RequestContext afContext = RequestContext.getCurrentInstance();
    // See if a ReturnEvent is waiting for us.  We don't deliver
    // the ReturnEvent - we just use its value
    ReturnEvent returnEvent = afContext.getDialogService().getReturnEvent(component);
    if (returnEvent != null) {
      afContext.addPartialTarget(component);
      queueReturnEvent(facesContext, component, returnEvent);
    } else {
      Map<String, String> parameterMap = facesContext.getExternalContext().getRequestParameterMap();

      Object source = parameterMap.get("source");
      clientId = clientId == null ? component.getClientId(facesContext) : clientId;
      if ((source != null) && source.equals(clientId)) {
        Object part = parameterMap.get(_PART_PARAMETER);
        if (_BUTTON_PART.equals(part)) {
          // Force partial rendering (if we're launching a window)
          // =-=AEW I don't believe this is necessary;  I believe
          // we've already got "partial" turned on
          TrinidadAgent agent = AgentUtil.getAgent(facesContext);
          if (XhtmlUtils.supportsSeparateWindow(agent))
            PartialPageUtils.forcePartialRendering(facesContext);

          queueActionEvent(facesContext, component);
        }
        // else ???
      }
    }
  }