title: jsf datatable problem with var attribute
body: <p>While developing a small jsf application with datatable I am having following problem with this error</p>
  
  <pre><code>The method setVar(String) in the type DataTableTag is not applicable for the arguments (JspValueExpression)
  </code></pre>
  
  <p>in my jsp page i have following code fragment </p>
  
  <pre><code>&lt;h:dataTable id="dt1" value="#{dbdata.empno}" var="item" bgcolor="#F1F1F1" border="10" cellpadding="5" cellspacing="3" rows="4" width="50%" dir="LTR" frame="hsides" rules="all" summary="This is a JSF code to create dataTable." &gt;
  </code></pre>
  
  <p>in my java file i have following 2 code fragments--</p>
  
  <pre><code>while (rst.next())
  {    
   empno.add(i++,new perInfo(rst.getString(1)));
  }
  </code></pre>
  
  <hr>
  
  <pre><code>public class perInfo {
      String uname;
  
      public perInfo(String firstName) {
          this.uname = uname;
      }
  
      public String getUname() {
          return uname;
      }
  }
  </code></pre>
  
  <p>the data is coming fine from database.</p>
  
  <p>I have found that     "var" attribute is giving problem</p>
  
  <p>can you please advise</p>