6 Replies Latest reply on Oct 15, 2008 7:48 AM by Ilya Shaikovsky

    rich:comboBox, rich:dataTable and reRender

    jBossTester jBossTester Newbie

      Something is wrong with rich:comboBox using with as external filter rich:dataTable after I rerender it. I use richfaces version 3.2.2.GA.

      My code is:

      test.xhtml


      <ui:composition xmlns="http://www.w3.org/1999/xhtml"
       xmlns:ui="http://java.sun.com/jsf/facelets"
       xmlns:h="http://java.sun.com/jsf/html"
       xmlns:f="http://java.sun.com/jsf/core"
       xmlns:t="http://myfaces.apache.org/tomahawk"
       xmlns:a4j="http://richfaces.org/a4j"
       xmlns:rich="http://richfaces.org/rich"
       template="/wrapper.xhtml">
      
      <ui:define name="body">
      
       <h:form id="testId">
       <rich:dataTable value="#{testBackingBean.data}" var="item">
       <f:facet name="header">
       <rich:columnGroup>
       <rich:column><t:outputText value="Test Column" /></rich:column>
       </rich:columnGroup>
       </f:facet>
      
       <rich:column>
       <f:facet name="header">
       <rich:comboBox defaultLabel="Enter some value">
       <f:selectItem itemValue="suggestion 1"/>
       <f:selectItem itemValue="suggestion 2"/>
       <f:selectItem itemValue="suggestion 3"/>
       <f:selectItem itemValue="suggestion 4"/>
       <f:selectItem itemValue="suggestion 5"/>
       </rich:comboBox>
       </f:facet>
      
       <t:outputText value="#{item}" />
       </rich:column>
       </rich:dataTable>
      
       <t:outputText value="RERENDER" style="cursor: pointer;">
       <a4j:support event="onclick"
       action="#{testBackingBean.testRequest}"
       reRender="testId" />
       </t:outputText>
       </h:form>
      
      </ui:define>
      </ui:composition>
      



      TestBackingBean.java

      package net.dimeg.mylios.backingbeans;
      
      import java.util.ArrayList;
      import java.util.Date;
      import java.util.List;
      
      public class TestBackingBean {
      
       public List<String> getData() {
       List<String> list = new ArrayList<String>();
       list.add("value1");
       list.add("value2");
       list.add("value3");
      
       return list;
       }
      
       public String getDateStr() {
       return (new Date()).toString();
       }
      
       public void testRequest() {
       System.out.println("TEST REQUEST");
       }
      }
      


      After I make RERENDER the combobox not opens for first time, and afrer that it pens and locks.

      Is there some workaround to use comboBox as filter field with rerendering, or not to rerender comboBox field?

      If this is a version BUG, can someone add it to JIRA?