Package org.zkoss.zkplus.embed

## Class Renders

- java.lang.Object
- - org.zkoss.zkplus.embed.Renders

-     public class Renders
      extends java.lang.Object

  Utilities to embed ZK component(s) as a native JSF component, a JSP tag, Zimlet or others. It allows application developers to use the native element without knowing the existence of ZK. For example, ZK Spreadsheet for JSF is a native JSF component made in this way.

  Example:

              Calendar cal = new Calendar();
              Renders.render(config.getServletContext(), request, response, cal, null, out);

  See also Embed ZK Component in Foreign Framework.

  Since:
    5.0.5
  Author:
    tomyeh

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---
    `static class` | `Renders.PageRenderer` | A special page renderer that renders a page without generating the HTML tag of the page.

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `Renders()` |

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static void` | `render​(javax.servlet.ServletContext ctx, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Component comp, java.lang.String path, java.io.Writer out)` | Outputs the HTML tags of the given component to the given writer.
    `static void` | `render​(javax.servlet.ServletContext ctx, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Richlet richlet, java.lang.String path, boolean pageDOM, java.io.Writer out)` | Outputs the HTML tags of the given component to the given writer with additional control.
    `static void` | `render​(javax.servlet.ServletContext ctx, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Richlet richlet, java.lang.String path, java.io.Writer out)` | Outputs the HTML tags of the given component to the given writer.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Renders

          public Renders()

  - ### Method Detail

    - #### render

          public static final void render​(javax.servlet.ServletContext ctx,
                                          javax.servlet.http.HttpServletRequest request,
                                          javax.servlet.http.HttpServletResponse response,
                                          Component comp,
                                          java.lang.String path,
                                          java.io.Writer out)
                                   throws javax.servlet.ServletException,
                                          java.io.IOException

      Outputs the HTML tags of the given component to the given writer.
      Parameters:
        `comp` - the component to output (never null). It might have child components.
        `path` - the request path. If null, the servlet path is assumed.
        `out` - the output (never null).
      Throws:
        `javax.servlet.ServletException`
        `java.io.IOException`
      Since:
        5.0.5

    - #### render

          public static final void render​(javax.servlet.ServletContext ctx,
                                          javax.servlet.http.HttpServletRequest request,
                                          javax.servlet.http.HttpServletResponse response,
                                          Richlet richlet,
                                          java.lang.String path,
                                          java.io.Writer out)
                                   throws javax.servlet.ServletException,
                                          java.io.IOException

      Outputs the HTML tags of the given component to the given writer. It is the same as `render(ctx, request, response, richlet, path, false, out)`.
      Parameters:
        `path` - the request path. If null, the servlet path is assumed.
        `out` - the output (never null).
        `richlet` - the richlet to run. If you have only one component to show and no need process it under an execution, you could use `render(ServletContext, HttpServletRequest, HttpServletResponse, Component, String, Writer)` instead.
      Throws:
        `javax.servlet.ServletException`
        `java.io.IOException`
      Since:
        5.0.5

    - #### render

          public static final void render​(javax.servlet.ServletContext ctx,
                                          javax.servlet.http.HttpServletRequest request,
                                          javax.servlet.http.HttpServletResponse response,
                                          Richlet richlet,
                                          java.lang.String path,
                                          boolean pageDOM,
                                          java.io.Writer out)
                                   throws javax.servlet.ServletException,
                                          java.io.IOException

      Outputs the HTML tags of the given component to the given writer with additional control.
      Parameters:
        `path` - the request path. If null, the servlet path is assumed.
        `out` - the output (never null).
        `richlet` - the richlet to run. If you have only one component to show and no need process it under an execution, you could use `render(ServletContext, HttpServletRequest, HttpServletResponse, Component, String, Writer)` instead.
        `pageDOM` - whether to generate the DOM element to represent the page. In other words, if true is specified, the content will be enclosed with an additional DIV element representing the tag.
      Throws:
        `javax.servlet.ServletException`
        `java.io.IOException`
      Since:
        5.0.8