Package org.apache.myfaces.tobago.component

Examples of org.apache.myfaces.tobago.component.UIViewRoot


    List<UIComponent> ajaxComponents = AjaxUtils.getAjaxComponents(facesContext);
    if (ajaxComponents != null) {
      for (UIComponent ajaxComponent : ajaxComponents) {
        ajaxComponent.processUpdates(facesContext);
      }
      UIViewRoot viewRoot = ((UIViewRoot) facesContext.getViewRoot());
      viewRoot.broadcastEventsForPhase(facesContext, UPDATE_MODEL_VALUES);
    } else {
      facesContext.getViewRoot().processUpdates(facesContext);
    }
    return false;
  }
View Full Code Here


  public static void processActiveAjaxComponent(FacesContext facesContext,
                                                UIComponent component)
      throws IOException {

    if (component instanceof AjaxComponent) {
      final UIViewRoot viewRoot = (UIViewRoot) facesContext.getViewRoot();

      // TODO: handle phaseListeners ??

      if (!facesContext.getRenderResponse()) {
        component.processValidators(facesContext);
        viewRoot.broadcastEventsForPhase(facesContext, PhaseId.PROCESS_VALIDATIONS);
      } else if (LOG.isDebugEnabled()) {
        LOG.debug("Skipping validate");
      }

      if (!facesContext.getRenderResponse()) {
        component.processUpdates(facesContext);
        viewRoot.broadcastEventsForPhase(facesContext, PhaseId.UPDATE_MODEL_VALUES);
      } else if (LOG.isDebugEnabled()) {
        LOG.debug("Skipping updates");
      }

      if (!facesContext.getRenderResponse()) {
        viewRoot.processApplication(facesContext);
      } else if (LOG.isDebugEnabled()) {
        LOG.debug("Skipping application");
      }

      ((AjaxComponent) component).encodeAjax(facesContext);
View Full Code Here

      // and all ajax components
      for (UIComponent ajaxComponent : ajaxComponents) {
        ajaxComponent.processDecodes(facesContext);
      }

      UIViewRoot viewRoot = ((UIViewRoot) facesContext.getViewRoot());
      viewRoot.broadcastEventsForPhase(facesContext, APPLY_REQUEST_VALUES);

    } else {
      facesContext.getViewRoot().processDecodes(facesContext);
    }
    return false;
View Full Code Here

  public static void processActiveAjaxComponent(FacesContext facesContext,
      UIComponent component)
      throws IOException {

    if (component instanceof AjaxComponent) {
      final UIViewRoot viewRoot = (UIViewRoot) facesContext.getViewRoot();

      // TODO: handle phaseListeners ??

      if (!facesContext.getRenderResponse()) {
        component.processValidators(facesContext);
        viewRoot.broadcastEventsForPhase(facesContext, PhaseId.PROCESS_VALIDATIONS);
      } else if (LOG.isDebugEnabled()) {
        LOG.debug("Skipping validate");
      }

      if (!facesContext.getRenderResponse()) {
        component.processUpdates(facesContext);
        viewRoot.broadcastEventsForPhase(facesContext, PhaseId.UPDATE_MODEL_VALUES);
      } else if (LOG.isDebugEnabled()) {
        LOG.debug("Skipping updates");
      }

      if (!facesContext.getRenderResponse()) {
        viewRoot.processApplication(facesContext);
      } else if (LOG.isDebugEnabled()) {
        LOG.debug("Skipping application");
      }

      ((AjaxComponent) component).encodeAjax(facesContext);
View Full Code Here

  public static void processActiveAjaxComponent(FacesContext facesContext,
      UIComponent component)
      throws IOException {

    if (component instanceof AjaxComponent) {
      final UIViewRoot viewRoot = (UIViewRoot) facesContext.getViewRoot();

      // TODO: handle phaseListeners ??

      if (!facesContext.getRenderResponse()) {
        component.processValidators(facesContext);
        viewRoot.broadcastEventsForPhase(facesContext, PhaseId.PROCESS_VALIDATIONS);
      } else if (LOG.isDebugEnabled()) {
        LOG.debug("Skipping validate");
      }

      if (!facesContext.getRenderResponse()) {
        component.processUpdates(facesContext);
        viewRoot.broadcastEventsForPhase(facesContext, PhaseId.UPDATE_MODEL_VALUES);
      } else if (LOG.isDebugEnabled()) {
        LOG.debug("Skipping updates");
      }

      if (!facesContext.getRenderResponse()) {
        viewRoot.processApplication(facesContext);
      } else if (LOG.isDebugEnabled()) {
        LOG.debug("Skipping application");
      }

      ((AjaxComponent) component).encodeAjax(facesContext);
View Full Code Here

  public static void processActiveAjaxComponent(FacesContext facesContext,
      UIComponent component)
      throws IOException {

    if (component instanceof AjaxComponent) {
      final UIViewRoot viewRoot = (UIViewRoot) facesContext.getViewRoot();

      // TODO: handle phaseListeners ??

      if (!facesContext.getRenderResponse()) {
        component.processValidators(facesContext);
        viewRoot.broadcastEventsForPhase(facesContext, PhaseId.PROCESS_VALIDATIONS);
      } else if (LOG.isDebugEnabled()) {
        LOG.debug("Skipping validate");
      }

      if (!facesContext.getRenderResponse()) {
        component.processUpdates(facesContext);
        viewRoot.broadcastEventsForPhase(facesContext, PhaseId.UPDATE_MODEL_VALUES);
      } else if (LOG.isDebugEnabled()) {
        LOG.debug("Skipping updates");
      }

      if (!facesContext.getRenderResponse()) {
        viewRoot.processApplication(facesContext);
      } else if (LOG.isDebugEnabled()) {
        LOG.debug("Skipping application");
      }

      ((AjaxComponent) component).encodeAjax(facesContext);
View Full Code Here

        if (facesContext instanceof TobagoFacesContext) {
          ((TobagoFacesContext) facesContext).setAjaxComponentId(entry.getKey());
        }
        FacesUtils.invokeOnComponent(facesContext, facesContext.getViewRoot(), entry.getKey(), contextCallback);
      }
      UIViewRoot viewRoot = ((UIViewRoot) facesContext.getViewRoot());
      viewRoot.broadcastEventsForPhase(facesContext, PhaseId.PROCESS_VALIDATIONS);
    } else {
      facesContext.getViewRoot().processValidators(facesContext);
    }
    return false;
  }
View Full Code Here

    Map<String, UIComponent> ajaxComponents = AjaxInternalUtils.getAjaxComponents(facesContext);
    if (ajaxComponents != null) {
      for (Map.Entry<String, UIComponent> entry : ajaxComponents.entrySet()) {
        FacesUtils.invokeOnComponent(facesContext, facesContext.getViewRoot(), entry.getKey(), contextCallback);
      }
      UIViewRoot viewRoot = ((UIViewRoot) facesContext.getViewRoot());
      viewRoot.broadcastEventsForPhase(facesContext, PhaseId.UPDATE_MODEL_VALUES);
    } else {
      facesContext.getViewRoot().processUpdates(facesContext);
    }
    return false;
  }
View Full Code Here

          ((TobagoFacesContext) facesContext).setAjaxComponentId(entry.getKey());
        }
        FacesUtils.invokeOnComponent(facesContext, facesContext.getViewRoot(), entry.getKey(), contextCallback);
      }

      UIViewRoot viewRoot = ((UIViewRoot) facesContext.getViewRoot());
      viewRoot.broadcastEventsForPhase(facesContext, PhaseId.APPLY_REQUEST_VALUES);

    } else {
      facesContext.getViewRoot().processDecodes(facesContext);
    }
    return false;
View Full Code Here

  public static void processActiveAjaxComponent(FacesContext facesContext,
      UIComponent component)
      throws IOException {

    if (component instanceof AjaxComponent) {
      final UIViewRoot viewRoot = (UIViewRoot) facesContext.getViewRoot();

      // TODO: handle phaseListeners ??

      if (!facesContext.getRenderResponse()) {
        component.processValidators(facesContext);
        viewRoot.broadcastEventsForPhase(facesContext, PhaseId.PROCESS_VALIDATIONS);
      } else if (LOG.isDebugEnabled()) {
        LOG.debug("Skipping validate");
      }

      if (!facesContext.getRenderResponse()) {
        component.processUpdates(facesContext);
        viewRoot.broadcastEventsForPhase(facesContext, PhaseId.UPDATE_MODEL_VALUES);
      } else if (LOG.isDebugEnabled()) {
        LOG.debug("Skipping updates");
      }

      if (!facesContext.getRenderResponse()) {
        viewRoot.processApplication(facesContext);
      } else if (LOG.isDebugEnabled()) {
        LOG.debug("Skipping application");
      }

      ((AjaxComponent) component).encodeAjax(facesContext);
View Full Code Here

TOP

Related Classes of org.apache.myfaces.tobago.component.UIViewRoot

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.