0 Replies Latest reply on Apr 26, 2012 11:14 AM by Juan Romero

    rich:extendedDataTable selection inside a component

    Juan Romero Newbie



      I have a composite component that shows a rich:popupPanel when a button is clicked. Then, inside the rich:popupPanel I perform a search, that is shown in a rich:extendedDataTable. So far, everything seems to work. Finally, I have to be able to double click one row in the table and the row double-clicked should be selected and rendered in the field's values of the component.


      The problem is that when I double click, the first time the rich:popupPanel is correctly hidden, the bean is actually updated, but the fields in the component do not show the update. However, if I open again the rich:popupPanel, and selects the same row, the field's values of the component are updated and showed correctly.


      Here I show the most relevant parts of source code:


      The component:




           <a4j:region renderRegionOnly="true">

                <rich:panel header="${messages_emision['tomadores.titulo']}" id="panelTomador">

                     <h:inputText id="nombres" readonly="#{!cc.attrs.esCotizacion}"


                     <a4j:commandLink execute="@this"


                          <img src="#{facesContext.externalContext.requestContextPath}/resources/images/find.png"

                                    border="0" width="14" height="14" alt="Buscar"/>





           <rich:popupPanel header="${messages_emision['tercero.busqueda.titulo']}"

                     id="buscarTerceroPanel" domElementAttachment="form" width="700" height="340">

                <a4j:outputPanel layout="block" id="panelBusqueda" ajaxRendered="true">

                     <h:inputText id="documento" value="#{terceroMB.documento}"/>

                     <a4j:commandButton id="siguiente" value="${messages['comun.buscar']}"

                               action="#{terceroMB.buscar}" execute="panelBusqueda" render="panelBusqueda"/>

                     <rich:extendedDataTable value="#{terceroMB.listaTerceros}" var="terceroIter"

                               id="listaTerceros" selectionMode="single" selection="#{terceroMB.seleccionado}">

                          <a4j:ajax execute="@this" event="rowdblclick" render="panelTomador"



                               <f:facet name="header">${messages_emision['tercero.nombre']}</f:facet>

                               <h:outputText value="#{terceroIter.nombreCompleto}" />







      The bean:





      public class TerceroMB {


           private Tomadores tomador;


           public Object getSeleccionado() {

                if (seleccionado != null){

                     Iterator<Integer> iterator = ((HashSet<Integer>)seleccionado).iterator();

                     while (iterator.hasNext()){

                          Integer index = iterator.next();

                          tomador = (Tomadores) this.listaTerceros.get(index);







      I've search through the web, and performed several different approaches, but I didn't found the reason for this to happen.