0 Replies Latest reply on Mar 26, 2008 2:29 PM by fmchale

    using a4j support on h:dataTable rows

    fmchale

      Hello,

      In my research and tinkering I have come across a situation that I am unable to solve. Maybe Im just missing something. I would like to be able to use a4j:support onclick with an h:dataTable row, by the way Im using seam as well.

      Here is the relevant view code

      <h:dataTable id="vendorTable" value="#{vendors}" var="_vendor"
       styleClass="vendor-table" rowClasses="odd, even"
       columnClasses="vendorID," >
       <a4j:support event="onclick" reRender="vName"
       action="#{vendorList.setSelectedVendor(_vendor)}"></a4j:support>
       <h:column>
       #{_vendor.name}">
       </h:column>
      </h:dataTable>
      


      and the bean method
       public void setSelectedVendor(Vendor selectedVendor) {
       vendor = selectedVendor;
       }
      
      


      So this kinda works except always retrieving the same _vendor. Is there a more appropriate way to do this? or is it even possible with an h:dataTable