Package org.apache.myfaces.tobago.internal.component

Examples of org.apache.myfaces.tobago.internal.component.AbstractUIPage


  @Override
  public void decode(FacesContext facesContext, UIComponent component) {
    super.decode(facesContext, component);
    String clientId = component.getClientId(facesContext);
    AbstractUIPage page = ComponentUtils.findPage(component);
    if (clientId.equals(page.getActionId())) {
      // this is a inputSuggest request -> render response
      facesContext.renderResponse();
    }
  }
View Full Code Here


      LOG.error("Wrong type: Need " + AbstractUIInput.class.getName() + ", but was " + component.getClass().getName());
      return;
    }

    String clientId = component.getClientId(facesContext);
    AbstractUIPage page = ComponentUtils.findPage(component);
    if (clientId.equals(page.getActionId())) {
      // this is a inputSuggest
      encodeAjax(facesContext, component);
    } else {

      AbstractUIInput input = (AbstractUIInput) component;
View Full Code Here

  @Override
  public void decode(FacesContext facesContext, UIComponent component) {
    super.decode(facesContext, component);
    String clientId = component.getClientId(facesContext);
    AbstractUIPage page = ComponentUtils.findPage(component);
    if (clientId.equals(page.getActionId())) {
      // this is a inputSuggest request -> render response
      facesContext.renderResponse();
    }
  }
View Full Code Here

      LOG.error("Wrong type: Need " + AbstractUIInput.class.getName() + ", but was " + component.getClass().getName());
      return;
    }

    String clientId = component.getClientId(facesContext);
    AbstractUIPage page = ComponentUtils.findPage(component);
    if (clientId.equals(page.getActionId())) {
      // this is a inputSuggest
      encodeAjax(facesContext, component);
    } else {

      AbstractUIInput input = (AbstractUIInput) component;
View Full Code Here

  private static final Logger LOG = LoggerFactory.getLogger(PageRendererBase.class);

  public void decode(FacesContext facesContext, UIComponent component) {
    if (component instanceof AbstractUIPage) {
      AbstractUIPage page = (AbstractUIPage) component;

      decodeActionPosition(facesContext, page);
      decodePageState(facesContext, page);
    }
  }
View Full Code Here

    }

    final String clientId = popup.getClientId(facesContext);

    // XXX May be computed in the "Layout Manager Phase"
    AbstractUIPage page = ComponentUtils.findPage(facesContext);
    if (popup.getLeft() == null) {
      popup.setLeft(page.getCurrentWidth().subtract(popup.getCurrentWidth()).divide(2));
    }
    if (popup.getTop() == null) {
      popup.setTop(page.getCurrentHeight().subtract(popup.getCurrentHeight()).divide(2));
    }

    writer.startElement(HtmlElements.DIV, popup);
    writer.writeIdAttribute(clientId);
    HtmlRendererUtils.writeDataAttributes(facesContext, writer, popup);
View Full Code Here

  private static final TobagoResourceBundle RESOURCE_BUNDLE = new TobagoResourceBundle();
  private static final TobagoMessageBundle MESSAGE_BUNDLE = new TobagoMessageBundle();

  public Box getActionPosition() {
    FacesContext facesContext = FacesContext.getCurrentInstance();
    AbstractUIPage page = ComponentUtils.findPage(facesContext);
    return page.getActionPosition();
  }
View Full Code Here

   * Returns the dimension of the page. Might be useful to set the size of a popup.
   * E. g. <code>width="#{tobagoContext.pageDimension.width.pixel - 100}"</code>
   */
  public Dimension getPageDimension() {
    FacesContext facesContext = FacesContext.getCurrentInstance();
    AbstractUIPage page = ComponentUtils.findPage(facesContext);
    return new Dimension(page.getWidth(), page.getHeight());
  }
View Full Code Here

      throw new NullPointerException("context");
    }
    Map<String, UIComponent> ajaxComponents = AjaxInternalUtils.parseAndStoreComponents(context);
    if (ajaxComponents != null) {
      // first decode the page
      AbstractUIPage page = ComponentUtils.findPage(context);
      page.decode(context);
      page.markSubmittedForm(context);
      FacesContextUtils.setAjax(context, true);

      // decode the action if actionComponent not inside one of the ajaxComponents
      // otherwise it is decoded there
      decodeActionComponent(context, page, ajaxComponents);
View Full Code Here

  private static final Logger LOG = LoggerFactory.getLogger(PageRendererBase.class);

  public void decode(FacesContext facesContext, UIComponent component) {
    if (component instanceof AbstractUIPage) {
      AbstractUIPage page = (AbstractUIPage) component;

      decodeActionPosition(facesContext, page);
      decodePageState(facesContext, page);
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.myfaces.tobago.internal.component.AbstractUIPage

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.