3 Replies Latest reply on May 7, 2008 8:54 AM by Ilya Shaikovsky

    datatable filters interferes selection

    Carsten Hoehne Master

      I have an issue with filters in the datatable.
      When i have filters enabled the selection mechanism does not work.
      RF 3.2.0SR1
      Seam 2.0.1GA

      Here is the table:

       <a4j:outputPanel id="opanel">
       <rich:dataTable id="experimentSiteList" var="experimentSite"
       value="#{experimentSiteList}"
       rendered="#{not empty experimentSiteList}">
      
       <f:facet name="header">
       <h:outputText styleClass="Headersize" value="Experiments" />
       </f:facet>
      
       <rich:column filterEvent="onkeyup"
       filterBy="#{experimentSite.experiment.year}">
       <f:facet name="header">
       <h:outputText value="SowingYear" />
       </f:facet>
       <h:outputText size="5" id="year"
       value="#{experimentSite.experiment.year}"></h:outputText>
       </rich:column>
      [...]
       <rich:column>
       <s:link id="viewFieldplan" value="Fieldplan"
       action="#{htmlFieldplanBacking.showFieldplan}" propagation="begin"
       target="Fieldplan">
       </s:link>
       </rich:column>
      
       </rich:dataTable>
       </a4j:outputPanel>
      
      

      experimentSiteList is a Seam @Datamodel
      and the selection is via an @DatamodelSelection

      @DataModel("experimentSiteList")
       private List<ExperimentSite> experimentSiteList;
      
       @DataModelSelection("experimentSiteList")
       @Out(required = false)
       private ExperimentSite selectedExperimentSite;
      
       @Factory("experimentSiteList")
       public void getExperimentSitesByUser() {[...]}
      
      

      When filtering is enabeld selectedExperimentSite is set to the very last entry in the table:-(

      If filtering is removed everything works ok.
      Ciao,
      Carsten