title: displaytag, how to integrate checkboxes?
body: <p>I use displaytag on a list bean: <code>utilisateurBean</code>. I need to add a column on this tab to add a checkbox for selecting an element.</p>
  
  <p>Pb : With the <code>displaytag</code> struts looks for the property <code>choixUtilisateur</code> in the bean and not in the <code>formBean</code>. Is there a way to talk struts/displaytag to map this property in the form? I don't understand the mix of prestenation layer/ business layer that this involves.</p>
  
  <p>I understand that I iterate on the bean and that he looks for the property in. But I did not understand the mapping of the decorator property in the business layer.</p>
  
  <p>My code :</p>
  
  <pre><code>&lt;html:form action="/rechercheUtilisateur"
      name="formRechercheUtilisateur"
          decorator="org.displaytag.render.DecorateurCheckbox"
      type="lan.poujoulat.osac.forms.FormRechercheUtilisateur"&gt;
  ...
  
     &lt;div align="center"&gt;&lt;display:table style="width: 100%;"
      class="mars" sort="list"
      name="formRechercheUtilisateur.listeUtilisateurs"
      id="formRechercheUtilisateur.listeUtilisateurs"
          decorator="org.displaytag.render.DecorateurCheckbox"
      cellspacing="4" cellpadding="2" pagesize="10"
      requestURI="rechercheUtilisateur.do" export="true"  &gt;
      &lt;display:column title="id" property="id" sortable="true"
          style="color: black;" headerClass="sortable"&gt;&lt;/display:column&gt;
      ...
      &lt;display:column media="html" property="choixUtilisateur" title="&amp;nbsp;"&gt;&lt;/display:column&gt;
  ...
     &lt;/display:table&gt;&lt;/div&gt;
  &lt;/html:form&gt;
  </code></pre>
  
  <p>The <code>DecorateurCheckbox.java</code> to add checkbox to my tab:</p>
  
  <pre><code>public class DecorateurCheckbox extends TableDecorator{
  ...
      public String getChoixUtilisateur()
      {
          String retour = "";
          UtilisateurBean user= (UtilisateurBean) getCurrentRowObject();
          int idUser ;
  
          idUser = user.getId();
  
         retour = "&lt;input type='checkbox' name='formRechercheUtilisateur' property='choixUtilisateur' value='"+idUser+"' id='selectedArticle" + idUser + "' /&gt;";
  
          return  retour;
      }
  ...
  }
  </code></pre>
  
  <p>Error: </p>
  
  <blockquote>
    <p>/Administration/acces.jsp. Exception : javax.servlet.ServletException:
    Error looking up property "choixUtilisateur" in object type
    "xxx.UtilisateurBean".</p>
  </blockquote>