org.apache.myfaces.trinidad.util

## Class ListFromCollection

- java.lang.Object
- - org.apache.myfaces.trinidad.util.ListFromCollection

-     public class ListFromCollection
      extends Object

  Bean that can dynamically produce Lists from Collections. The Collections must implement size(). Create an instance of this bean as a managed bean:

  ### Example:

        <managed-bean>
          <managed-bean-name>makeList</managed-bean-name>
          <managed-bean-class>
             org.apache.myfaces.trinidad.util.ListFromCollection
          </managed-bean-class>
          <managed-bean-scope>
             request
          </managed-bean-scope>
          <!-- Let's buffer 25 rows at a time (the default is 50) -->
          <managed-property>
            <property-name>size</property-name>
            <value>25</value>
          <managed-property>
        </managed-bean>

         <h:dataTable value="#{makeList.list[someSet]}>
         </h:dataTable>

  Note, though, that it is extremely expensive to use this bean for the items of an tr:forEach (or c:forEach in JSF 1.2 or Facelets).

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ListFromCollection()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Map<Collection<?>,List<?>>` | `getList()`
    `int` | `getSize()`
    `void` | `setSize(int size)`

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

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

- - ### Constructor Detail

    - #### ListFromCollection

          public ListFromCollection()

  - ### Method Detail

    - #### getList

          public Map<Collection<?>,List<?>> getList()

    - #### getSize

          public int getSize()

    - #### setSize

          public void setSize(int size)

Copyright © 2001-2017 The Apache Software Foundation. All Rights Reserved.