Package org.zkoss.zk.ui.impl

## Class MultiComposer<T extends Component>

- java.lang.Object
- - org.zkoss.zk.ui.impl.MultiComposer<T>

- All Implemented Interfaces:
    `Composer<T>`

      public class MultiComposer<T extends Component>
      extends java.lang.Object
      implements Composer<T>

  To proxy a collection of composers.
  Since:
    5.0.1
  Author:
    tomyeh

- - ### Constructor Summary

    Constructors
    Modifier | Constructor | Description
    --- | --- | ---
    `protected` | `MultiComposer​(Composer<T>[] cs)` | The constructor.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `doAfterCompose​(T comp)` | Invokes after ZK loader creates this component, initializes it and composes all its children, if any.
    `ComponentInfo` | `doBeforeCompose​(Page page, Component parent, ComponentInfo compInfo)` |
    `void` | `doBeforeComposeChildren​(T comp)` |
    `boolean` | `doCatch​(java.lang.Throwable ex)` |
    `void` | `doFinally()` |
    `static Composer` | `getComposer​(Page page, java.lang.Object[] ary)` | Returns an instance of composer to represent the specified array of composers, or null if no composer is specified.
    `boolean` | `isFullComposerOnly()` | Returns whether to invoke only the composer that implements `FullComposer`.
    `boolean` | `setFullComposerOnly​(boolean fullOnly)` | Sets whether to invoke only the composer that implements `FullComposer`.

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

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

- - ### Constructor Detail

    - #### MultiComposer

          protected MultiComposer​(Composer<T>[] cs)
                           throws java.lang.Exception

      The constructor. This method is designed to be called by `getComposer(org.zkoss.zk.ui.Page, java.lang.Object[])`. Use `getComposer(org.zkoss.zk.ui.Page, java.lang.Object[])` instead.
      Parameters:
        `cs` - the array of composer instances.
      Throws:
        `java.lang.Exception`

  - ### Method Detail

    - #### getComposer

          public static Composer getComposer​(Page page,
                                             java.lang.Object[] ary)
                                      throws java.lang.Exception

      Returns an instance of composer to represent the specified array of composers, or null if no composer is specified.
      Parameters:
        `page` - used to resolve the class if ary contains a class name. Ignored if null.
        `ary` - an array of Composer instances, or the name of the class, or the class that implements `Composer`.
      Returns:
        a composer to represent cs, or null if cs is null or empty.
      Throws:
        `java.lang.Exception`

    - #### setFullComposerOnly

          public boolean setFullComposerOnly​(boolean fullOnly)

      Sets whether to invoke only the composer that implements `FullComposer`.

      Default: false

      Returns:
        the previous value.
      Since:
        5.0.1

    - #### isFullComposerOnly

          public boolean isFullComposerOnly()

      Returns whether to invoke only the composer that implements `FullComposer`.
      Since:
        5.0.1

    - #### doAfterCompose

          public void doAfterCompose​(T comp)
                              throws java.lang.Exception

      Description copied from interface: `Composer`
      Invokes after ZK loader creates this component, initializes it and composes all its children, if any.
      Specified by:
        `doAfterCompose` in interface `Composer<T extends Component>`
      Parameters:
        `comp` - the component has been composed
      Throws:
        `java.lang.Exception`

    - #### doBeforeCompose

          public ComponentInfo doBeforeCompose​(Page page,
                                               Component parent,
                                               ComponentInfo compInfo)
                                        throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### doBeforeComposeChildren

          public void doBeforeComposeChildren​(T comp)
                                       throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### doCatch

          public boolean doCatch​(java.lang.Throwable ex)
                          throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### doFinally

          public void doFinally()
                         throws java.lang.Exception

      Throws:
        `java.lang.Exception`