3 Replies Latest reply: Apr 9, 2013 10:49 AM by Edilmar Alves RSS

RF4.1: bug with two extendedDataTable together x horizontal scrollbar

Edilmar Alves Apprentice

Hi,

 

My environment: NetBeans7.1 + GlassFish 3.1.1 + CDI/Weld + JSF2 + RichFaces4.1.

 

I have a JSF with 2 extendedDataTable, because I need scrollbars, searching and ordering in both.

However, when I put the second table in the JSF file, the horizontal scrollbar of the first table is not displayed.

 

I don't know if this problem occurs because first table has more columns to display and it need horizontal scrollbar, the second needs only vertical scrollbar, and RichFaces Javascript applies the same rules to display scrollbars, but looking only the size of the second.

 

I made a simple code to ilustrate the problem. To see the problem with horizontal scrollbar, just comment ou uncomment the second table:

 

teste.xhtml:

 

    <h:form id="formCad">
      <rich:extendedDataTable id="table"
                              var="item" rowKeyVar="row"
                              value="#{t.list}"
                              style="height:100px; width:100px;"
                              >
        <rich:column width="200px" id="field">
          <f:facet name="header"><h:outputText styleClass="headerText" value="Test Field" /></f:facet>
          <h:outputText value="#{item}" />
        </rich:column>
      </rich:extendedDataTable>
      <rich:extendedDataTable id="table2"
                              var="item2" rowKeyVar="row2"
                              value="#{t.list}"
                              style="height:100px; width:300px;"
                              >
        <rich:column width="200px" id="field2">
          <f:facet name="header"><h:outputText styleClass="headerText" value="Test Field" /></f:facet>
          <h:outputText value="#{item2}" />
        </rich:column>
      </rich:extendedDataTable>
    </h:form>

 

 

TesteController.java:

 

@Named(value="t")
@ConversationScoped
public class TesteController implements Serializable {
  private List<String> list;
 
  @PostConstruct
  public void init() {
    list = new ArrayList<>();
    list.add("test1");
    list.add("test2");
    list.add("test3");
    list.add("test4");
    list.add("test5");
  }
 
  public List<String> getList() {
    return list;
  }

  public void setList(List<String> list) {
    this.list = list;
  }
 
}

     twoExtendedDataTables.png

 

oneExtendedDataTable.png