3 Replies Latest reply: Aug 7, 2012 7:28 AM by iabughosh RSS

datatable and object parameter

ugo rossi Newbie

Hi all, i've a problem using dataTable and passing object parameter.

I'm able to do this wint RF 3.

I'm using RF 4, jsf 2 e jpa2 on glassfish.

I read some post on this argument but i can't find a solution.

 

I'm able to pass a single value, like in the code below, but i'd like to pass an objet, containing all the data in the row, to the backing bean for optimize my code.

 

<rich:panel header="ANAGRAFICA" styleClass="top">

  <a4j:jsFunction name="show" action="#{anagraficaBB.trovaDtlAnalisi}" render="tabellaAnalisiDett,modanag,tabellaAnagrafica">

   <a4j:param name="id" assignTo="#{anagraficaBB.idAnagrafica}" />

  </a4j:jsFunction>

<center>

<h:panelGrid columns="2" id="pannello" columnClasses="column1,column2" width="75%" styleClass="align_top" border="1"> 

 

    <h:panelGrid columns="1" id="pannelloAnagrafica">

  

    <rich:dataTable id="tabellaAnagrafica" value="#{anagraficaBB.listAnagraficaObj}" rows="9" var="anag" 

        onrowdblclick="show(#{anag.tab.id})">

....

 

Someone can help me?

Thank you.

Best regards to all.