per.getDataModel();
           }
       }
       LocalUIData localUIData = new LocalUIData();
       localUIData.setValue(value);

       return (DataModel&lt;T&gt;) localUIData.getDataModel();
   }
 </code>
 </pre>

 <p>
 For example:
 </p>

 <pre>
 <code>
 public class Child1 {

 }
 </code>
 </pre>

 and

 <pre>
 <code>
 package test.faces23;

 &#64;FacesDataModel(forClass = Child1.class)
 public class Child1Model&lt;E&gt; extends DataModel&lt;E&gt; {

    &#64;Override
    public int getRowCount() {
    