Ejemplo n.º 1
0
  @Override
  public void processEvent(ComponentSystemEvent event) throws AbortProcessingException {
    super.processEvent(event);

    if (!(event instanceof PreRenderComponentEvent) || !getLayout().isBuildOptions()) {
      return;
    }

    setOptions(getParent());
  }
Ejemplo n.º 2
0
  @Override
  public void processEvent(ComponentSystemEvent event) throws AbortProcessingException {
    super.processEvent(event);

    if (event instanceof PostAddToViewEvent) {
      String queueId = getClientId();

      if (componentsToAssociate != null) {
        for (UIComponent componentToAssociate : componentsToAssociate) {
          immediateAssociateWith(componentToAssociate, queueId);
        }

        componentsToAssociate = null;
      }

      if (behaviorsToAssociate != null) {
        for (AjaxBehavior ajaxBehavior : behaviorsToAssociate) {
          immediateAssociateWith(ajaxBehavior, queueId);
        }

        behaviorsToAssociate = null;
      }
    }
  }