title: Primefaces dataTable instant Row Selection not working
body: <p>I am working with Primefaces 3.5, Spring 3.2, JSF 2.2 and Apache is my server.</p>
  
  <p>My problem is that whenever i click on the row, the row select event is never triggered in my backing bean and my store details panel is never updated.</p>
  
  <p>My backing bean is in request scope and contains onRowSelect method.
  However when i change my backing bean to sessions scope(it requires a few changes in backing bean), instant row selection works.</p>
  
  <p>For the simplicity of my question i have modified my code to include only relevant part. In my param, for the sake of testing i just put existing customer with ID 35 in my test page. </p>
  
  <p>Here is my dialog.xhtml</p>
  
  <pre><code>    &lt;h:form id="customerListingsForm"&gt;
  
      &lt;p:dialog id="manageStoresDialog"
              header="Manage #{manageStoreBean.store.owner.name}'s Stores"
              widgetVar="manageStoresDlg"
              modal="true"
              resizable="false"&gt;
  
  
          &lt;p:panelGrid id="storePanel" rendered="#{manageStoreBean.owner != null}"&gt;
              &lt;f:facet name="header"&gt;
                  &lt;p:row&gt;
                      &lt;p:column&gt;Store Details&lt;/p:column&gt;
                      &lt;p:column&gt;Customer Store List&lt;/p:column&gt;
                  &lt;/p:row&gt;
              &lt;/f:facet&gt;
  
              &lt;p:row&gt;
                  &lt;p:column&gt;
                      &lt;p:panelGrid id="storeDetails"&gt;         
                          &lt;p:row&gt;
                              &lt;p:column&gt;Name: &lt;/p:column&gt;
                              &lt;p:column&gt;
                                  &lt;h:inputText value="#{manageStoreBean.store.name}" /&gt;
                              &lt;/p:column&gt;
                          &lt;/p:row&gt;
  
                          &lt;p:row&gt;
                              &lt;p:column&gt;Description: &lt;/p:column&gt;
                              &lt;p:column&gt;
                                  &lt;h:inputText value="#{manageStoreBean.store.description}" /&gt;
                              &lt;/p:column&gt;
                          &lt;/p:row&gt;
  
                          &lt;p:row&gt;
                              &lt;p:column&gt;Short Code: &lt;/p:column&gt;
                              &lt;p:column&gt;
                                  &lt;h:inputText value="#{manageStoreBean.store.shortCode}" /&gt;
                              &lt;/p:column&gt;
                          &lt;/p:row&gt;
  
                          &lt;p:row&gt;
                              &lt;p:column&gt;Owner name:&lt;/p:column&gt;
                              &lt;p:column&gt;
                                  &lt;h:inputText value="#{manageStoreBean.store.owner.name}" readonly="true" /&gt;
                              &lt;/p:column&gt;
                          &lt;/p:row&gt;
  
                          &lt;p:row&gt;
                              &lt;p:column&gt;Store Type: &lt;/p:column&gt;
                              &lt;p:column&gt;
                                  &lt;p:selectOneMenu
                                          id="storeTypeSelected"
                                          value="#{manageStoreBean.placeType}"
                                          var="storeType"
                                          style="height:25px"
                                          converter="#{placeTypeConverter}"&gt;
                                      &lt;f:selectItems 
                                              value="#{manageStoreBean.typeList}"
                                              var="storeTypeItem"
                                              itemLabel="#{storeTypeItem.code}"
                                              itemValue="#{storeTypeItem}"/&gt;
                                      &lt;p:column&gt;#{storeType.description}&lt;/p:column&gt;
                                  &lt;/p:selectOneMenu&gt;
                              &lt;/p:column&gt;
                          &lt;/p:row&gt;
  
                          &lt;p:row&gt;
                              &lt;p:column&gt;Country: &lt;/p:column&gt;
                              &lt;p:column&gt;
                                  &lt;p:selectOneMenu
                                          id="storeCountrySelected"
                                          value="#{manageStoreBean.country}"
                                          var="country"
                                          style="height:25px"
                                          converter="#{countryConverter}"&gt;
                                      &lt;f:selectItems 
                                              value="#{manageStoreBean.countryList}"
                                              var="countryItem"
                                              itemLabel="#{countryItem.isoNumericCode}"
                                              itemValue="#{countryItem}"/&gt;
                                      &lt;p:column&gt;#{country.isoNumericCode}&lt;/p:column&gt;
                                  &lt;/p:selectOneMenu&gt;
                              &lt;/p:column&gt;
                          &lt;/p:row&gt;
  
                          &lt;p:row&gt;
                              &lt;p:column&gt;Localisation: &lt;/p:column&gt;
                              &lt;p:column&gt;
                                  &lt;p:selectOneMenu
                                          id="storeLocalisationSelected"
                                          value="#{manageStoreBean.localisationData}"
                                          var="storeLocal"
                                          style="height:25px"
                                          converter="#{localisationConverter}"&gt;
                                      &lt;f:selectItems 
                                              value="#{manageStoreBean.localisationList}"
                                              var="local"
                                              itemLabel="#{local.regionCode}"
                                              itemValue="#{local}"/&gt;
                                      &lt;p:column&gt;#{storeLocal.id} - #{storeLocal.regionCode}&lt;/p:column&gt;
                                  &lt;/p:selectOneMenu&gt;
                              &lt;/p:column&gt;
                          &lt;/p:row&gt;
                      &lt;/p:panelGrid&gt;
                  &lt;/p:column&gt;
  
                  &lt;p:column style="width:250px"&gt;
                      &lt;p:dataTable id="stores" 
                              var="store" 
                              value="#{manageStoreBean.storeList}" 
                              rowKey="#{store.id}"
                              scrollHeight="240"
                              scrollable="true"
                              selectionMode="single"
                              selection="#{manageStoreBean.selectedStore}"
                              lazy="true"&gt;
  
                          &lt;p:ajax event="rowSelect" immediate="true" 
                                  listener="#{manageStoreBean.onRowSelect}"
                                  update=":customerListingsForm:storeDetails"/&gt;
  
                          &lt;p:column headerText="Salon Name"&gt;
                              &lt;h:outputText value="#{store.name}" /&gt;
                          &lt;/p:column&gt;
                          &lt;p:column headerText="ID"&gt;
                              &lt;h:outputText value="#{store.id}" /&gt;
                          &lt;/p:column&gt;
                      &lt;/p:dataTable&gt;
                  &lt;/p:column&gt;
              &lt;/p:row&gt;
          &lt;/p:panelGrid&gt;
  
          &lt;p:commandButton 
                  value="Save"
                  action="#{manageStoreBean.saveStore}"
                  oncomplete="manageStoresDlg.hide()"&gt;
                  &lt;f:param name="storeCustomerId" value="#{manageStoreBean.owner.id}" /&gt;
          &lt;/p:commandButton&gt;
  
          &lt;h:outputText value="&amp;nbsp;&amp;nbsp;&amp;nbsp;" /&gt;
  
          &lt;p:commandButton 
                  value="Close" 
                  oncomplete="manageStoresDlg.hide()"/&gt;
      &lt;/p:dialog&gt;
  
  
      &lt;p:commandButton value="Add Store" 
              oncomplete="manageStoresDlg.show()"
              update=":customerListingsForm:manageStoresDialog"
              process="@this"&gt;
          &lt;f:param name="storeCustomerId" value="35" /&gt;
      &lt;/p:commandButton&gt;
  
  
  &lt;/h:form&gt;
  </code></pre>
  
  <p>Also i'm new to primefaces and web dev, but did a lot of learning myself before i started this project.
  I spent 2 days try to understand what's wrong and searched all web but could not find any solution. May be i'm missing something or doing wrong not sure.</p>
  
  <p>Any help is much appreciated.</p>