Package com.liferay.faces.util.render

Examples of com.liferay.faces.util.render.DelegationResponseWriter


  @Override
  public void encodeEnd(FacesContext facesContext, UIComponent uiComponent) throws IOException {

    ResponseWriter responseWriter = facesContext.getResponseWriter();
    DelegationResponseWriter delegationResponseWriter = new InputFileDelegationResponseWriter(responseWriter);
    super.encodeEnd(facesContext, uiComponent, delegationResponseWriter);
  }
View Full Code Here


        actionURL += bookmarkableURL.substring(questionMarkPos);
      }
      ExternalContext externalContext = facesContext.getExternalContext();
      String encodedActionURL = externalContext.encodeActionURL(actionURL);
      ResponseWriter responseWriter = facesContext.getResponseWriter();
      DelegationResponseWriter delegationResponseWriter = new FormResponseWriter(responseWriter, encodedActionURL);
      super.encodeBegin(facesContext, uiComponent, delegationResponseWriter);
    }
    else {
      super.encodeBegin(facesContext, uiComponent);
    }
View Full Code Here

    // Encode the opening boundingBox <div> tag via delegation. Ensure that the "id" attribute is always written so
    // that Alloy's JavaScript will be able to locate the boundingBox in the DOM.
    ResponseWriter responseWriter = facesContext.getResponseWriter();
    String clientId = uiComponent.getClientId(facesContext);
    DelegationResponseWriter idDelegationResponseWriter = new IdDelegationResponseWriter(responseWriter,
        StringPool.DIV, clientId);
    super.encodeMarkupBegin(facesContext, uiComponent, idDelegationResponseWriter);

    // Encode the opening contentBox <div> tag with a unique id.
    String contentBoxClientId = clientId.concat(CONTENT_BOX_SUFFIX);
View Full Code Here

  @Override
  public void encodeBegin(FacesContext facesContext, UIComponent uiComponent) throws IOException {

    ResponseWriter responseWriter = facesContext.getResponseWriter();
    DelegationResponseWriter delegationResponseWriter = new CommandLinkResponseWriter(responseWriter,
        (uiComponent.getChildCount() > 0));
    super.encodeBegin(facesContext, uiComponent, delegationResponseWriter);
  }
View Full Code Here

    responseWriter.startElement(StringPool.DIV, null);
    responseWriter.writeAttribute(StringPool.ID, contentBoxClientId, null);

    // Create a response writer that will ignore the opening and closing "span" element tags along with the "id",
    // "style", and "class" attributes.
    DelegationResponseWriter delegationResponseWriter = new OutputTooltipResponseWriter(responseWriter, clientId);

    // The delegation renderer provided by the JSF runtime does not attempt to encode the opening <span> tag during
    // of encodeBegin(FacesContext, UIComponent). Instead, the entire <span>...</span> element is encoded during
    // encodeEnd(FacesContext, UIComponent).
    super.encodeMarkupEnd(facesContext, uiComponent, delegationResponseWriter);
View Full Code Here

    responseWriter.writeAttribute(StringPool.CLASS, "yui3-menu-label btn-group", StringPool.CLASS);

    // ResponseWriter blocks the text value and blocks writing of URIAttributes, if necessary
    boolean disabled = nodeMenuNav.isDisabled();
    String styleClass = nodeMenuNav.getStyleClass();
    DelegationResponseWriter delegationResponseWriter = new NodeMenuNavResponseWriter(responseWriter, disabled,
        uiComponent.getClientId(facesContext), styleClass);

    //J-
    // We have now written out something like this:
    //
View Full Code Here

      else {
        responseWriter.startElement(StringPool.LI, uiComponent);
        responseWriter.writeAttribute(StringPool.CLASS, "yui3-menuitem", StringPool.CLASS);

        ResponseWriter originalResponseWriter = facesContext.getResponseWriter();
        DelegationResponseWriter delegationResponseWriter = new NodeMenuNavMenuResponseWriter(
            originalResponseWriter);
        facesContext.setResponseWriter(delegationResponseWriter);
        child.encodeAll(facesContext);
        facesContext.setResponseWriter(originalResponseWriter);
        responseWriter.endElement(StringPool.LI);
View Full Code Here

  @Override
  public void encodeBegin(FacesContext facesContext, UIComponent uiComponent) throws IOException {

    ResponseWriter responseWriter = facesContext.getResponseWriter();
    boolean hasTableHeaderFacet = (uiComponent.getFacet(StringPool.HEADER) != null);
    DelegationResponseWriter dataTableResponseWriter = new DataTableResponseWriter(responseWriter,
        hasTableHeaderFacet);
    super.encodeBegin(facesContext, uiComponent, dataTableResponseWriter);
  }
View Full Code Here

    responseWriter.startElement(StringPool.DIV, uiComponent);
    responseWriter.writeAttribute(StringPool.ID, defaultBoundingBoxClientId, StringPool.ID);
    responseWriter.endElement(StringPool.DIV);

    // Start the encoding of the hidden text input by delegating to the renderer from the JSF runtime.
    DelegationResponseWriter delegationResponseWriter = getDelegationResponseWriter(facesContext, uiComponent);
    super.encodeMarkupBegin(facesContext, uiComponent, delegationResponseWriter);
  }
View Full Code Here

  @Override
  public void encodeMarkupEnd(FacesContext facesContext, UIComponent uiComponent) throws IOException {

    // Finish the encoding of the hidden text input by delegating to the renderer from the JSF runtime.
    DelegationResponseWriter delegationResponseWriter = getDelegationResponseWriter(facesContext, uiComponent);
    super.encodeMarkupEnd(facesContext, uiComponent, delegationResponseWriter);

    // Finish the encoding of the outermost </div> element.
    ResponseWriter responseWriter = facesContext.getResponseWriter();
    responseWriter.endElement(StringPool.DIV);
View Full Code Here

TOP

Related Classes of com.liferay.faces.util.render.DelegationResponseWriter

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.